Go to the documentation of this file.
57 #ifndef treeBoundBox_H
58 #define treeBoundBox_H
94 static const scalar
great;
186 template<
unsigned Size>
203 inline scalar
typDim()
const;
285 const point& overallStart,
Simple random number generator.
const point & max() const
Maximum describing the bounding box.
tmp< pointField > points() const
Vertex coordinates. In octant coding.
A class for managing temporary objects.
bool contiguous< treeBoundBox >()
Data associated with treeBoundBox type are contiguous.
Standard boundBox + extra functionality for use in octree.
void calcExtremities(const point &pt, point &nearest, point &furthest) const
Calculate nearest and furthest (to point) vertex coords of.
direction posBits(const point &) const
Position of point relative to bounding box.
static const treeBoundBox greatBox
As per boundBox::greatBox, but with GREAT instead of VGREAT.
treeBoundBox subBbox(const direction) const
Sub box given by octant number. Midpoint calculated.
static const edgeList edges
Edge to point addressing.
treeBoundBox()
Construct null setting points to zero.
static const FixedList< vector, 6 > faceNormals
Per face the unit normal.
static FixedList< vector, 6 > calcFaceNormals()
To initialise faceNormals.
friend Ostream & operator<<(Ostream &os, const treeBoundBox &)
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)....
treeBoundBox extend(Random &, const scalar s) const
Return slightly wider bounding box.
bool intersects(const point &overallStart, const vector &overallVec, const point &start, const point &end, point &pt, direction &ptBits) const
Intersects segment; set point to intersection position and face,.
bool contiguous< boundBox >()
Data associated with boundBox type are contiguous.
bool overlaps(const boundBox &) const
Overlaps/touches boundingBox?
scalar typDim() const
Typical dimension length,height,width.
static const faceList faces
Face to point addressing.
void searchOrder(const point &pt, FixedList< direction, 8 > &octantOrder) const
Calculates optimal order to look for nearest to point.
point nearest(const point &) const
Return the nearest point on the boundBox to the supplied point.
friend bool operator==(const treeBoundBox &, const treeBoundBox &)
const point & min() const
Minimum describing the bounding box.
point corner(const direction) const
Corner point given octant.
scalar maxDist(const point &) const
Returns distance point to furthest away corner.
static edgeList calcEdges(const label[12][2])
To initialise edges.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Direction is an integer type used to represent the Cartesian directions etc. Currently it is a typede...
faceBit
Bits used for face coding.
friend bool operator!=(const treeBoundBox &, const treeBoundBox &)
static const treeBoundBox invertedBox
As per boundBox::invertedBox, but with GREAT instead of VGREAT.
friend Istream & operator>>(Istream &is, treeBoundBox &)
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
direction subOctant(const point &pt) const
Returns octant number given point and the calculated midpoint.
bool contains(const point &) const
Contains point? (inside or on edge)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
direction faceBits(const point &) const
Code position of point on bounding box faces.
A 1D vector of objects of type <T> with a fixed size <Size>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label distanceCmp(const point &, const treeBoundBox &other) const
Compare distance to point with other bounding box.
static const scalar great
The great value used for greatBox and invertedBox.
A bounding box defined in terms of the points at its extremities.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
octantBit
Bits used for octant/point coding.