44 int GetUserExtents(
double extents[6],
size_t timestep);
50 int GetUserExtents(
float extents[6],
size_t timestep);
57 int GetLocalExtents(
double extents[6],
int timestep = -1);
63 int GetLocalExtents(
float extents[6],
int timestep = -1);
70 const vector<double> localExtents(6,0.);
71 return GetRootNode()->GetElementDouble(_extentsTag,localExtents);
78 int SetLocalExtents(
const vector<double>& extents,
int timestep = -1);
84 int SetLocalExtents(
const double extents[6],
int timestep = -1);
90 int SetLocalExtents(
const float extents[6],
int timestep = -1);
96 const vector<double> defaultAngles(3,0.);
103 const vector<double> defaultAngles(3,0.);
104 const vector<double>& angles = GetRootNode()->GetElementDouble(
Box::_anglesTag,defaultAngles);
105 if (angles.size() != 3)
return -1;
106 for (
int i = 0; i<3;i++) ang[i]=angles[i];
113 const vector<double> defaultAngles(3,0.);
114 const vector<double>& angles = GetRootNode()->GetElementDouble(
Box::_anglesTag,defaultAngles);
115 if (angles.size() != 3)
return -1;
116 for (
int i = 0; i<3;i++) ang[i]=(
float)angles[i];
124 for (
int i = 0; i<3;i++) ang.push_back(angles[i]);
125 return GetRootNode()->SetElementDouble(_anglesTag, ang);
132 for (
int i = 0; i<3;i++) angl.push_back((
double)angles[i]);
133 return GetRootNode()->SetElementDouble(_anglesTag, angl);
138 GetRootNode()->SetElementDouble(_anglesTag, vals);
147 const vector<long> defaultTimes(1,0);
148 return( GetRootNode()->GetElementLong(
Box::_timesTag,defaultTimes));
160 if (numTimes > GetTimes().size())
return;
161 vector<long> times = GetTimes();
162 times.resize(numTimes);
165 vector<double>defaultExts(6,0.);
void Trim(int numTimes=1)
3D or 2D box with options for orientation angles and extents changing in time. Intended to be used in...
void SetTimes(const vector< long > ×)
int SetAngles(const double angles[3])
const vector< long > & GetTimes()
static const string _boxTag
static ParamsBase * CreateDefaultInstance()
const vector< double > & GetLocalExtents()
Nodes with state in Xml tree representation.
int SetAngles(const float angles[3])
int GetAngles(float ang[3])
static const string _extentsTag
void SetAngles(const vector< double > &vals)
int GetAngles(double ang[3])
static const string _timesTag
static const string _anglesTag
const vector< double > & GetAngles()