Data Structures | Public Member Functions | Private Attributes
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...

Collaboration diagram for treeDataPoint:
Collaboration graph
[legend]

Data Structures

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

Private Attributes

const pointFieldpoints_
 
const labelList pointLabels_
 Subset of points to work on (or empty) More...
 
const bool useSubset_
 

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.

Member Function Documentation

◆ ClassName()

ClassName ( "treeDataPoint"  )

◆ size()

label size ( ) const
inline

Definition at line 139 of file treeDataPoint.H.

References treeDataPoint::pointLabels_, treeDataPoint::points_, List::size(), and treeDataPoint::useSubset_.

Here is the call graph for this function:

◆ pointLabels()

const labelList& pointLabels ( ) const
inline

Definition at line 149 of file treeDataPoint.H.

References treeDataPoint::pointLabels_.

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.

References treeDataPoint::points_.

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::useSubset_.

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

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.

◆ 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 94 of file treeDataPoint.C.

References volumeType::UNKNOWN.

◆ overlaps() [1/2]

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

Does (bb of) shape at index overlap bb.

Definition at line 105 of file treeDataPoint.C.

References treeBoundBox::contains().

Here is the call 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 117 of file treeDataPoint.C.

References Foam::magSqr().

Here is the call graph for this function:

Field Documentation

◆ points_

const pointField& points_
private

Definition at line 63 of file treeDataPoint.H.

Referenced by treeDataPoint::points(), and treeDataPoint::size().

◆ pointLabels_

const labelList pointLabels_
private

Subset of points to work on (or empty)

Definition at line 66 of file treeDataPoint.H.

Referenced by treeDataPoint::pointLabels(), and treeDataPoint::size().

◆ useSubset_

const bool useSubset_
private

Definition at line 68 of file treeDataPoint.H.

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


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