FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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

#include <meshTools/treeDataPoint.H>


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.

Source files

Definition at line 57 of file treeDataPoint.H.

Collaboration diagram for treeDataPoint:

List of all members.

Public Member Functions

 ClassName ("treeDataPoint")
 treeDataPoint (const pointField &points)
 Construct from components. Holds reference to points!
label  size () const
pointField  points () const
 Get representative point cloud for all shapes inside.
label  getVolumeType (const indexedOctree< treeDataPoint > &, const point &) const
 Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
bool  overlaps (const label index, const treeBoundBox &sampleBb) const
 Does (bb of) shape at index overlap bb.
void  findNearest (const labelList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
 Calculates nearest (to sample) point in shape.
void  findNearest (const labelList &indices, const linePointRef &ln, treeBoundBox &tightest, label &minIndex, point &linePoint, point &nearestPoint) const
 Calculates nearest (to line) point in shape.
bool  intersects (const label index, const point &start, const point &end, point &result) const
 Calculate intersection of shape with ray. Sets result.

Constructor & Destructor Documentation

treeDataPoint ( const pointField &   points  )

Construct from components. Holds reference to points!

Definition at line 42 of file treeDataPoint.C.


Member Function Documentation

ClassName ( "treeDataPoint"    )
label size (  ) const [inline]

Definition at line 79 of file treeDataPoint.H.

References List< T >::size().

Foam::pointField points (  ) const

Get representative point cloud for all shapes inside.

(one point per shape)

Definition at line 50 of file treeDataPoint.C.

Foam::label 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 59 of file treeDataPoint.C.

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

Does (bb of) shape at index overlap bb.

Definition at line 70 of file treeDataPoint.C.

References treeBoundBox::contains().

void findNearest ( const labelList &   indices,
const point &   sample,
scalar &   nearestDistSqr,
label &   nearestIndex,
point &   nearestPoint  
) const

Calculates nearest (to sample) point in shape.

Returns actual point and distance (squared)

Definition at line 82 of file treeDataPoint.C.

References forAll, and Foam::magSqr().

void findNearest ( const labelList &   indices,
const linePointRef &   ln,
treeBoundBox &   tightest,
label &   minIndex,
point &   linePoint,
point &   nearestPoint  
) const
bool intersects ( const label   index,
const point &   start,
const point &   end,
point &   result  
) const [inline]

Calculate intersection of shape with ray. Sets result.

accordingly

Definition at line 134 of file treeDataPoint.H.

References notImplemented.


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