SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::helper::TriangleOctreeRoot Class Reference

#include <TriangleOctree.h>

Inheritance diagram for sofa::helper::TriangleOctreeRoot:

Public Attributes

const SeqTrianglesoctreeTriangles
 the triangles used as input to construct the octree More...
 
const VecCoordoctreePos
 the positions of vertices used as input to construct the octree More...
 
TriangleOctreeoctreeRoot
 the first node of the octree More...
 
int cubeSize
 the size of the octree cube More...
 

Static Public Attributes

static constexpr int CUBE_SIZE = 800
 

Public Member Functions

 TriangleOctreeRoot ()
 
 ~TriangleOctreeRoot ()
 
void buildOctree ()
 
void buildOctree (const SeqTriangles *triangles, const VecCoord *pos)
 

Protected Member Functions

int fillOctree (int t, int d=0, type::Vec3 v={ 0_sreal, 0_sreal, 0_sreal })
 used to add a triangle to the octree More...
 
void calcTriangleAABB (int t, SReal *bb, SReal &size)
 used to compute the Bounding Box for each triangle More...
 

Attribute details

◆ CUBE_SIZE

constexpr int sofa::helper::TriangleOctreeRoot::CUBE_SIZE = 800
staticconstexpr

◆ cubeSize

int sofa::helper::TriangleOctreeRoot::cubeSize

the size of the octree cube

◆ octreePos

const VecCoord* sofa::helper::TriangleOctreeRoot::octreePos

the positions of vertices used as input to construct the octree

◆ octreeRoot

TriangleOctree* sofa::helper::TriangleOctreeRoot::octreeRoot

the first node of the octree

◆ octreeTriangles

const SeqTriangles* sofa::helper::TriangleOctreeRoot::octreeTriangles

the triangles used as input to construct the octree

Constructor details

◆ TriangleOctreeRoot()

sofa::helper::TriangleOctreeRoot::TriangleOctreeRoot ( )

◆ ~TriangleOctreeRoot()

sofa::helper::TriangleOctreeRoot::~TriangleOctreeRoot ( )

Function details

◆ buildOctree() [1/2]

void sofa::helper::TriangleOctreeRoot::buildOctree ( )

◆ buildOctree() [2/2]

void sofa::helper::TriangleOctreeRoot::buildOctree ( const SeqTriangles triangles,
const VecCoord pos 
)
inline

◆ calcTriangleAABB()

void sofa::helper::TriangleOctreeRoot::calcTriangleAABB ( int  t,
SReal *  bb,
SReal &  size 
)
protected

used to compute the Bounding Box for each triangle

◆ fillOctree()

int sofa::helper::TriangleOctreeRoot::fillOctree ( int  t,
int  d = 0,
type::Vec3  v = { 0_sreal, 0_sreal, 0_sreal } 
)
protected

used to add a triangle to the octree