Holds data for octree to work on an edges subset. More...
Classes | |
class | findIntersectOp |
Forward to treeDataEdge findIntersect operations. More... | |
class | findNearestOp |
Forward to treeDataEdge findNearest operations. More... | |
Public Member Functions | |
ClassNameNoDebug ("treeDataEdge") | |
treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points) | |
Construct from all edges. More... | |
treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, const labelRange &range) | |
Construct from range of edges. More... | |
treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, const labelUList &edgeLabels) | |
Construct from selected edges. More... | |
treeDataEdge (const bool cacheBb, const edgeList &edges, const pointField &points, labelList &&edgeLabels) | |
Construct from selected edges, transferring contents. More... | |
treeDataEdge (const edgeList &edges, const pointField &points) | |
Construct from all edges. More... | |
treeDataEdge (const edgeList &edges, const pointField &points, const labelRange &range) | |
Construct from range of edges. More... | |
treeDataEdge (const edgeList &edges, const pointField &points, const labelUList &edgeLabels) | |
Construct from selected edges. More... | |
treeDataEdge (const edgeList &edges, const pointField &points, labelList &&edgeLabels) | |
Construct from selected edges, transferring contents. More... | |
int | nDim () const noexcept |
Object dimension == 1 (line element) More... | |
treeBoundBox | bounds (const labelUList &indices) const |
Return bounding box for the specified edge indices. More... | |
const pointField & | points () const noexcept |
The reference point field. More... | |
const edgeList & | edges () const noexcept |
The original list of edges. More... | |
const labelList & | edgeLabels () const noexcept |
The subset of edge ids to use. More... | |
bool | useSubset () const noexcept |
Use a subset of edges. More... | |
bool | empty () const noexcept |
Is the effective edge selection empty? More... | |
label | size () const noexcept |
The size of edge selection. More... | |
label | objectIndex (const label index) const |
Map from shape index to original (non-subset) edge label. More... | |
const edge & | operator[] (const label index) const |
Edge at specified shape index. More... | |
const linePointRef | line (const label index) const |
Geometric line for edge at specified shape index. Frequently used. More... | |
point | centre (const label index) const |
Representative point (edge centre) at shape index. More... | |
tmp< pointField > | centres () const |
Representative point cloud for contained shapes. One point per shape, corresponding to the edge centres. More... | |
volumeType | getVolumeType (const indexedOctree< treeDataEdge > &, const point &) const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface. More... | |
bool | overlaps (const label index, const treeBoundBox &searchBox) const |
Does (bb of) shape at index searchBox. More... | |
bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
Does (bb of) shape at index overlap bb. More... | |
void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
Calculates nearest (to sample) point in shape. More... | |
Static Public Member Functions | |
static treeBoundBoxList | boxes (const edgeList &edges, const pointField &points) |
Calculate and return bounding boxes for all edges. More... | |
static treeBoundBoxList | boxes (const edgeList &edges, const pointField &points, const labelRange &range) |
Calculate and return bounding boxes for specified range of edges. More... | |
static treeBoundBoxList | boxes (const edgeList &edges, const pointField &points, const labelUList &edgeIds) |
Calculate and return bounding boxes for specified edges. More... | |
static treeBoundBox | bounds (const edgeList &edges, const pointField &points) |
Return bounding box of all edges. More... | |
static treeBoundBox | bounds (const edgeList &edges, const pointField &points, const labelRange &range) |
Return bounding box of specified range of edges. More... | |
static treeBoundBox | bounds (const edgeList &edges, const pointField &points, const labelUList &edgeIds) |
Return bounding box of specified edges. More... | |
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.
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.
|
inline |
Construct from all edges.
Definition at line 222 of file treeDataEdge.H.
|
inline |
Construct from range of edges.
Definition at line 233 of file treeDataEdge.H.
|
inline |
Construct from selected edges.
Definition at line 248 of file treeDataEdge.H.
|
inline |
Construct from selected edges, transferring contents.
Definition at line 263 of file treeDataEdge.H.
ClassNameNoDebug | ( | "treeDataEdge" | ) |
|
static |
Calculate and return bounding boxes for all edges.
|
static |
Calculate and return bounding boxes for specified range of edges.
|
static |
Calculate and return bounding boxes for specified edges.
|
static |
Return bounding box of all edges.
Referenced by treeDataEdge::bounds().
|
static |
Return bounding box of specified range of edges.
|
static |
Return bounding box of specified edges.
|
inlinenoexcept |
Object dimension == 1 (line element)
Definition at line 339 of file treeDataEdge.H.
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(), treeDataEdge::bounds(), and Foam::constant::electromagnetic::e.
|
inlinenoexcept |
The reference point field.
Definition at line 352 of file treeDataEdge.H.
|
inlinenoexcept |
The original list of edges.
Definition at line 357 of file treeDataEdge.H.
|
inlinenoexcept |
The subset of edge ids to use.
Definition at line 362 of file treeDataEdge.H.
|
inlinenoexcept |
Use a subset of edges.
Definition at line 367 of file treeDataEdge.H.
|
inlinenoexcept |
Is the effective edge selection empty?
Definition at line 372 of file treeDataEdge.H.
References UList< T >::empty().
Referenced by refinementFeatures::findNearestEdge().
|
inlinenoexcept |
The size of edge selection.
Definition at line 380 of file treeDataEdge.H.
References UList< T >::size().
|
inline |
Map from shape index to original (non-subset) edge label.
Definition at line 388 of file treeDataEdge.H.
Referenced by treeDataEdge::centre(), refinementFeatures::findNearestEdge(), refinementFeatures::findNearestRegionEdge(), treeDataEdge::line(), surfaceFeatures::nearestEdges(), and treeDataEdge::operator[]().
|
inline |
Edge at specified shape index.
Definition at line 396 of file treeDataEdge.H.
References treeDataEdge::objectIndex().
|
inline |
Geometric line for edge at specified shape index. Frequently used.
Definition at line 404 of file treeDataEdge.H.
References treeDataEdge::objectIndex().
Referenced by refinementFeatures::findNearestEdge(), refinementFeatures::findNearestRegionEdge(), and treeDataEdge::findNearestOp::operator()().
|
inline |
Representative point (edge centre) at shape index.
Definition at line 412 of file treeDataEdge.H.
References treeDataEdge::objectIndex().
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 UList< T >::begin(), Foam::constant::electromagnetic::e, tmp< T >::New(), tmp< T >::ref(), and Foam::transform().
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 324 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 334 of file treeDataEdge.C.
References treeBoundBox::intersects().
bool overlaps | ( | const label | index, |
const point & | centre, | ||
const scalar | radiusSqr | ||
) | const |
Does (bb of) shape at index overlap bb.
Definition at line 345 of file treeDataEdge.C.
References PointHit< PointType >::distance(), line< Point, PointRef >::nearestDist(), 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 376 of file treeDataEdge.C.
References PointHit< PointType >::distance(), line< Point, PointRef >::nearestDist(), PointHit< PointType >::point(), and Foam::sqr().