54 int GetUserExtents(
double extents[6],
size_t timestep);
59 int GetUserExtents(vector<double> minExts, vector<double>maxExts,
size_t timestep);
65 int GetUserExtents(
float extents[6],
size_t timestep);
72 int GetLocalExtents(
double extents[6],
int timestep = -1);
78 int GetLocalExtents(
float extents[6],
int timestep = -1);
84 int GetStretchedLocalExtents(
double extents[6],
int timestep = -1);
91 const vector<double> localExtents(6,0.);
92 return GetValueDoubleVec(_extentsTag,localExtents);
100 int SetLocalExtents(
const vector<double>& extents,
Params* p,
int timestep = -1);
107 int SetLocalExtents(
const double extents[6],
Params* p,
int timestep = -1);
114 int SetLocalExtents(
const float extents[6],
Params* p,
int timestep = -1);
121 int SetStretchedLocalExtents(
const double extents[6],
Params* p,
int timestep = -1);
127 const vector<double> defaultAngles(3,0.);
128 return GetValueDoubleVec(Box::_anglesTag,defaultAngles);
134 const vector<double> defaultAngles(3,0.);
135 const vector<double> angles = GetValueDoubleVec(Box::_anglesTag,defaultAngles);
136 if (angles.size() != 3)
return -1;
137 for (
int i = 0; i<3;i++) ang[i]=angles[i];
144 const vector<double> defaultAngles(3,0.);
145 const vector<double> angles = GetValueDoubleVec(Box::_anglesTag,defaultAngles);
146 if (angles.size() != 3)
return -1;
147 for (
int i = 0; i<3;i++) ang[i]=(
float)angles[i];
156 for (
int i = 0; i<3;i++) ang.push_back(angles[i]);
157 return SetValueDouble(_anglesTag,
"change box angles",ang,p);
165 for (
int i = 0; i<3;i++) angl.push_back((
double)angles[i]);
166 return SetValueDouble(_anglesTag,
"change box angles",angl,p);
172 SetValueDouble(_anglesTag,
"Change box angles",vals, p);
181 const vector<long> defaultTimes(1,0);
182 return( GetValueLongVec(Box::_timesTag,defaultTimes));
191 SetValueLong(Box::_timesTag,
"Change box times",times, p);
198 void Trim(
Params* p,
int numTimes = 1);
203 bool IsPlanar() {
return GetValueLong(Box::_planarTag) != 0;}
210 SetValueLong(Box::_planarTag,
"Set box planar value", (
long)value, p);
216 return GetValueLong(Box::_orientationTag);
223 SetValueLong(Box::_orientationTag,
"Set box orientation", (
long)value, p);
241 if (!rotated) GetLocalExtents(extents,-1);
242 else calcRotatedBoxExtents(extents);
251 if (!rotated) GetStretchedLocalExtents(extents,-1);
252 else calcRotatedStretchedBoxExtents(extents);
258 void calcRotatedBoxExtents(
double extents[6]);
263 void calcRotatedStretchedBoxExtents(
double extents[6]);
267 bool cropToBox(
const double boxExts[6],
Params* p);
268 bool intersectRotatedBox(
double boxexts[6],
double pointFound[3],
double probeCoords[2]);
269 bool fitToBox(
const double boxExts[6],
Params* p);
270 void setBoxToExtents(
const double extents[6],
Params* pParams);
271 int interceptBox(
const double boxExts[6],
double intercept[6][3]);
272 void getRotatedVoxelExtents(
string varname,
float voxdims[2],
int numRefinements);
273 void rotateAndRenormalize(
int axis,
double rotVal,
Params* p);
276 #ifndef DOXYGEN_SKIP_THIS
277 void buildLocalCoordTransform(
double transformMatrix[12],
double extraThickness,
int timestep,
double rotation = 0.,
int axis= -1);
278 void convertThetaPhiPsi(
double *newTheta,
double* newPhi,
double* newPsi,
int axis,
double rotation);
280 void calcLocalBoxCorners(
double corners[8][3],
float extraThickness,
int timestep,
double rotation = 0.,
int axis = -1);
282 static const string _boxTag;
283 static const string _anglesTag;
284 static const string _extentsTag;
285 static const string _timesTag;
286 static const string _planarTag;
287 static const string _orientationTag;
288 #endif //DOXYGEN_SKIP_THIS
3D or 2D box with options for orientation angles and extents changing in time. Intended to be used in...
void SetAngles(const vector< double > &vals, Params *p)
A pure virtual class for managing parameters used in visualization.
void SetOrientation(long value, Params *p)
void calcContainingBoxExtents(double extents[6], bool rotated=false)
static ParamsBase * CreateDefaultInstance()
void SetTimes(const vector< long > ×, Params *p)
Nodes with state in Xml tree representation.
void calcContainingStretchedBoxExtents(double extents[6], bool rotated=false)
int GetAngles(float ang[3])
void SetPlanar(bool value, Params *p)
const vector< double > GetAngles()
const vector< double > GetLocalExtents()
const vector< long > GetTimes()
int SetAngles(const float angles[3], Params *p)
int GetAngles(double ang[3])
int SetAngles(const double angles[3], Params *p)