63 virtual void SetExtents(
const vector<double> &minExt,
const vector<double> &maxExt);
81 void GetExtents(vector<double> &minExt, vector<double> &maxExt)
const;
122 void SetOrientation(
long value) { SetValueLong(Box::m_orientationTag,
"Set box orientation", (
long)value); }
130 int GetStretchedLocalExtents(
double extents[6],
int timestep = -1);
137 vector<double> GetLocalExtents()
const
139 const vector<double> localExtents(6, 0);
140 return GetValueDoubleVec(_extentsTag, localExtents);
148 void SetLocalExtents(
const vector<double>& extents,
int timestep = -1);
150 void SetLocalExtents(
151 const vector<double>& minExt,
const vector<double>& maxExt,
154 VAssert(minExt.size() == maxExt.size() && minExt.size() == 3);
155 vector <double> extents = minExt;
156 extents.insert(extents.end(), maxExt.begin(), maxExt.end());
157 SetLocalExtents(extents, timestep);
165 void SetLocalExtents(
const double extents[6],
int timestep = -1);
172 void SetLocalExtents(
const float extents[6],
int timestep = -1);
181 void SetStretchedLocalExtents(
const double extents[6],
int timestep = -1);
189 const vector<double> defaultAngles(3, 0.);
190 return GetValueDoubleVec(Box::m_anglesTag, defaultAngles);
197 void GetAngles(
double ang[3]){
198 const vector<double> angv = GetAngles();
199 for (
int i=0; i<3; i++) ang[i] = angv[i];
205 void GetAngles(
float ang[3]){
206 const vector<double> angv = GetAngles();
207 for (
int i=0; i<3; i++) ang[i] = angv[i];
217 for (
int i = 0; i < 3; i++) ang.push_back(angles[i]);
218 SetValueDoubleVec(m_anglesTag,
"change box angles", ang);
227 for (
int i = 0; i < 3; i++) angl.push_back((
double)angles[i]);
228 SetValueDoubleVec(m_anglesTag,
"change box angles", angl);
233 void SetAngles(
const vector<double> &vals) { SetValueDoubleVec(m_anglesTag,
"Change box angles", vals); }
241 const vector<long> GetTimes() {
242 return( GetValueLongVec(Box::_timesTag));
249 void SetTimes(
const vector<long>& times) {
250 SetValueLongVec(Box::_timesTag,
"Change box times",times);
253 void buildLocalCoordTransform(
254 double transformMatrix[12],
double extraThickness,
255 int timestep,
double rotation = 0.,
int axis= -1
271 void calcContainingBoxExtents(
272 double extents[6],
bool rotated =
false
275 if (!rotated) GetLocalExtents(extents,-1);
276 else calcRotatedBoxExtents(extents);
283 void calcRotatedBoxExtents(
double extents[6])
const;
291 void calcContainingStretchedBoxExtents(
292 double extents[6],
bool rotated =
false
296 if (!rotated) GetStretchedLocalExtents(extents,-1);
305 void calcRotatedStretchedBoxExtents(
306 vector <double> stretchFactors,
double extents[6]
311 bool cropToBox(
const double boxExts[6]);
312 bool intersectRotatedBox(
double boxexts[6],
double pointFound[3],
double probeCoords[2]);
313 bool fitToBox(
const double boxExts[6]);
314 void setBoxToExtents(
const double extents[6]);
315 int interceptBox(
const double boxExts[6],
double intercept[6][3]);
317 void getRotatedVoxelExtents(
string varname,
float voxdims[2],
int numRefinements);
320 void rotateAndRenormalize(
int axis,
double rotVal);
324 void convertThetaPhiPsi(
325 double *newTheta,
double* newPhi,
double* newPsi,
326 int axis,
double rotation
330 void calcLocalBoxCorners(
331 double corners[8][3],
float extraThickness,
int timestep,
332 double rotation = 0.,
int axis = -1
3D or 2D box with options for orientation angles .
virtual void SetExtents(const VAPoR::CoordType &minExt, const VAPoR::CoordType &maxExt)
void GetExtents(vector< double > &minExt, vector< double > &maxExt) const
void SetOrientation(long value)
Box(ParamsBase::StateSave *ssave, string name=Box::GetClassType())
Create a Box object from scratch.
void SetAngles(const vector< double > &vals)
void SetPlanar(bool value)
static string GetClassType()
Box(ParamsBase::StateSave *ssave, XmlNode *node)
Create a Box object from an existing XmlNode tree.
virtual void SetExtents(const vector< double > &minExt, const vector< double > &maxExt)
static const string m_planarTag
void GetExtents(VAPoR::CoordType &minExt, VAPoR::CoordType &maxExt) const
int GetOrientation() const
static const string m_extentsTag
static const string m_anglesTag
vector< double > GetAngles() const
static const string m_orientationTag
void SetAngles(const double angles[3])
void SetAngles(const float angles[3])
Nodes with state in Xml tree representation.
std::array< double, 3 > CoordType
Type for specifying floating point coordinates.