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

treeDataEdge Class Reference

Holds data for octree to work on an edges subset. More...

#include <meshTools/treeDataEdge.H>


Detailed Description

Holds data for octree to work on an edges subset.

Source files

Definition at line 53 of file treeDataEdge.H.

Collaboration diagram for treeDataEdge:

List of all members.

Public Member Functions

 ClassName ("treeDataEdge")
 treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, const labelList &edgeLabels)
 Construct from selected edges. !Holds references to edges and points.
label  size () const
pointField  points () const
 Get representative point cloud for all shapes inside.
label  getVolumeType (const indexedOctree< treeDataEdge > &, 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

treeDataEdge ( const bool   cacheBb,
const edgeList &   edges,
const pointField &   points,
const labelList &   edgeLabels  
)

Construct from selected edges. !Holds references to edges and points.

Definition at line 50 of file treeDataEdge.C.

References forAll.


Member Function Documentation

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

Definition at line 106 of file treeDataEdge.H.

References List< T >::size().

Foam::pointField points (  ) const

Get representative point cloud for all shapes inside.

(one point per shape)

Definition at line 76 of file treeDataEdge.C.

References edge::centre(), and forAll.

Foam::label getVolumeType ( const indexedOctree< treeDataEdge > &   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 93 of file treeDataEdge.C.

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

Does (bb of) shape at index overlap bb.

Definition at line 104 of file treeDataEdge.C.

References treeBoundBox::overlaps().

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 123 of file treeDataEdge.C.

References PointHit< Point >::distance(), forAll, edge::line(), line< Point, PointRef >::nearestDist(), PointHit< Point >::rawPoint(), and Foam::sqr().

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 161 of file treeDataEdge.H.

References notImplemented.


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