Encapsulation of data needed to search on PrimitivePatches. More...
Data Structures | |
class | findAllIntersectOp |
class | findIntersectOp |
class | findNearestOp |
class | findSelfIntersectOp |
Public Member Functions | |
treeDataPrimitivePatch (const bool cacheBb, const PatchType &, const scalar planarTol) | |
Construct from patch. More... | |
label | size () const |
pointField | shapePoints () const |
Get representative point cloud for all shapes inside. More... | |
const PatchType & | patch () const |
Return access to the underlying patch. More... | |
volumeType | getVolumeType (const indexedOctree< treeDataPrimitivePatch< PatchType > > &, const point &) const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface. More... | |
bool | overlaps (const label index, const treeBoundBox &sampleBb) const |
Does shape at index overlap bb. More... | |
bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
Does shape at index overlap sphere. More... | |
Foam::volumeType | getVolumeType (const indexedOctree< treeDataPrimitivePatch< triSurface > > &oc, const point &sample) const |
volumeType | getVolumeType (const indexedOctree< treeDataPrimitivePatch< triSurface > > &oc, const point &sample) const |
Template specialisation of getVolumeType for treeDataTriSurface. More... | |
Static Public Member Functions | |
static bool | findIntersection (const indexedOctree< treeDataPrimitivePatch< PatchType > > &tree, const label index, const point &start, const point &end, point &intersectionPoint) |
Helper: find intersection of line with shapes. More... | |
Private Member Functions | |
void | update () |
Initialise all member data. More... | |
Static Private Member Functions | |
static treeBoundBox | calcBb (const pointField &, const face &) |
Calculate face bounding box. More... | |
Private Attributes | |
const PatchType & | patch_ |
Underlying geometry. More... | |
const bool | cacheBb_ |
Whether to precalculate and store face bounding box. More... | |
const scalar | planarTol_ |
Tolerance to use for intersection tests. More... | |
treeBoundBoxList | bbs_ |
Face bounding boxes (valid only if cacheBb_) More... | |
Encapsulation of data needed to search on PrimitivePatches.
Definition at line 61 of file treeDataPrimitivePatch.H.
treeDataPrimitivePatch | ( | const bool | cacheBb, |
const PatchType & | patch, | ||
const scalar | planarTol | ||
) |
Construct from patch.
Definition at line 74 of file treeDataPrimitivePatch.C.
|
staticprivate |
Calculate face bounding box.
Definition at line 36 of file treeDataPrimitivePatch.C.
References f(), boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), p, and points.
|
private |
Initialise all member data.
Definition at line 55 of file treeDataPrimitivePatch.C.
References forAll.
|
inline |
Definition at line 212 of file treeDataPrimitivePatch.H.
References treeDataPrimitivePatch< PatchType >::patch_.
Foam::pointField shapePoints |
Get representative point cloud for all shapes inside.
(one point per shape)
Definition at line 136 of file treeDataPrimitivePatch.C.
References forAll.
|
inline |
Return access to the underlying patch.
Definition at line 222 of file treeDataPrimitivePatch.H.
References treeDataPrimitivePatch< PatchType >::patch_.
Referenced by treeDataPrimitivePatch< PatchType >::findIntersection(), treeDataPrimitivePatch< PatchType >::findNearestOp::operator()(), and treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()().
Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< PatchType > > & | oc, |
const point & | sample | ||
) | const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Only makes sense for closed surfaces.
Definition at line 153 of file treeDataPrimitivePatch.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, PointHit::hit(), PointIndexHit< Point >::index(), Foam::ln(), Foam::mag(), Foam::magSqr(), Foam::constant::atomic::mp, points, Foam::Pout, PointHit::rawPoint(), and Foam::sqr().
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does shape at index overlap bb.
Definition at line 385 of file treeDataPrimitivePatch.C.
References boundBox::containsAny(), f(), forAll, treeBoundBox::overlaps(), and points.
Does shape at index overlap sphere.
Definition at line 457 of file treeDataPrimitivePatch.C.
References PointHit::distance(), f(), points, and Foam::sqr().
|
static |
Helper: find intersection of line with shapes.
Definition at line 612 of file treeDataPrimitivePatch.C.
References treeDataPrimitivePatch< PatchType >::bbs_, treeDataPrimitivePatch< PatchType >::cacheBb_, PointHit::distance(), f(), PointHit::hit(), PointHit::hitPoint(), treeDataPrimitivePatch< PatchType >::patch(), treeDataPrimitivePatch< PatchType >::planarTol_, points, and treeBoundBox::posBits().
Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< triSurface > > & | oc, |
const point & | sample | ||
) | const |
Definition at line 33 of file treeDataTriSurface.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, PointIndexHit< Point >::index(), and Foam::sqr().
volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< triSurface > > & | oc, |
const point & | sample | ||
) | const |
Template specialisation of getVolumeType for treeDataTriSurface.
|
private |
Underlying geometry.
Definition at line 68 of file treeDataPrimitivePatch.H.
Referenced by treeDataPrimitivePatch< PatchType >::patch(), and treeDataPrimitivePatch< PatchType >::size().
|
private |
Whether to precalculate and store face bounding box.
Definition at line 71 of file treeDataPrimitivePatch.H.
Referenced by treeDataPrimitivePatch< PatchType >::findIntersection().
|
private |
Tolerance to use for intersection tests.
Definition at line 74 of file treeDataPrimitivePatch.H.
Referenced by treeDataPrimitivePatch< PatchType >::findIntersection().
|
private |
Face bounding boxes (valid only if cacheBb_)
Definition at line 77 of file treeDataPrimitivePatch.H.
Referenced by treeDataPrimitivePatch< PatchType >::findIntersection().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.