treeDataPrimitivePatch< PatchType > Class Template Reference

Encapsulation of data needed to search on PrimitivePatches. More...

Inheritance diagram for treeDataPrimitivePatch< PatchType >:
[legend]
Collaboration diagram for treeDataPrimitivePatch< PatchType >:
[legend]

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 &centre, 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...
 

Detailed Description

template<class PatchType>
class Foam::treeDataPrimitivePatch< PatchType >

Encapsulation of data needed to search on PrimitivePatches.

Source files

Definition at line 63 of file treeDataPrimitivePatch.H.

Constructor & Destructor Documentation

◆ treeDataPrimitivePatch()

treeDataPrimitivePatch ( const bool  cacheBb,
const PatchType &  patch,
const scalar  planarTol 
)

Construct from patch.

Definition at line 55 of file treeDataPrimitivePatch.C.

Member Function Documentation

◆ size()

label size ( ) const
inline

Definition at line 211 of file treeDataPrimitivePatch.H.

◆ shapePoints()

Foam::pointField shapePoints

Representative point cloud for all shapes inside (one point per shape)

Definition at line 118 of file treeDataPrimitivePatch.C.

References forAll.

◆ patch()

const PatchType & patch ( ) const
inline

Return access to the underlying patch.

Definition at line 221 of file treeDataPrimitivePatch.H.

Referenced by treeDataPrimitivePatch< PatchType >::findIntersection(), treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()(), findNearestMaskedOp< PatchType >::operator()(), and treeDataPrimitivePatch< PatchType >::findNearestOp::operator()().

Here is the caller graph for this function:

◆ getVolumeType() [1/3]

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 132 of file treeDataPrimitivePatch.C.

References Foam::abort(), e, UList< T >::end(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), forAll, indexedOctree< Type >::getSide(), PointHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::ln(), Foam::mag(), Foam::magSqr(), Foam::normalised(), points, Foam::Pout, PointHit< PointType >::rawPoint(), UList< T >::rcIndex(), Foam::sqr(), volumeType::UNKNOWN, and Foam::Zero.

Here is the call graph for this function:

◆ overlaps() [1/2]

bool overlaps ( const label  index,
const treeBoundBox sampleBb 
) const

Does shape at index overlap bb.

Definition at line 361 of file treeDataPrimitivePatch.C.

References boundBox::containsAny(), f(), UList< T >::fcIndex(), forAll, triangleFuncs::intersectBb(), treeBoundBox::overlaps(), points, and UList< T >::size().

Referenced by treeDataPrimitivePatch< PatchType >::overlaps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ overlaps() [2/2]

bool overlaps ( const label  index,
const point centre,
const scalar  radiusSqr 
) const

Does shape at index overlap sphere.

Definition at line 428 of file treeDataPrimitivePatch.C.

References PointHit< PointType >::distance(), f(), treeBoundBox::overlaps(), treeDataPrimitivePatch< PatchType >::overlaps(), points, and Foam::sqr().

Here is the call graph for this function:

◆ findIntersection()

bool findIntersection ( const indexedOctree< treeDataPrimitivePatch< PatchType > > &  tree,
const label  index,
const point start,
const point end,
point intersectionPoint 
)
static

Helper: find intersection of line with shapes.

Definition at line 575 of file treeDataPrimitivePatch.C.

References PointHit< PointType >::distance(), f(), intersection::HALF_RAY, PointHit< PointType >::hit(), PointHit< PointType >::hitPoint(), treeDataPrimitivePatch< PatchType >::patch(), points, treeBoundBox::posBits(), and UList< T >::size().

Referenced by treeDataPrimitivePatch< PatchType >::findIntersectOp::operator()(), treeDataPrimitivePatch< PatchType >::findAllIntersectOp::operator()(), and treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVolumeType() [2/3]

Foam::volumeType getVolumeType ( const indexedOctree< treeDataPrimitivePatch< triSurface > > &  oc,
const point sample 
) const

Definition at line 35 of file treeDataTriSurface.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, PointIndexHit< PointType >::index(), and Foam::sqr().

Here is the call graph for this function:

◆ getVolumeType() [3/3]

volumeType getVolumeType ( const indexedOctree< treeDataPrimitivePatch< triSurface > > &  oc,
const point sample 
) const

Template specialisation of getVolumeType for treeDataTriSurface.


The documentation for this class was generated from the following files: