treeDataPoint Class Reference

Holds (reference to) pointField. Encapsulation of data needed for octree searches. Used for searching for nearest point. No bounding boxes around points. Only overlaps and calcNearest are implemented, rest makes little sense. More...

Classes

class  findIntersectOp
 
class  findNearestOp
 

Public Member Functions

 ClassName ("treeDataPoint")
 
 treeDataPoint (const pointField &)
 Construct from pointField. Holds reference! More...
 
 treeDataPoint (const pointField &, const labelList &)
 Construct from subset of pointField. Holds reference! More...
 
label size () const
 
const labelListpointLabels () const
 
const pointFieldpoints () const
 
bool useSubset () const
 
pointField shapePoints () const
 Get representative point cloud for all shapes inside. More...
 
volumeType getVolumeType (const indexedOctree< treeDataPoint > &, 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 (bb of) shape at index overlap bb. More...
 
bool overlaps (const label index, const point &centre, const scalar radiusSqr) const
 Does shape at index overlap the sphere. More...
 

Detailed Description

Holds (reference to) pointField. Encapsulation of data needed for octree searches. Used for searching for nearest point. No bounding boxes around points. Only overlaps and calcNearest are implemented, rest makes little sense.

Optionally works on subset of points.

Source files

Definition at line 59 of file treeDataPoint.H.

Constructor & Destructor Documentation

◆ treeDataPoint() [1/2]

treeDataPoint ( const pointField points)

Construct from pointField. Holds reference!

Definition at line 41 of file treeDataPoint.C.

◆ treeDataPoint() [2/2]

treeDataPoint ( const pointField points,
const labelList pointLabels 
)

Construct from subset of pointField. Holds reference!

Definition at line 49 of file treeDataPoint.C.

References treeDataPoint::findNearestOp::findNearestOp().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "treeDataPoint"  )

◆ size()

label size ( ) const
inline

Definition at line 139 of file treeDataPoint.H.

References List< T >::size().

Here is the call graph for this function:

◆ pointLabels()

const labelList& pointLabels ( ) const
inline

Definition at line 149 of file treeDataPoint.H.

Referenced by treeDataPoint::findNearestOp::operator()().

Here is the caller graph for this function:

◆ points()

const pointField& points ( ) const
inline

Definition at line 154 of file treeDataPoint.H.

Referenced by treeDataPoint::findNearestOp::operator()().

Here is the caller graph for this function:

◆ useSubset()

bool useSubset ( ) const
inline

Definition at line 159 of file treeDataPoint.H.

References treeDataPoint::getVolumeType(), treeDataPoint::overlaps(), and treeDataPoint::shapePoints().

Referenced by treeDataPoint::findNearestOp::operator()().

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

◆ shapePoints()

Foam::pointField shapePoints ( ) const

Get representative point cloud for all shapes inside.

(one point per shape)

Definition at line 78 of file treeDataPoint.C.

References treeDataPoint::getVolumeType().

Referenced by treeDataPoint::useSubset().

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

◆ getVolumeType()

Foam::volumeType getVolumeType ( const indexedOctree< treeDataPoint > &  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 92 of file treeDataPoint.C.

References treeDataPoint::overlaps(), and volumeType::unknown.

Referenced by treeDataPoint::shapePoints(), and treeDataPoint::useSubset().

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

◆ overlaps() [1/2]

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

Does (bb of) shape at index overlap bb.

Definition at line 102 of file treeDataPoint.C.

References treeBoundBox::contains().

Referenced by treeDataPoint::getVolumeType(), and treeDataPoint::useSubset().

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 the sphere.

Definition at line 113 of file treeDataPoint.C.

References Foam::magSqr().

Here is the call graph for this function:

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