Holds data for octree to work on an edges subset. More...
#include <meshTools/treeDataEdge.H>
Holds data for octree to work on an edges subset.
Definition at line 53 of file treeDataEdge.H.
Collaboration diagram for treeDataEdge: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.
| |
| 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.
| 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 |
Calculates nearest (to line) point in shape.
Returns point and distance (squared)
Definition at line 155 of file treeDataEdge.C.
References dist, line< Point, PointRef >::end(), forAll, edge::line(), Foam::magSqr(), Foam::max(), boundBox::max(), Foam::min(), boundBox::min(), line< Point, PointRef >::nearestDist(), Foam::sqr(), line< Point, PointRef >::start(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
| 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.