36 vector(-great, -great, -great),
37 vector(great, great, great)
43 vector(great, great, great),
44 vector(-great, -great, -great)
64 initListList<face, label, 6, 4>(facesArray)
108 edges[edgeI][0] = edgesArray[edgeI][0];
109 edges[edgeI][1] = edgesArray[edgeI][1];
117 FixedList<vector, 6> normals;
137 <<
"cannot find bounding box for zero-sized pointField, " 138 <<
"returning zero" <<
endl;
156 <<
"cannot find bounding box for zero-sized pointField, " 157 <<
"returning zero" <<
endl;
173 points[octant] =
corner(octant);
195 <<
"octant should be [0..7]" 237 const point& overallStart,
265 for (
label i = 0; i < 4; ++i)
276 if ((ptBits & endBits) != 0)
288 scalar
s = (
min().
x() - overallStart.
x())/overallVec.
x();
290 pt.
y() = overallStart.
y() + overallVec.
y()*
s;
291 pt.
z() = overallStart.
z() + overallVec.
z()*
s;
305 scalar
s = (
max().
x() - overallStart.
x())/overallVec.
x();
307 pt.
y() = overallStart.
y() + overallVec.
y()*
s;
308 pt.
z() = overallStart.
z() + overallVec.
z()*
s;
320 scalar
s = (
min().
y() - overallStart.
y())/overallVec.
y();
321 pt.
x() = overallStart.
x() + overallVec.
x()*
s;
323 pt.
z() = overallStart.
z() + overallVec.
z()*
s;
335 scalar
s = (
max().
y() - overallStart.
y())/overallVec.
y();
336 pt.
x() = overallStart.
x() + overallVec.
x()*
s;
338 pt.
z() = overallStart.
z() + overallVec.
z()*
s;
350 scalar
s = (
min().
z() - overallStart.
z())/overallVec.
z();
351 pt.
x() = overallStart.
x() + overallVec.
x()*
s;
352 pt.
y() = overallStart.
y() + overallVec.
y()*
s;
365 scalar
s = (
max().
z() - overallStart.
z())/overallVec.
z();
366 pt.
x() = overallStart.
x() + overallVec.
x()*
s;
367 pt.
y() = overallStart.
y() + overallVec.
y()*
s;
390 return intersects(start, end-start, start, end, pt, ptBits);
400 if (pt[cmpt] <
min()[cmpt])
404 else if (pt[cmpt] ==
min()[cmpt])
413 if (pt[cmpt] >
max()[cmpt])
417 else if (pt[cmpt] ==
max()[cmpt])
435 if (pt.
x() ==
min().
x())
439 else if (pt.
x() ==
max().
x())
444 if (pt.
y() ==
min().
y())
448 else if (pt.
y() ==
max().
y())
453 if (pt.
z() ==
min().
z())
457 else if (pt.
z() ==
max().
z())
469 if (pt.
x() <
min().
x())
473 else if (pt.
x() >
max().
x())
478 if (pt.
y() <
min().
y())
482 else if (pt.
y() >
max().
y())
487 if (pt.
z() <
min().
z())
491 else if (pt.
z() >
max().
z())
506 scalar nearX, nearY, nearZ;
507 scalar farX, farY, farZ;
542 nearest =
point(nearX, nearY, nearZ);
543 furthest =
point(farX, farY, farZ);
566 point nearThis, farThis;
571 const scalar minDistThis =
572 sqr(nearThis.
x() - pt.
x())
573 +
sqr(nearThis.
y() - pt.
y())
574 +
sqr(nearThis.
z() - pt.
z());
575 const scalar maxDistThis =
576 sqr(farThis.
x() - pt.
x())
577 +
sqr(farThis.
y() - pt.
y())
578 +
sqr(farThis.
z() - pt.
z());
584 point nearOther, farOther;
589 const scalar minDistOther =
590 sqr(nearOther.x() - pt.
x())
591 +
sqr(nearOther.y() - pt.
y())
592 +
sqr(nearOther.z() - pt.
z());
593 const scalar maxDistOther =
594 sqr(farOther.x() - pt.
x())
595 +
sqr(farOther.y() - pt.
y())
596 +
sqr(farOther.z() - pt.
z());
601 if (maxDistThis < minDistOther)
606 else if (minDistThis > maxDistOther)
623 Info<<
"Dumping bounding box " << *
this <<
" as lines to obj file " 630 const point& pt = bbPoints[i];
632 str<<
"v " << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
endl;
639 str<<
"l " << e[0]+1 <<
' ' << e[1]+1 <<
nl;
651 static_cast<const boundBox&>(b)
666 return os << static_cast<const boundBox&>(bb);
672 return is >>
static_cast<boundBox&
>(bb);
static const FixedList< vector, 6 > faceNormals
Per face the unit normal.
boundBox()
Construct null, setting points to zero.
#define forAll(list, i)
Loop across all elements in list.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
A 1D vector of objects of type <T> with a fixed size <Size>.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
point corner(const direction) const
Corner point given octant.
static const treeBoundBox greatBox
As per boundBox::greatBox, but with great instead of vGreat.
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
treeBoundBox subBbox(const direction) const
Sub box given by octant number. Midpoint calculated.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
direction faceBits(const point &) const
Code position of point on bounding box faces.
static faceList faces()
Return faces with correct point order.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Ostream & endl(Ostream &os)
Add newline and flush stream.
A bounding box defined in terms of the points at its extremities.
Vector< scalar > vector
A scalar version of the templated Vector.
const fileName & name() const
Return the name of the stream.
direction posBits(const point &) const
Position of point relative to bounding box.
Various functions to operate on Lists.
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))
vectorField pointField
pointField is a vectorField.
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,.
treeBoundBox()
Construct null setting points to zero.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)
static const edgeList edges
Edge to point addressing.
errorManip< error > abort(error &err)
point midpoint() const
The midpoint of the bounding box.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void calcExtremities(const point &pt, point &nearest, point &furthest) const
Calculate nearest and furthest (to point) vertex coords of.
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar maxDist(const point &) const
Returns distance point to furthest away corner.
const point & max() const
Maximum point defining the bounding box.
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
label distanceCmp(const point &, const treeBoundBox &other) const
Compare distance to point with other bounding box.
Ostream & operator<<(Ostream &, const ensightPart &)
static const treeBoundBox invertedBox
As per boundBox::invertedBox, but with great instead of vGreat.
tmp< pointField > points() const
Vertex coordinates. In octant coding.
Standard boundBox + extra functionality for use in octree.
dimensioned< scalar > mag(const dimensioned< Type > &)
const doubleScalar e
Elementary charge.
const point & min() const
Minimum point defining the bounding box.
A class for managing temporary objects.
bool operator!=(const particle &, const particle &)
static const scalar great
The great value used for greatBox and invertedBox.
void writeOBJ(const fileName &fName) const