Loading...
Searching...
No Matches
treeDataEdge Class Reference

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 pointFieldpoints () const noexcept
 The reference point field.
const edgeListedges () const noexcept
 The original list of edges.
const labelListedgeLabels () 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 edgeoperator[] (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< pointFieldcentres () 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 &centre, 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.

Detailed Description

Holds data for octree to work on an edges subset.

Source files

Definition at line 53 of file treeDataEdge.H.

Constructor & Destructor Documentation

◆ treeDataEdge() [1/8]

treeDataEdge ( const bool cacheBb,
const edgeList & edges,
const pointField & points )

Construct from all edges.

Note
Holds references to edges and points!

Definition at line 197 of file treeDataEdge.C.

References edges(), points(), and update().

Referenced by treeDataEdge::findNearestOp::operator()(), treeDataEdge(), treeDataEdge(), treeDataEdge(), and treeDataEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ treeDataEdge() [2/8]

treeDataEdge ( const bool cacheBb,
const edgeList & edges,
const pointField & points,
const labelRange & range )

Construct from range of edges.

Note
Holds references to edges and points!

Definition at line 214 of file treeDataEdge.C.

References edges(), Foam::identity(), points(), range, and update().

Here is the call graph for this function:

◆ treeDataEdge() [3/8]

treeDataEdge ( const bool cacheBb,
const edgeList & edges,
const pointField & points,
const labelUList & edgeLabels )

Construct from selected edges.

Note
Holds references to edges and points!

Definition at line 232 of file treeDataEdge.C.

References edgeLabels(), edges(), points(), and update().

Here is the call graph for this function:

◆ treeDataEdge() [4/8]

treeDataEdge ( const bool cacheBb,
const edgeList & edges,
const pointField & points,
labelList && edgeLabels )

Construct from selected edges, transferring contents.

Note
Holds references to edges and points!

Definition at line 250 of file treeDataEdge.C.

References edgeLabels(), edges(), points(), and update().

Here is the call graph for this function:

◆ treeDataEdge() [5/8]

treeDataEdge ( const edgeList & edges,
const pointField & points )
inline

Construct from all edges.

Note
Holds references to edges and points!

Definition at line 222 of file treeDataEdge.H.

References edges(), points(), and treeDataEdge().

Here is the call graph for this function:

◆ treeDataEdge() [6/8]

treeDataEdge ( const edgeList & edges,
const pointField & points,
const labelRange & range )
inline

Construct from range of edges.

Note
Holds references to edges and points!

Definition at line 232 of file treeDataEdge.H.

References edges(), points(), range, and treeDataEdge().

Here is the call graph for this function:

◆ treeDataEdge() [7/8]

treeDataEdge ( const edgeList & edges,
const pointField & points,
const labelUList & edgeLabels )
inline

Construct from selected edges.

Note
Holds references to edges and points!

Definition at line 247 of file treeDataEdge.H.

References edgeLabels(), edges(), points(), and treeDataEdge().

Here is the call graph for this function:

◆ treeDataEdge() [8/8]

treeDataEdge ( const edgeList & edges,
const pointField & points,
labelList && edgeLabels )
inline

Construct from selected edges, transferring contents.

Note
Holds references to edges and points!

Definition at line 262 of file treeDataEdge.H.

References edgeLabels(), edges(), points(), and treeDataEdge().

Here is the call graph for this function:

Member Function Documentation

◆ ClassNameNoDebug()

ClassNameNoDebug ( "treeDataEdge" )

References edgeLabels(), edges(), points(), and range.

Here is the call graph for this function:

◆ boxes() [1/3]

Foam::treeBoundBoxList boxes ( const edgeList & edges,
const pointField & points )
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().

Here is the call graph for this function:

◆ boxes() [2/3]

Foam::treeBoundBoxList boxes ( const edgeList & edges,
const pointField & points,
const labelRange & range )
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.

Here is the call graph for this function:

◆ boxes() [3/3]

Foam::treeBoundBoxList boxes ( const edgeList & edges,
const pointField & points,
const labelUList & edgeIds )
static

Calculate and return bounding boxes for specified edges.

Definition at line 124 of file treeDataEdge.C.

References Foam::boxesImpl(), edges(), and points().

Here is the call graph for this function:

◆ bounds() [1/4]

Foam::treeBoundBox bounds ( const edgeList & edges,
const pointField & 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bounds() [2/4]

Foam::treeBoundBox bounds ( const edgeList & edges,
const pointField & points,
const labelRange & range )
static

Return bounding box of specified range of edges.

Definition at line 154 of file treeDataEdge.C.

References Foam::boundsImpl(), edges(), points(), and range.

Here is the call graph for this function:

◆ bounds() [3/4]

Foam::treeBoundBox bounds ( const edgeList & edges,
const pointField & points,
const labelUList & edgeIds )
static

Return bounding box of specified edges.

Definition at line 166 of file treeDataEdge.C.

References Foam::boundsImpl(), edges(), and points().

Here is the call graph for this function:

◆ nDim()

int nDim ( ) const
inlinenoexcept

Object dimension == 1 (line element).

Definition at line 339 of file treeDataEdge.H.

References Foam::noexcept.

◆ bounds() [4/4]

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.

Here is the call graph for this function:

◆ points()

const pointField & points ( ) const
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().

Here is the caller graph for this function:

◆ edges()

const edgeList & edges ( ) const
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().

Here is the caller graph for this function:

◆ edgeLabels()

const labelList & edgeLabels ( ) const
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().

Here is the caller graph for this function:

◆ useSubset()

bool useSubset ( ) const
inlinenoexcept

Use a subset of edges.

Definition at line 367 of file treeDataEdge.H.

References Foam::noexcept.

◆ empty()

bool empty ( ) const
inlinenoexcept

Is the effective edge selection empty?

Definition at line 372 of file treeDataEdge.H.

References Foam::noexcept.

Referenced by refinementFeatures::findNearestEdge().

Here is the caller graph for this function:

◆ size()

label size ( ) const
inlinenoexcept

The size of edge selection.

Definition at line 380 of file treeDataEdge.H.

References Foam::noexcept.

◆ objectIndex()

label objectIndex ( const label index) const
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[]().

Here is the caller graph for this function:

◆ operator[]()

const edge & operator[] ( const label index) const
inline

Edge at specified shape index.

Definition at line 396 of file treeDataEdge.H.

References objectIndex().

Here is the call graph for this function:

◆ line()

const linePointRef line ( const label index) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ centre()

point centre ( const label index) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ centres()

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().

Here is the call graph for this function:

◆ getVolumeType()

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.

◆ overlaps() [1/2]

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().

Here is the call graph for this function:

◆ overlaps() [2/2]

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().

Here is the call graph for this function:

◆ findNearest()

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().

Here is the call graph for this function:

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