Holds data for octree to work on an edges subset. More...
#include <treeDataEdge.H>
Classes | |
| class | findNearestOp |
| Forward to treeDataEdge findNearest operations. More... | |
| class | findIntersectOp |
| Forward to treeDataEdge findIntersect operations. More... | |
Public Member Functions | |
| ClassNameNoDebug ("treeDataEdge") | |
| treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points) | |
| Construct from all edges. | |
| treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, const labelRange &range) | |
| Construct from range of edges. | |
| treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, const labelUList &edgeLabels) | |
| Construct from selected edges. | |
| treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, labelList &&edgeLabels) | |
| Construct from selected edges, transferring contents. | |
| treeDataEdge (const edgeList &edges, const pointField &points) | |
| Construct from all edges. | |
| treeDataEdge (const edgeList &edges, const pointField &points, const labelRange &range) | |
| Construct from range of edges. | |
| treeDataEdge (const edgeList &edges, const pointField &points, const labelUList &edgeLabels) | |
| Construct from selected edges. | |
| treeDataEdge (const edgeList &edges, const pointField &points, labelList &&edgeLabels) | |
| Construct from selected edges, transferring contents. | |
| int | nDim () const noexcept |
| Object dimension == 1 (line element). | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified edge indices. | |
| const pointField & | points () const noexcept |
| The reference point field. | |
| const edgeList & | edges () const noexcept |
| The original list of edges. | |
| const labelList & | edgeLabels () const noexcept |
| The subset of edge ids to use. | |
| bool | useSubset () const noexcept |
| Use a subset of edges. | |
| bool | empty () const noexcept |
| Is the effective edge selection empty? | |
| label | size () const noexcept |
| The size of edge selection. | |
| label | objectIndex (const label index) const |
| Map from shape index to original (non-subset) edge label. | |
| const edge & | operator[] (const label index) const |
| Edge at specified shape index. | |
| const linePointRef | line (const label index) const |
| Geometric line for edge at specified shape index. Frequently used. | |
| point | centre (const label index) const |
| Representative point (edge centre) at shape index. | |
| tmp< pointField > | centres () const |
| Representative point cloud for contained shapes. One point per shape, corresponding to the edge centres. | |
| volumeType | 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 &searchBox) const |
| Does (bb of) shape at index searchBox. | |
| bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
| Does (bb of) shape at index overlap bb. | |
| void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
| Calculates nearest (to sample) point in shape. | |
Static Public Member Functions | |
| static treeBoundBoxList | boxes (const edgeList &edges, const pointField &points) |
| Calculate and return bounding boxes for all edges. | |
| static treeBoundBoxList | boxes (const edgeList &edges, const pointField &points, const labelRange &range) |
| Calculate and return bounding boxes for specified range of edges. | |
| static treeBoundBoxList | boxes (const edgeList &edges, const pointField &points, const labelUList &edgeIds) |
| Calculate and return bounding boxes for specified edges. | |
| static treeBoundBox | bounds (const edgeList &edges, const pointField &points) |
| Return bounding box of all edges. | |
| static treeBoundBox | bounds (const edgeList &edges, const pointField &points, const labelRange &range) |
| Return bounding box of specified range of edges. | |
| static treeBoundBox | bounds (const edgeList &edges, const pointField &points, const labelUList &edgeIds) |
| Return bounding box of specified edges. | |
Holds data for octree to work on an edges subset.
Definition at line 53 of file treeDataEdge.H.
| treeDataEdge | ( | const bool | cacheBb, |
| const edgeList & | edges, | ||
| const pointField & | points ) |
Construct from all edges.
Definition at line 197 of file treeDataEdge.C.
References edges(), points(), and update().
Referenced by treeDataEdge::findNearestOp::operator()(), treeDataEdge(), treeDataEdge(), treeDataEdge(), and treeDataEdge().


| treeDataEdge | ( | const bool | cacheBb, |
| const edgeList & | edges, | ||
| const pointField & | points, | ||
| const labelRange & | range ) |
Construct from range of edges.
Definition at line 214 of file treeDataEdge.C.
References edges(), Foam::identity(), points(), range, and update().

| treeDataEdge | ( | const bool | cacheBb, |
| const edgeList & | edges, | ||
| const pointField & | points, | ||
| const labelUList & | edgeLabels ) |
Construct from selected edges.
Definition at line 232 of file treeDataEdge.C.
References edgeLabels(), edges(), points(), and update().

| treeDataEdge | ( | const bool | cacheBb, |
| const edgeList & | edges, | ||
| const pointField & | points, | ||
| labelList && | edgeLabels ) |
Construct from selected edges, transferring contents.
Definition at line 250 of file treeDataEdge.C.
References edgeLabels(), edges(), points(), and update().

|
inline |
Construct from all edges.
Definition at line 222 of file treeDataEdge.H.
References edges(), points(), and treeDataEdge().

|
inline |
Construct from range of edges.
Definition at line 232 of file treeDataEdge.H.
References edges(), points(), range, and treeDataEdge().

|
inline |
Construct from selected edges.
Definition at line 247 of file treeDataEdge.H.
References edgeLabels(), edges(), points(), and treeDataEdge().

|
inline |
Construct from selected edges, transferring contents.
Definition at line 262 of file treeDataEdge.H.
References edgeLabels(), edges(), points(), and treeDataEdge().

| ClassNameNoDebug | ( | "treeDataEdge" | ) |
|
static |
Calculate and return bounding boxes for all edges.
Definition at line 91 of file treeDataEdge.C.
References UList< T >::begin(), e, edges(), and points().

|
static |
Calculate and return bounding boxes for specified range of edges.
Definition at line 112 of file treeDataEdge.C.
References Foam::boxesImpl(), edges(), points(), and range.

|
static |
Calculate and return bounding boxes for specified edges.
Definition at line 124 of file treeDataEdge.C.
References Foam::boxesImpl(), edges(), and points().

|
static |
Return bounding box of all edges.
Definition at line 136 of file treeDataEdge.C.
References boundBox::add(), e, edges(), and points().
Referenced by bounds().


|
static |
Return bounding box of specified range of edges.
Definition at line 154 of file treeDataEdge.C.
References Foam::boundsImpl(), edges(), points(), and range.

|
static |
Return bounding box of specified edges.
Definition at line 166 of file treeDataEdge.C.
References Foam::boundsImpl(), edges(), and points().

|
inlinenoexcept |
Object dimension == 1 (line element).
Definition at line 339 of file treeDataEdge.H.
References Foam::noexcept.
| Foam::treeBoundBox bounds | ( | const labelUList & | indices | ) | const |
Return bounding box for the specified edge indices.
Definition at line 270 of file treeDataEdge.C.
References boundBox::add(), bounds(), and e.

|
inlinenoexcept |
The reference point field.
Definition at line 352 of file treeDataEdge.H.
References Foam::noexcept.
Referenced by bounds(), bounds(), bounds(), boxes(), boxes(), boxes(), ClassNameNoDebug(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), and treeDataEdge().

|
inlinenoexcept |
The original list of edges.
Definition at line 357 of file treeDataEdge.H.
References Foam::noexcept.
Referenced by bounds(), bounds(), bounds(), boxes(), boxes(), boxes(), ClassNameNoDebug(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), treeDataEdge(), and treeDataEdge().

|
inlinenoexcept |
The subset of edge ids to use.
Definition at line 362 of file treeDataEdge.H.
References Foam::noexcept.
Referenced by ClassNameNoDebug(), treeDataEdge(), treeDataEdge(), treeDataEdge(), and treeDataEdge().

|
inlinenoexcept |
|
inlinenoexcept |
Is the effective edge selection empty?
Definition at line 372 of file treeDataEdge.H.
References Foam::noexcept.
Referenced by refinementFeatures::findNearestEdge().

|
inlinenoexcept |
The size of edge selection.
Definition at line 380 of file treeDataEdge.H.
References Foam::noexcept.
|
inline |
Map from shape index to original (non-subset) edge label.
Definition at line 388 of file treeDataEdge.H.
Referenced by centre(), refinementFeatures::findNearestEdge(), refinementFeatures::findNearestRegionEdge(), line(), and operator[]().

|
inline |
Edge at specified shape index.
Definition at line 396 of file treeDataEdge.H.
References objectIndex().

|
inline |
Geometric line for edge at specified shape index. Frequently used.
Definition at line 404 of file treeDataEdge.H.
References line< Point, PointRef >::line(), and objectIndex().
Referenced by findNearest(), refinementFeatures::findNearestEdge(), refinementFeatures::findNearestRegionEdge(), treeDataEdge::findNearestOp::operator()(), overlaps(), and overlaps().


|
inline |
Representative point (edge centre) at shape index.
Definition at line 412 of file treeDataEdge.H.
References Vector< Cmpt >::centre(), and objectIndex().
Referenced by overlaps().


| Foam::tmp< Foam::pointField > centres | ( | ) | const |
Representative point cloud for contained shapes. One point per shape, corresponding to the edge centres.
Definition at line 290 of file treeDataEdge.C.
References e, tmp< T >::New(), and tmp< T >::ref().

| Foam::volumeType 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 323 of file treeDataEdge.C.
References volumeType::UNKNOWN.
| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox ) const |
Does (bb of) shape at index searchBox.
Definition at line 333 of file treeDataEdge.C.
References treeBoundBox::intersects(), and line().

| bool overlaps | ( | const label | index, |
| const point & | centre, | ||
| const scalar | radiusSqr ) const |
Does (bb of) shape at index overlap bb.
Definition at line 344 of file treeDataEdge.C.
References centre(), PointHit< PointType >::distance(), line(), and Foam::sqr().

| void findNearest | ( | const labelUList & | 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 375 of file treeDataEdge.C.
References PointHit< PointType >::distance(), line(), line< Point, PointRef >::nearestDist(), PointHit< PointType >::point(), and Foam::sqr().
