FreeFOAM The Cross-Platform CFD Toolkit
octreeDataEdges Class Reference

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

#include <meshTools/octreeDataEdges.H>


Detailed Description

Holds data for octree to work on an edges subset.

Source files

Definition at line 56 of file octreeDataEdges.H.

List of all members.

Public Member Functions

 ClassName ("octreeDataEdges")
 octreeDataEdges (const edgeList &edges, const pointField &points, const labelList &edgeLabels)
 Construct from selected edges. !Holds references to edges and points.
 octreeDataEdges (const octreeDataEdges &)
 Construct as copy.
 ~octreeDataEdges ()
const edgeListedges () const
const pointFieldpoints () const
const labelListedgeLabels () const
const treeBoundBoxListallBb () const
label size () const
label getSampleType (const octree< octreeDataEdges > &, const point &) const
 Get type of sample.
bool overlaps (const label index, const treeBoundBox &sampleBb) const
 Does (bb of) shape at index overlap bb.
bool contains (const label index, const point &sample) const
 Does shape at index contain sample.
bool intersects (const label index, const point &start, const point &end, point &intersectionPoint) const
 Segment (from start to end) intersection with shape at index.
bool findTightest (const label index, const point &sample, treeBoundBox &tightest) const
 Sets newTightest to bounding box (and returns true) if.
scalar calcSign (const label index, const point &sample, vector &n) const
 Given index get unit normal and calculate (numerical) sign.
scalar calcNearest (const label index, const point &sample, point &nearest) const
 Calculates nearest (to sample) point in shape.
scalar calcNearest (const label index, const linePointRef &ln, point &linePt, point &shapePt) const
 Calculates nearest (to line segment) point in shape.
void write (Ostream &os, const label index) const
 Write shape at index.

Constructor & Destructor Documentation

octreeDataEdges ( const edgeList edges,
const pointField points,
const labelList edgeLabels 
)

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

Definition at line 48 of file octreeDataEdges.C.

References b, e, edge::end(), forAll, Foam::max(), Foam::min(), and edge::start().

octreeDataEdges ( const octreeDataEdges shapes)

Construct as copy.

Definition at line 76 of file octreeDataEdges.C.

Definition at line 87 of file octreeDataEdges.C.


Member Function Documentation

ClassName ( "octreeDataEdges"  )
const edgeList& edges ( ) const
inline

Definition at line 107 of file octreeDataEdges.H.

const pointField& points ( ) const
inline

Definition at line 112 of file octreeDataEdges.H.

const labelList& edgeLabels ( ) const
inline

Definition at line 117 of file octreeDataEdges.H.

Referenced by surfaceFeatures::nearestEdges().

const treeBoundBoxList& allBb ( ) const
inline

Definition at line 122 of file octreeDataEdges.H.

label size ( ) const
inline

Definition at line 127 of file octreeDataEdges.H.

References List< T >::size().

Foam::label getSampleType ( const octree< octreeDataEdges > &  ,
const point  
) const

Get type of sample.

Definition at line 94 of file octreeDataEdges.C.

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

Does (bb of) shape at index overlap bb.

Definition at line 104 of file octreeDataEdges.C.

References treeBoundBox::overlaps().

bool contains ( const label  index,
const point sample 
) const

Does shape at index contain sample.

Definition at line 114 of file octreeDataEdges.C.

References notImplemented.

bool intersects ( const label  index,
const point start,
const point end,
point intersectionPoint 
) const

Segment (from start to end) intersection with shape at index.

If intersects returns true and sets intersectionPoint

Definition at line 128 of file octreeDataEdges.C.

References notImplemented.

bool findTightest ( const label  index,
const point sample,
treeBoundBox tightest 
) const

Sets newTightest to bounding box (and returns true) if.

nearer to sample than tightest bounding box. Otherwise returns false.

Definition at line 145 of file octreeDataEdges.C.

References treeBoundBox::calcExtremities(), dist, Foam::mag(), boundBox::max(), boundBox::min(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Foam::scalar calcSign ( const label  index,
const point sample,
vector n 
) const

Given index get unit normal and calculate (numerical) sign.

of sample. Used to determine accuracy of calcNearest or inside/outside.

Definition at line 183 of file octreeDataEdges.C.

References Vector< scalar >::zero.

Foam::scalar calcNearest ( const label  index,
const point sample,
point nearest 
) const

Calculates nearest (to sample) point in shape.

Returns point and mag(nearest - sample).

Definition at line 197 of file octreeDataEdges.C.

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

Foam::scalar calcNearest ( const label  index,
const linePointRef ln,
point linePt,
point shapePt 
) const

Calculates nearest (to line segment) point in shape.

Returns distance and both point.

Definition at line 215 of file octreeDataEdges.C.

References e, edge::line(), and line< Point, PointRef >::nearestDist().

void write ( Ostream os,
const label  index 
) const

Write shape at index.

Definition at line 231 of file octreeDataEdges.C.


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