Go to the documentation of this file.
112 posZ_<0?posZ_:2*posZ_+addPos[2],
128 posZ_<0?posZ_:posZ_ / divider,
140 return reduceLevelBy(
diff);
153 posZ_<0?posZ_:posZ_ <<
diff,
166 ((posX_ + 1) <<
diff) - 1,
167 ((posY_ + 1) <<
diff) - 1,
168 posZ_<0?posZ_:((posZ_ + 1) <<
diff) - 1,
181 const label shift = 1 << level_;
188 min.x() = rootBox.
min().
x() + dc.
x() * this->posX();
189 min.y() = rootBox.
min().
y() + dc.
y() * this->posY();
192 min.z() = rootBox.
min().
z() + dc.
z() * this->posZ();
208 cubeBox(rootBox,
min,
max);
218 cubeBox(rootBox,
min,
max);
219 return (
max.x() -
min.x());
228 minCoord = this->refineForPosition(0);
229 if( minCoord.
posX_ > 0 )
231 if( minCoord.
posY_ > 0 )
233 if( minCoord.
posZ_ > 0 )
236 maxCoord = this->refineForPosition(7);
238 if( maxCoord.
posX_ < maxc )
240 if( maxCoord.
posY_ < maxc )
242 if( maxCoord.
posZ_ < maxc )
265 inline void meshOctreeCubeCoordinates::operator=
276 inline bool meshOctreeCubeCoordinates::operator==
283 (posX_ != cc.
posX_) ||
284 (posY_ != cc.
posY_) ||
292 inline bool meshOctreeCubeCoordinates::operator!=
299 (posX_ != cc.
posX_) ||
300 (posY_ != cc.
posY_) ||
308 inline bool meshOctreeCubeCoordinates::operator<=
322 if( (
max <= resy) || ((
max ^ resy) < resy) )
327 if( (
max <= resz) || ((
max ^ resz) < resz) )
361 inline bool meshOctreeCubeCoordinates::operator>=
375 if( (
max <= resy) || ((
max ^ resy) < resy) )
380 if( (
max <= resz) || ((
max ^ resz) < resz) )
414 inline bool meshOctreeCubeCoordinates::operator<
428 if( (
max <= resy) || ((
max ^ resy) < resy) )
433 if( (
max <= resz) || ((
max ^ resz) < resz) )
467 inline bool meshOctreeCubeCoordinates::operator>
481 if( (
max <= resy) || ((
max ^ resy) < resy) )
486 if( (
max <= resz) || ((
max ^ resz) < resz) )
527 is.
readBegin(
"meshOctreeCubeCoordinates");
537 is.
readEnd(
"meshOctreeCubeCoordinates");
540 is.
check(
"operator>>(Istream&, meshOctreeCubeCoordinates");
545 inline Ostream&
operator<<
559 os.
check(
"operator<<(Ostream&, const meshOctreeCubeCoordinates");
Istream & readEnd(const char *funcName)
meshOctreeCubeCoordinates increaseToLevelMax(const direction l) const
return the maximal coordinates of the child at the given level
label posX() const
return x, y, z coordinates
const point & max() const
Maximum describing the bounding box.
point centre(const boundBox &) const
return centre
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
meshOctreeCubeCoordinates increaseToLevelMin(const direction l) const
return the minimal coordinates of the child at the given level
direction level_
cube level in the octree structure
meshOctreeCubeCoordinates refineForPosition(const label) const
return the coordinates of child cube at the given position
meshOctreeCubeCoordinates reduceToLevel(const direction) const
return the coordinates of the parent at the given level
const point & min() const
Minimum describing the bounding box.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalar size(const boundBox &) const
return size
direction level() const
return level
label posX_
coordinates in the octree structure
A bounding box defined in terms of the points at its extremities.
meshOctreeCubeCoordinates()
Null constructor.
void neighbourRange(meshOctreeCubeCoordinates &minCoord, meshOctreeCubeCoordinates &maxCoord) const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Istream & readBegin(const char *funcName)
void cubeBox(const boundBox &, point &, point &) const
return min and max points
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
meshOctreeCubeCoordinates reduceLevelBy(const direction diff) const