indexedOctreeBase Class Reference

Template invariant parts for indexedOctree. More...

Inheritance diagram for indexedOctreeBase:

Classes

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

Public Member Functions

 ClassName ("indexedOctree")
 Runtime type information. More...
 
 indexedOctreeBase ()=default
 Default construct. More...
 

Static Public Member Functions

static bool isEmpty (labelBits i) noexcept
 An empty node - no content. More...
 
static bool isContent (labelBits i) noexcept
 Node with content (leaf) More...
 
static bool isNode (labelBits i) noexcept
 A parent node. More...
 
static label getContent (labelBits i)
 Return real (dereferenced) index for a content node. More...
 
static label getNode (const labelBits i)
 Return real (dereferenced) index for a parent node. More...
 
static direction getOctant (labelBits i) noexcept
 Return sub-node direction/octant. More...
 
static scalar & perturbTol () noexcept
 Get the perturbation tolerance. More...
 
static scalar perturbTol (scalar tol) noexcept
 Set the perturbation tolerance, return the old value. More...
 
static void writeOBJ (Ostream &os, const treeBoundBox &bb, label &vertIndex, const bool writeLinesOnly=false)
 Write treeBoundBox in OBJ format. More...
 

Static Protected Member Functions

static labelBits emptyPlusOctant (direction octant)
 From empty to subNodes_ entry. More...
 
static labelBits contentPlusOctant (label i, direction octant)
 From index into contents_ to subNodes_ entry. More...
 
static labelBits nodePlusOctant (label i, direction octant)
 From index into nodes_ to subNodes_ entry. More...
 

Static Protected Attributes

static scalar perturbTol_ = 10*SMALL
 Relative perturbation tolerance. More...
 

Detailed Description

Template invariant parts for indexedOctree.

The internal node bookkeeping is encoded follows:

  • 0: empty
  • +ve: parent
  • -ve: leaf

Definition at line 67 of file indexedOctree.H.

Constructor & Destructor Documentation

◆ indexedOctreeBase()

indexedOctreeBase ( )
default

Default construct.

Member Function Documentation

◆ isEmpty()

static bool isEmpty ( labelBits  i)
inlinestaticnoexcept

An empty node - no content.

Definition at line 139 of file indexedOctree.H.

◆ isContent()

static bool isContent ( labelBits  i)
inlinestaticnoexcept

Node with content (leaf)

Definition at line 147 of file indexedOctree.H.

Referenced by indexedOctreeBase::getContent().

Here is the caller graph for this function:

◆ isNode()

static bool isNode ( labelBits  i)
inlinestaticnoexcept

A parent node.

Definition at line 155 of file indexedOctree.H.

Referenced by indexedOctreeBase::getNode().

Here is the caller graph for this function:

◆ getContent()

static label getContent ( labelBits  i)
inlinestatic

Return real (dereferenced) index for a content node.

Definition at line 166 of file indexedOctree.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, indexedOctreeBase::isContent(), and labelBits::val().

Here is the call graph for this function:

◆ getNode()

static label getNode ( const labelBits  i)
inlinestatic

Return real (dereferenced) index for a parent node.

Definition at line 179 of file indexedOctree.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, indexedOctreeBase::isNode(), and labelBits::val().

Here is the call graph for this function:

◆ getOctant()

static direction getOctant ( labelBits  i)
inlinestaticnoexcept

Return sub-node direction/octant.

Definition at line 192 of file indexedOctree.H.

◆ emptyPlusOctant()

static labelBits emptyPlusOctant ( direction  octant)
inlinestaticprotected

From empty to subNodes_ entry.

Definition at line 221 of file indexedOctree.H.

◆ contentPlusOctant()

static labelBits contentPlusOctant ( label  i,
direction  octant 
)
inlinestaticprotected

From index into contents_ to subNodes_ entry.

Definition at line 229 of file indexedOctree.H.

◆ nodePlusOctant()

static labelBits nodePlusOctant ( label  i,
direction  octant 
)
inlinestaticprotected

From index into nodes_ to subNodes_ entry.

Definition at line 237 of file indexedOctree.H.

◆ perturbTol() [1/2]

static scalar& perturbTol ( )
inlinestaticnoexcept

◆ perturbTol() [2/2]

static scalar perturbTol ( scalar  tol)
inlinestaticnoexcept

Set the perturbation tolerance, return the old value.

Definition at line 253 of file indexedOctree.H.

References indexedOctreeBase::perturbTol_.

◆ ClassName()

ClassName ( "indexedOctree"  )

Runtime type information.

◆ writeOBJ()

void writeOBJ ( Ostream os,
const treeBoundBox bb,
label &  vertIndex,
const bool  writeLinesOnly = false 
)
static

Write treeBoundBox in OBJ format.

Definition at line 38 of file indexedOctreeBase.C.

References Foam::constant::electromagnetic::e, f(), Foam::nl, os(), p, treeBoundBox::points(), and pts.

Here is the call graph for this function:

Member Data Documentation

◆ perturbTol_

scalar perturbTol_ = 10*SMALL
staticprotected

Relative perturbation 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 210 of file indexedOctree.H.

Referenced by indexedOctreeBase::perturbTol().


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