Data Structures | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
indexedOctree Class Reference

Non-pointer based hierarchical recursive searching. More...

Inheritance diagram for indexedOctree:
Inheritance graph
[legend]
Collaboration diagram for indexedOctree:
Collaboration graph
[legend]

Data Structures

class  node
 Tree node. Has up pointer and down pointers. More...
 

Public Member Functions

 indexedOctree (const Type &shapes)
 Construct null. More...
 
 indexedOctree (const Type &shapes, const List< node > &nodes, const labelListList &contents)
 Construct from components. More...
 
 indexedOctree (const Type &shapes, const treeBoundBox &bb, const label maxLevels, const scalar maxLeafRatio, const scalar maxDuplicity)
 Construct from shapes. More...
 
 indexedOctree (const Type &shapes, Istream &is)
 Construct from Istream. More...
 
autoPtr< indexedOctree< Type > > clone () const
 Clone. More...
 
const Type & shapes () const
 Reference to shape. More...
 
const List< node > & nodes () const
 List of all nodes. More...
 
const labelListListcontents () const
 List of all contents (referenced by those nodes that are. More...
 
const treeBoundBoxbb () const
 Top bounding box. More...
 
pointIndexHit findNearest (const point &sample, const scalar nearestDistSqr) const
 
template<class FindNearestOp >
pointIndexHit findNearest (const point &sample, const scalar nearestDistSqr, const FindNearestOp &fnOp) const
 Calculate nearest point on nearest shape. More...
 
template<class FindNearestOp >
void findNearest (const label nodeI, const point &, scalar &nearestDistSqr, label &nearestShapeI, point &nearestPoint, const FindNearestOp &fnOp) const
 Low level: calculate nearest starting from subnode. More...
 
pointIndexHit findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint) const
 Find nearest to line. More...
 
template<class FindNearestOp >
pointIndexHit findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint, const FindNearestOp &fnOp) const
 
pointIndexHit findLine (const point &start, const point &end) const
 Find nearest intersection of line between start and end. More...
 
pointIndexHit findLineAny (const point &start, const point &end) const
 Find any intersection of line between start and end. More...
 
template<class FindIntersectOp >
pointIndexHit findLine (const point &start, const point &end, const FindIntersectOp &fiOp) const
 Find nearest intersection of line between start and end. More...
 
template<class FindIntersectOp >
pointIndexHit findLineAny (const point &start, const point &end, const FindIntersectOp &fiOp) const
 Find any intersection of line between start and end. More...
 
labelList findBox (const treeBoundBox &bb) const
 Find (in no particular order) indices of all shapes inside or. More...
 
labelList findSphere (const point &centre, const scalar radiusSqr) const
 Find (in no particular order) indices of all shapes inside or. More...
 
labelBits findNode (const label nodeI, const point &) const
 Find deepest node (as parent+octant) containing point. Starts. More...
 
label findInside (const point &) const
 Find shape containing point. Only implemented for certain. More...
 
const labelListfindIndices (const point &) const
 Find the shape indices that occupy the result of findNode. More...
 
volumeType getVolumeType (const point &) const
 Determine type (inside/outside/mixed) for point. unknown if. More...
 
template<class CompareOp >
void findNear (const scalar nearDist, const indexedOctree< Type > &tree2, CompareOp &cop) const
 Find near pairs and apply CompareOp to them. More...
 
void print (prefixOSstream &, const bool printContents, const label) const
 Print tree. Either print all indices (printContent = true) or. More...
 
bool write (Ostream &os) const
 
template<class FindIntersectOp >
Foam::pointIndexHit findLine (const bool findAny, const point &treeStart, const point &treeEnd, const label startNodeI, const direction startOctant, const FindIntersectOp &fiOp, const bool verbose) const
 
template<class FindIntersectOp >
Foam::pointIndexHit findLine (const bool findAny, const point &start, const point &end, const FindIntersectOp &fiOp) const
 
template<class Type >
Foam::pointIndexHit findNearest (const point &sample, const scalar startDistSqr) const
 
template<class FindNearestOp >
Foam::pointIndexHit findNearest (const point &sample, const scalar startDistSqr, const FindNearestOp &fnOp) const
 
template<class Type >
Foam::pointIndexHit findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint) const
 
template<class FindNearestOp >
Foam::pointIndexHit findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint, const FindNearestOp &fnOp) const
 
template<class Type >
Foam::pointIndexHit findLine (const point &start, const point &end) const
 
template<class Type >
Foam::pointIndexHit findLineAny (const point &start, const point &end) const
 
template<class FindIntersectOp >
Foam::pointIndexHit findLine (const point &start, const point &end, const FindIntersectOp &fiOp) const
 
template<class FindIntersectOp >
Foam::pointIndexHit findLineAny (const point &start, const point &end, const FindIntersectOp &fiOp) const
 

Static Public Member Functions

static scalar & perturbTol ()
 Get the perturbation tolerance. More...
 
static bool isContent (const labelBits i)
 
static bool isEmpty (const labelBits i)
 
static bool isNode (const labelBits i)
 
static label getContent (const labelBits i)
 
static label getNode (const labelBits i)
 
static direction getOctant (const labelBits i)
 
static volumeType getSide (const vector &outsideNormal, const vector &vec)
 Helper function to return the side. Returns outside if. More...
 
static bool overlaps (const point &bbMin, const point &bbMax, const scalar nearestDistSqr, const point &sample)
 Helper: does bb intersect a sphere around sample? Or is any. More...
 

Private Member Functions

void divide (const labelList &indices, const treeBoundBox &bb, labelListList &result) const
 Split list of indices into 8 bins. More...
 
node divide (const treeBoundBox &bb, DynamicList< labelList > &contents, const label contentI) const
 Subdivide the contents node at position contentI. More...
 
void splitNodes (const label minSize, DynamicList< node > &nodes, DynamicList< labelList > &contents) const
 Split any contents node with more than minSize elements. More...
 
volumeType calcVolumeType (const label nodeI) const
 Determine inside/outside per node (mixed if cannot be. More...
 
volumeType getVolumeType (const label nodeI, const point &) const
 Search cached volume type. More...
 
template<class FindNearestOp >
void findNearest (const label nodeI, const linePointRef &ln, treeBoundBox &tightest, label &nearestShapeI, point &linePoint, point &nearestPoint, const FindNearestOp &fnOp) const
 Find nearest point to line. More...
 
treeBoundBox subBbox (const label parentNodeI, const direction octant) const
 Return bbox of octant. More...
 
bool walkToParent (const label nodeI, const direction octant, label &parentNodeI, label &parentOctant) const
 Walk to parent of node+octant. More...
 
bool walkToNeighbour (const point &facePoint, const direction faceID, label &nodeI, direction &octant) const
 Walk tree to neighbouring node. Return false if edge of tree. More...
 
template<class FindIntersectOp >
void traverseNode (const bool findAny, const point &treeStart, const vector &treeVec, const point &start, const point &end, const label nodeI, const direction octantI, pointIndexHit &hitInfo, direction &faceID, const FindIntersectOp &fiOp) const
 Traverse a node. If intersects a triangle return first. More...
 
template<class FindIntersectOp >
pointIndexHit findLine (const bool findAny, const point &treeStart, const point &treeEnd, const label startNodeI, const direction startOctantI, const FindIntersectOp &fiOp, const bool verbose=false) const
 Find any or nearest intersection. More...
 
template<class FindIntersectOp >
pointIndexHit findLine (const bool findAny, const point &start, const point &end, const FindIntersectOp &fiOp) const
 Find any or nearest intersection of line between start and end. More...
 
void findBox (const label nodeI, const treeBoundBox &searchBox, labelHashSet &elements) const
 Find all elements intersecting box. More...
 
void findSphere (const label nodeI, const point &centre, const scalar radiusSqr, labelHashSet &elements) const
 Find all elements intersecting sphere. More...
 
label countElements (const labelBits index) const
 Count number of elements on this and sublevels. More...
 
void writeOBJ (const label nodeI, const direction octant) const
 Dump node+octant to an obj file. More...
 

Static Private Member Functions

static bool overlaps (const treeBoundBox &parentBb, const direction octant, const scalar nearestDistSqr, const point &sample)
 Helper: does bb intersect a sphere around sample? Or is any. More...
 
static label compactContents (DynamicList< node > &nodes, DynamicList< labelList > &contents, const label compactLevel, const label nodeI, const label level, List< labelList > &compactedContents, label &compactI)
 
static point pushPoint (const treeBoundBox &, const point &, const bool pushInside)
 Helper: take a point on/close to face of bb and push it. More...
 
static point pushPoint (const treeBoundBox &, const direction, const point &, const bool pushInside)
 Helper: take a point on face of bb and push it. More...
 
static point pushPointIntoFace (const treeBoundBox &bb, const vector &dir, const point &pt)
 Helper: take point on face(s) of bb and push it away from. More...
 
static word faceString (const direction faceID)
 Debug: return verbose the bounding box faces. More...
 
template<class CompareOp >
static void findNear (const scalar nearDist, const bool okOrder, const indexedOctree< Type > &tree1, const labelBits index1, const treeBoundBox &bb1, const indexedOctree< Type > &tree2, const labelBits index2, const treeBoundBox &bb2, CompareOp &cop)
 
static labelBits contentPlusOctant (const label i, const direction octant)
 From index into contents_ to subNodes_ entry. More...
 
static labelBits nodePlusOctant (const label i, const direction octant)
 From index into nodes_ to subNodes_ entry. More...
 
static labelBits emptyPlusOctant (const direction octant)
 From empty to subNodes_ entry. More...
 

Private Attributes

const Type shapes_
 Underlying shapes for geometric queries. More...
 
List< nodenodes_
 List of all nodes. More...
 
labelListList contents_
 List of all contents (referenced by those nodes that are contents) More...
 
PackedList< 2 > nodeTypes_
 Per node per octant whether is fully inside/outside/mixed. More...
 

Static Private Attributes

static scalar perturbTol_ = 10*SMALL
 Relative peturbation tolerance. Determines when point is. More...
 

Friends

Ostreamoperator (Ostream &, const indexedOctree< Type > &)
 

Detailed Description

Non-pointer based hierarchical recursive searching.

Source files

Definition at line 47 of file treeDataTriSurface.H.

Constructor & Destructor Documentation

◆ indexedOctree() [1/4]

indexedOctree ( const Type &  shapes)

Construct null.

Definition at line 2345 of file indexedOctree.C.

◆ indexedOctree() [2/4]

indexedOctree ( const Type &  shapes,
const List< node > &  nodes,
const labelListList contents 
)

Construct from components.

Definition at line 2356 of file indexedOctree.C.

◆ indexedOctree() [3/4]

indexedOctree ( const Type &  shapes,
const treeBoundBox bb,
const label  maxLevels,
const scalar  maxLeafRatio,
const scalar  maxDuplicity 
)

Construct from shapes.

Definition at line 2371 of file indexedOctree.C.

◆ indexedOctree() [4/4]

indexedOctree ( const Type &  shapes,
Istream is 
)

Construct from Istream.

Definition at line 2535 of file indexedOctree.C.

Member Function Documentation

◆ overlaps() [1/2]

bool overlaps ( const treeBoundBox parentBb,
const direction  octant,
const scalar  nearestDistSqr,
const point sample 
)
staticprivate

Helper: does bb intersect a sphere around sample? Or is any.

corner point of bb closer than nearestDistSqr to sample. (bb is implicitly provided as parent bb + octant)

Accelerated version of

treeBoundBox subBb(parentBb.subBbox(mid, octant)) overlaps ( subBb.min(), subBb.max(), nearestDistSqr, sample )

Definition at line 61 of file indexedOctree.C.

◆ divide() [1/2]

void divide ( const labelList indices,
const treeBoundBox bb,
labelListList result 
) const
private

Split list of indices into 8 bins.

according to where they are in relation to mid.

Definition at line 124 of file indexedOctree.C.

◆ divide() [2/2]

Foam::indexedOctree< Type >::node divide ( const treeBoundBox bb,
DynamicList< labelList > &  contents,
const label  contentI 
) const
private

Subdivide the contents node at position contentI.

Appends to contents.

Definition at line 168 of file indexedOctree.C.

◆ splitNodes()

void splitNodes ( const label  minSize,
DynamicList< node > &  nodes,
DynamicList< labelList > &  contents 
) const
private

Split any contents node with more than minSize elements.

Definition at line 240 of file indexedOctree.C.

◆ compactContents()

Foam::label compactContents ( DynamicList< node > &  nodes,
DynamicList< labelList > &  contents,
const label  compactLevel,
const label  nodeI,
const label  level,
List< labelList > &  compactedContents,
label compactI 
)
staticprivate

Definition at line 294 of file indexedOctree.C.

◆ calcVolumeType()

Foam::volumeType calcVolumeType ( const label  nodeI) const
private

Determine inside/outside per node (mixed if cannot be.

determined). Only valid for closed shapes.

Definition at line 364 of file indexedOctree.C.

◆ getVolumeType() [1/2]

volumeType getVolumeType ( const label  nodeI,
const point  
) const
private

Search cached volume type.

◆ findNearest() [1/10]

void findNearest ( const label  nodeI,
const linePointRef ln,
treeBoundBox tightest,
label nearestShapeI,
point linePoint,
point nearestPoint,
const FindNearestOp &  fnOp 
) const
private

◆ subBbox()

Foam::treeBoundBox subBbox ( const label  parentNodeI,
const direction  octant 
) const
private

Return bbox of octant.

Definition at line 660 of file indexedOctree.C.

◆ pushPoint() [1/2]

static point pushPoint ( const treeBoundBox ,
const point ,
const bool  pushInside 
)
staticprivate

Helper: take a point on/close to face of bb and push it.

inside or outside of bb.

◆ pushPoint() [2/2]

static point pushPoint ( const treeBoundBox ,
const  direction,
const point ,
const bool  pushInside 
)
staticprivate

Helper: take a point on face of bb and push it.

inside or outside of bb.

◆ pushPointIntoFace()

Foam::point pushPointIntoFace ( const treeBoundBox bb,
const vector dir,
const point pt 
)
staticprivate

Helper: take point on face(s) of bb and push it away from.

edges of face.

Definition at line 870 of file indexedOctree.C.

◆ walkToParent()

bool walkToParent ( const label  nodeI,
const direction  octant,
label parentNodeI,
label parentOctant 
) const
private

Walk to parent of node+octant.

Definition at line 1226 of file indexedOctree.C.

◆ walkToNeighbour()

bool walkToNeighbour ( const point facePoint,
const direction  faceID,
label nodeI,
direction octant 
) const
private

Walk tree to neighbouring node. Return false if edge of tree.

hit.

Definition at line 1276 of file indexedOctree.C.

◆ faceString()

Foam::word faceString ( const direction  faceID)
staticprivate

Debug: return verbose the bounding box faces.

Definition at line 1514 of file indexedOctree.C.

◆ traverseNode()

void traverseNode ( const bool  findAny,
const point treeStart,
const vector treeVec,
const point start,
const point end,
const label  nodeI,
const direction  octantI,
pointIndexHit hitInfo,
direction faceID,
const FindIntersectOp &  fiOp 
) const
private

Traverse a node. If intersects a triangle return first.

intersection point. findAny=true : return any intersection findAny=false: return nearest (to start) intersection

Definition at line 1567 of file indexedOctree.C.

◆ findLine() [1/8]

pointIndexHit findLine ( const bool  findAny,
const point treeStart,
const point treeEnd,
const label  startNodeI,
const direction  startOctantI,
const FindIntersectOp &  fiOp,
const bool  verbose = false 
) const
private

Find any or nearest intersection.

Referenced by triSurfaceSearch::findLine(), distributedTriSurfaceMesh::findLine(), triSurfaceSearch::findLineAll(), and cellClassification::markFaces().

Here is the caller graph for this function:

◆ findLine() [2/8]

pointIndexHit findLine ( const bool  findAny,
const point start,
const point end,
const FindIntersectOp &  fiOp 
) const
private

Find any or nearest intersection of line between start and end.

◆ findBox() [1/2]

void findBox ( const label  nodeI,
const treeBoundBox searchBox,
labelHashSet elements 
) const
private

Find all elements intersecting box.

Definition at line 1994 of file indexedOctree.C.

Referenced by InteractionLists< typename CloudType::parcelType >::buildInteractionLists(), main(), tetOverlapVolume::overlappingCells(), and triSurfaceMesh::overlaps().

Here is the caller graph for this function:

◆ findSphere() [1/2]

void findSphere ( const label  nodeI,
const point centre,
const scalar  radiusSqr,
labelHashSet elements 
) const
private

Find all elements intersecting sphere.

Definition at line 2041 of file indexedOctree.C.

Referenced by main().

Here is the caller graph for this function:

◆ findNear() [1/2]

void findNear ( const scalar  nearDist,
const bool  okOrder,
const indexedOctree< Type > &  tree1,
const labelBits  index1,
const treeBoundBox bb1,
const indexedOctree< Type > &  tree2,
const labelBits  index2,
const treeBoundBox bb2,
CompareOp &  cop 
)
staticprivate

Definition at line 2090 of file indexedOctree.C.

◆ countElements()

Foam::label countElements ( const labelBits  index) const
private

Count number of elements on this and sublevels.

Definition at line 2264 of file indexedOctree.C.

◆ writeOBJ()

void writeOBJ ( const label  nodeI,
const direction  octant 
) const
private

Dump node+octant to an obj file.

Definition at line 2297 of file indexedOctree.C.

◆ contentPlusOctant()

static labelBits contentPlusOctant ( const label  i,
const direction  octant 
)
inlinestaticprivate

From index into contents_ to subNodes_ entry.

Definition at line 375 of file indexedOctree.H.

◆ nodePlusOctant()

static labelBits nodePlusOctant ( const label  i,
const direction  octant 
)
inlinestaticprivate

From index into nodes_ to subNodes_ entry.

Definition at line 385 of file indexedOctree.H.

◆ emptyPlusOctant()

static labelBits emptyPlusOctant ( const direction  octant)
inlinestaticprivate

From empty to subNodes_ entry.

Definition at line 395 of file indexedOctree.H.

◆ perturbTol()

Foam::scalar & perturbTol ( )
static

◆ clone()

autoPtr<indexedOctree<Type> > clone ( ) const
inline

Clone.

Definition at line 436 of file indexedOctree.H.

◆ shapes()

const Type& shapes ( ) const
inline

◆ nodes()

const List<node>& nodes ( ) const
inline

List of all nodes.

Definition at line 455 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::findNear(), and meshRefinement::markSmallFeatureRefinement().

Here is the caller graph for this function:

◆ contents()

const labelListList& contents ( ) const
inline

List of all contents (referenced by those nodes that are.

contents)

Definition at line 462 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::findNear().

Here is the caller graph for this function:

◆ bb()

const treeBoundBox& bb ( ) const
inline

◆ isContent()

static bool isContent ( const labelBits  i)
inlinestatic

Definition at line 481 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::findNear(), and indexedOctree< Foam::treeDataFace >::getContent().

Here is the caller graph for this function:

◆ isEmpty()

static bool isEmpty ( const labelBits  i)
inlinestatic

Definition at line 486 of file indexedOctree.H.

◆ isNode()

static bool isNode ( const labelBits  i)
inlinestatic

Definition at line 491 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::findNear(), and indexedOctree< Foam::treeDataFace >::getNode().

Here is the caller graph for this function:

◆ getContent()

static label getContent ( const labelBits  i)
inlinestatic

Definition at line 496 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::findNear().

Here is the caller graph for this function:

◆ getNode()

static label getNode ( const labelBits  i)
inlinestatic

Definition at line 506 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::findNear().

Here is the caller graph for this function:

◆ getOctant()

static direction getOctant ( const labelBits  i)
inlinestatic

Definition at line 516 of file indexedOctree.H.

◆ findNearest() [2/10]

pointIndexHit findNearest ( const point sample,
const scalar  nearestDistSqr 
) const

◆ findNearest() [3/10]

pointIndexHit findNearest ( const point sample,
const scalar  nearestDistSqr,
const FindNearestOp &  fnOp 
) const

Calculate nearest point on nearest shape.

Returns

  • bool : any point found nearer than nearestDistSqr
  • label: index in shapes
  • point: actual nearest point found

◆ findNearest() [4/10]

void findNearest ( const label  nodeI,
const point sample,
scalar &  nearestDistSqr,
label nearestShapeI,
point nearestPoint,
const FindNearestOp &  fnOp 
) const

Low level: calculate nearest starting from subnode.

Definition at line 513 of file indexedOctree.C.

◆ findNearest() [5/10]

pointIndexHit findNearest ( const linePointRef ln,
treeBoundBox tightest,
point linePoint 
) const

Find nearest to line.

Returns

  • bool : any point found?
  • label: index in shapes
  • point: actual nearest point found sets:
  • linePoint : corresponding nearest point on line

◆ findNearest() [6/10]

pointIndexHit findNearest ( const linePointRef ln,
treeBoundBox tightest,
point linePoint,
const FindNearestOp &  fnOp 
) const

◆ findLine() [3/8]

pointIndexHit findLine ( const point start,
const point end 
) const

Find nearest intersection of line between start and end.

◆ findLineAny() [1/4]

pointIndexHit findLineAny ( const point start,
const point end 
) const

Find any intersection of line between start and end.

Referenced by distributedTriSurfaceMesh::findLine(), and triSurfaceSearch::findLineAny().

Here is the caller graph for this function:

◆ findLine() [4/8]

pointIndexHit findLine ( const point start,
const point end,
const FindIntersectOp &  fiOp 
) const

Find nearest intersection of line between start and end.

◆ findLineAny() [2/4]

pointIndexHit findLineAny ( const point start,
const point end,
const FindIntersectOp &  fiOp 
) const

Find any intersection of line between start and end.

◆ findBox() [2/2]

labelList findBox ( const treeBoundBox bb) const

Find (in no particular order) indices of all shapes inside or.

overlapping bounding box (i.e. all shapes not outside box)

◆ findSphere() [2/2]

Foam::labelList findSphere ( const point centre,
const scalar  radiusSqr 
) const

Find (in no particular order) indices of all shapes inside or.

overlapping a bounding sphere (i.e. all shapes not outside sphere)

Definition at line 2762 of file indexedOctree.C.

◆ findNode()

Foam::labelBits findNode ( const label  nodeI,
const point sample 
) const

Find deepest node (as parent+octant) containing point. Starts.

off from starting index in nodes_ (use 0 to start from top) Use getNode and getOctant to extract info, or call findIndices.

Definition at line 2782 of file indexedOctree.C.

◆ findInside()

Foam::label findInside ( const point sample) const

Find shape containing point. Only implemented for certain.

shapes.

Definition at line 2828 of file indexedOctree.C.

Referenced by meshToMesh0::cellAddresses(), mappedPatchBase::findSamples(), main(), meshRefinement::markSmallFeatureRefinement(), and sampledTriSurfaceMesh::update().

Here is the caller graph for this function:

◆ findIndices()

const Foam::labelList & findIndices ( const point sample) const

Find the shape indices that occupy the result of findNode.

Definition at line 2858 of file indexedOctree.C.

Referenced by polyMesh::findCellFacePt(), and main().

Here is the caller graph for this function:

◆ getVolumeType() [2/2]

volumeType getVolumeType ( const point ) const

Determine type (inside/outside/mixed) for point. unknown if.

cannot be determined (e.g. non-manifold surface)

◆ getSide()

Foam::volumeType getSide ( const vector outsideNormal,
const vector vec 
)
static

Helper function to return the side. Returns outside if.

outsideNormal&vec >= 0, inside otherwise

Definition at line 487 of file indexedOctree.C.

Referenced by treeDataFace::getVolumeType().

Here is the caller graph for this function:

◆ overlaps() [2/2]

static bool overlaps ( const point bbMin,
const point bbMax,
const scalar  nearestDistSqr,
const point sample 
)
static

Helper: does bb intersect a sphere around sample? Or is any.

corner point of bb closer than nearestDistSqr to sample.

◆ findNear() [2/2]

void findNear ( const scalar  nearDist,
const indexedOctree< Type > &  tree2,
CompareOp &  cop 
) const

Find near pairs and apply CompareOp to them.

tree2 can be *this or different tree.

Definition at line 2960 of file indexedOctree.C.

◆ print()

void print ( prefixOSstream os,
const bool  printContents,
const label  nodeI 
) const

Print tree. Either print all indices (printContent = true) or.

just size of contents nodes.

Definition at line 2984 of file indexedOctree.C.

Referenced by meshToMesh0::calcAddressing().

Here is the caller graph for this function:

◆ write()

bool write ( Ostream os) const

Definition at line 3057 of file indexedOctree.C.

◆ findLine() [5/8]

Foam::pointIndexHit findLine ( const bool  findAny,
const point treeStart,
const point treeEnd,
const label  startNodeI,
const direction  startOctant,
const FindIntersectOp &  fiOp,
const bool  verbose 
) const

Definition at line 1728 of file indexedOctree.C.

◆ findLine() [6/8]

Foam::pointIndexHit findLine ( const bool  findAny,
const point start,
const point end,
const FindIntersectOp &  fiOp 
) const

Definition at line 1921 of file indexedOctree.C.

◆ findNearest() [7/10]

Foam::pointIndexHit findNearest ( const point sample,
const scalar  startDistSqr 
) const

Definition at line 2579 of file indexedOctree.C.

◆ findNearest() [8/10]

Foam::pointIndexHit findNearest ( const point sample,
const scalar  startDistSqr,
const FindNearestOp &  fnOp 
) const

Definition at line 2596 of file indexedOctree.C.

◆ findNearest() [9/10]

Foam::pointIndexHit findNearest ( const linePointRef ln,
treeBoundBox tightest,
point linePoint 
) const

Definition at line 2628 of file indexedOctree.C.

◆ findNearest() [10/10]

Foam::pointIndexHit findNearest ( const linePointRef ln,
treeBoundBox tightest,
point linePoint,
const FindNearestOp &  fnOp 
) const

Definition at line 2647 of file indexedOctree.C.

◆ findLine() [7/8]

Foam::pointIndexHit findLine ( const point start,
const point end 
) const

Definition at line 2681 of file indexedOctree.C.

◆ findLineAny() [3/4]

Foam::pointIndexHit findLineAny ( const point start,
const point end 
) const

Definition at line 2699 of file indexedOctree.C.

◆ findLine() [8/8]

Foam::pointIndexHit findLine ( const point start,
const point end,
const FindIntersectOp &  fiOp 
) const

Definition at line 2718 of file indexedOctree.C.

◆ findLineAny() [4/4]

Foam::pointIndexHit findLineAny ( const point start,
const point end,
const FindIntersectOp &  fiOp 
) const

Definition at line 2732 of file indexedOctree.C.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const indexedOctree< Type > &   
)
friend

Field Documentation

◆ perturbTol_

Foam::scalar perturbTol_ = 10*SMALL
staticprivate

Relative peturbation tolerance. Determines when point is.

considered to be close to face/edge of bb of node. The tolerance is relative to the bounding box of the smallest node.

Definition at line 125 of file indexedOctree.H.

◆ shapes_

const Type shapes_
private

Underlying shapes for geometric queries.

Definition at line 131 of file indexedOctree.H.

Referenced by indexedOctree< Foam::treeDataFace >::shapes().

◆ nodes_

List<node> nodes_
private

◆ contents_

labelListList contents_
private

List of all contents (referenced by those nodes that are contents)

Definition at line 137 of file indexedOctree.H.

◆ nodeTypes_

PackedList<2> nodeTypes_
mutableprivate

Per node per octant whether is fully inside/outside/mixed.

Definition at line 140 of file indexedOctree.H.


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