Loading...
Searching...
No Matches
indexedOctreeBase Class Reference

Template invariant parts for indexedOctree. More...

#include <indexedOctree.H>

Inheritance diagram for indexedOctreeBase:

Classes

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

Public Member Functions

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

Static Public Member Functions

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

Static Protected Member Functions

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

Static Protected Attributes

static scalar perturbTol_ = 10*SMALL
 Relative perturbation tolerance.

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.

References os().

Here is the call graph for this function:

Member Function Documentation

◆ isEmpty()

bool isEmpty ( labelBits i)
inlinestaticnoexcept

An empty node - no content.

Definition at line 139 of file indexedOctree.H.

◆ isContent()

◆ isNode()

◆ getContent()

◆ getNode()

◆ getOctant()

direction getOctant ( labelBits i)
inlinestaticnoexcept

Return sub-node direction/octant.

Definition at line 192 of file indexedOctree.H.

Referenced by indexedOctree< treeDataIndirectTriSurface >::findLine(), and indexedOctree< treeType >::write().

Here is the caller graph for this function:

◆ emptyPlusOctant()

labelBits emptyPlusOctant ( direction octant)
inlinestaticprotected

From empty to subNodes_ entry.

Definition at line 221 of file indexedOctree.H.

Referenced by dynamicIndexedOctree< Type >::removeIndex().

Here is the caller graph for this function:

◆ contentPlusOctant()

labelBits contentPlusOctant ( label i,
direction octant )
inlinestaticprotected

From index into contents_ to subNodes_ entry.

Definition at line 229 of file indexedOctree.H.

Referenced by dynamicIndexedOctree< Type >::insertIndex().

Here is the caller graph for this function:

◆ nodePlusOctant()

labelBits nodePlusOctant ( label i,
direction octant )
inlinestaticprotected

◆ perturbTol() [1/2]

◆ perturbTol() [2/2]

scalar perturbTol ( scalar tol)
inlinestaticnoexcept

Set the perturbation tolerance, return the old value.

Definition at line 253 of file indexedOctree.H.

References 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 37 of file indexedOctreeBase.C.

References e, treeBoundBox::edges, f(), treeBoundBox::faces, 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 Foam::defineTypeNameAndDebug(), indexedOctree< treeType >::indexedOctree(), perturbTol(), and perturbTol().


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