OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

treeDataEdge Class Reference

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

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.

Detailed Description

Holds data for octree to work on an edges subset.

Source files

Definition at line 48 of file treeDataEdge.H.


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


Member Function Documentation

ClassName ( "treeDataEdge"   ) 

label size (  )  const [inline]

Definition at line 101 of file treeDataEdge.H.

Foam::pointField points (  )  const

Get representative point cloud for all shapes inside.

(one point per shape)

Definition at line 68 of file treeDataEdge.C.

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

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

Does (bb of) shape at index overlap bb.

Definition at line 98 of file treeDataEdge.C.

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

void findNearest ( const labelList &  indices,
const linePointRef &  ln,
treeBoundBox &  tightest,
label &  minIndex,
point &  linePoint,
point &  nearestPoint 
) const

Calculates nearest (to line) point in shape.

Returns point and distance (squared)

Definition at line 151 of file treeDataEdge.C.

References dist, forAll, edge::line(), Foam::magSqr(), boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), and Foam::sqr().

Here is the call graph for this function:

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

References notImplemented.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd