Encapsulation of data needed to search on PrimitivePatches. More...
Classes | |
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 |
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... | |
template<> | |
Foam::volumeType | getVolumeType (const indexedOctree< treeDataPrimitivePatch< triSurface >> &oc, const point &sample) const |
template<> | |
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... | |
Encapsulation of data needed to search on PrimitivePatches.
Definition at line 63 of file treeDataPrimitivePatch.H.
treeDataPrimitivePatch | ( | const bool | cacheBb, |
const PatchType & | patch, | ||
const scalar | planarTol | ||
) |
Construct from patch.
Definition at line 56 of file treeDataPrimitivePatch.C.
References update().
|
inline |
Definition at line 211 of file treeDataPrimitivePatch.H.
Foam::pointField shapePoints | ( | ) | const |
Representative point cloud for all shapes inside (one point per shape)
Definition at line 118 of file treeDataPrimitivePatch.C.
References forAll.
|
inline |
Return access to the underlying patch.
Definition at line 221 of file treeDataPrimitivePatch.H.
Referenced by treeDataPrimitivePatch< PatchType >::findIntersection(), findNearestMaskedOp< PatchType >::operator()(), 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 133 of file treeDataPrimitivePatch.C.
References Foam::abort(), Foam::fieldTypes::area, Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, PointHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::ln(), Foam::mag(), Foam::magSqr(), Foam::constant::atomic::mp, Foam::normalised(), points, Foam::Pout, PointHit< PointType >::rawPoint(), Foam::sqr(), and Foam::Zero.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does shape at index overlap bb.
Definition at line 362 of file treeDataPrimitivePatch.C.
References boundBox::containsAny(), f(), forAll, treeBoundBox::overlaps(), and points.
Does shape at index overlap sphere.
Definition at line 429 of file treeDataPrimitivePatch.C.
References PointHit< PointType >::distance(), f(), points, and Foam::sqr().
|
static |
Helper: find intersection of line with shapes.
Definition at line 576 of file treeDataPrimitivePatch.C.
References PointHit< PointType >::distance(), stdFoam::end(), f(), PointHit< PointType >::hit(), PointHit< PointType >::hitPoint(), Foam::foamVersion::patch, treeDataPrimitivePatch< PatchType >::patch(), points, and treeBoundBox::posBits().
Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< triSurface >> & | oc, |
const point & | sample | ||
) | const |
Definition at line 36 of file treeDataTriSurface.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, PointIndexHit< PointType >::index(), and Foam::sqr().
volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< triSurface >> & | oc, |
const point & | sample | ||
) | const |
Template specialisation of getVolumeType for treeDataTriSurface.