21 #ifndef REGIONPARAMS_H
22 #define REGIONPARAMS_H
28 #include <vapor/MyBase.h>
29 #include <vapor/common.h>
37 class ViewpointParams;
69 void getRegionVoxelCoords(
int reflevel,
int lod,
size_t min_dim[3],
size_t max_dim[3],
int timestep);
88 int getAvailableVoxelCoords(
int reflevel,
int* lod,
size_t min_dim[3],
size_t max_dim[3],
90 const int* sesVarNums,
int numVars,
double* regMin = 0,
double* regMax = 0);
103 static int PrepareCoordsForRetrieval(
int numxforms,
int lod,
size_t timestep,
const vector<string>& varnames,
104 double* regMin,
double* regMax,
105 size_t min_dim[3],
size_t max_dim[3]);
114 static float calcCurrentValue(
const string& varname,
const double point[3],
int numRefinements,
int lod,
size_t timeStep);
119 float fullRegionMBs(
int refLevel);
121 #ifndef DOXYGEN_SKIP_THIS
125 const std::string& getShortName() {
return _shortName;}
126 float getLocalRegionMin(
int coord,
int timestep){
128 myBox->GetLocalExtents(exts, timestep);
131 float getLocalRegionMax(
int coord,
int timestep){
133 myBox->GetLocalExtents(exts, timestep);
134 return exts[coord+3];
136 void getLocalRegionExtents(
double exts[6],
int timestep){
137 myBox->GetLocalExtents(exts,timestep);
140 float getLocalRegionCenter(
int indx,
int timestep) {
141 return (0.5f*(getLocalRegionMin(indx,timestep)+getLocalRegionMax(indx,timestep)));
148 static int getValidRegion(
size_t timestep,
const char* varname,
int minRefLevel,
size_t min_coord[3],
size_t max_coord[3]);
153 static int getMBStorageNeeded(
const double exts[6],
int refLevel);
155 bool reinit(
bool doOverride);
156 virtual void restart();
157 static void setDefaultPrefs() {}
160 bool elementStartHandler(
ExpatParseMgr*,
int , std::string& ,
const char ** );
163 int validateNumTrans(
int n,
int timestep);
166 virtual Box* GetBox() {
return myBox;}
170 void setLocalRegionMin(
int coord,
float minval,
int timestep,
bool checkMax=
true);
171 void setLocalRegionMax(
int coord,
float maxval,
int timestep,
bool checkMin=
true);
172 void setInfoNumRefinements(
int n){infoNumRefinements = n;}
173 void setInfoTimeStep(
int n) {infoTimeStep = n;}
174 void setInfoVarNum(
int n) {infoVarNum = n;}
175 const vector<double>& GetAllExtents(){
return myBox->GetRootNode()->GetElementDouble(Box::_extentsTag);}
176 const vector<long>& GetTimes(){
return myBox->GetRootNode()->GetElementLong(Box::_timesTag);}
177 void clearRegionsMap();
178 bool extentsAreVarying(){
return myBox->GetTimes().size()>1;}
180 bool insertTime(
int timestep);
182 bool removeTime(
int timestep);
185 static const string _shortName;
186 static const string _regionMinTag;
187 static const string _regionMaxTag;
188 static const string _regionCenterTag;
189 static const string _regionSizeTag;
190 static const string _regionAtTimeTag;
191 static const string _regionListTag;
192 static const string _maxSizeAttr;
193 static const string _numTransAttr;
194 static const string _fullHeightAttr;
195 static const string _timestepAttr;
196 static const string _extentsAttr;
200 int infoNumRefinements, infoVarNum, infoTimeStep;
204 static size_t fullHeight;
207 #endif //DOXYGEN_SKIP_THIS
211 #endif //REGIONPARAMS_H
3D or 2D box with options for orientation angles and extents changing in time. Intended to be used in...
A pure virtual class for managing parameters used in visualization.
A class for describing a 3D axis-aligned region in user space.
Nodes with state in Xml tree representation.