SOFA API  cba138a4
Open source framework for multi-physics simuation
sofa::component::collision::TriangleOctreeRoot Class Reference

#include <TriangleOctree.h>

Inheritance diagram for sofa::component::collision::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...
 

Public Member Functions

 TriangleOctreeRoot ()
 
 ~TriangleOctreeRoot ()
 
void buildOctree ()
 
void buildOctree (const sofa::core::topology::BaseMeshTopology::SeqTriangles *triangles, const sofa::defaulttype::Vec3Types::VecCoord *pos)
 

Protected Member Functions

int fillOctree (int t, int d=0, defaulttype::Vector3 v=defaulttype::Vector3(0, 0, 0))
 used to add a triangle to the octree More...
 
void calcTriangleAABB (int t, double *bb, double &size)
 used to compute the Bounding Box for each triangle More...
 

Attribute details

int sofa::component::collision::TriangleOctreeRoot::cubeSize

the size of the octree cube

const VecCoord* sofa::component::collision::TriangleOctreeRoot::octreePos

the positions of vertices used as input to construct the octree

TriangleOctree* sofa::component::collision::TriangleOctreeRoot::octreeRoot

the first node of the octree

const SeqTriangles* sofa::component::collision::TriangleOctreeRoot::octreeTriangles

the triangles used as input to construct the octree

Constructor details

sofa::component::collision::TriangleOctreeRoot::TriangleOctreeRoot ( )
sofa::component::collision::TriangleOctreeRoot::~TriangleOctreeRoot ( )

Function details

void sofa::component::collision::TriangleOctreeRoot::buildOctree ( )
void sofa::component::collision::TriangleOctreeRoot::buildOctree ( const sofa::core::topology::BaseMeshTopology::SeqTriangles triangles,
const sofa::defaulttype::Vec3Types::VecCoord pos 
)
inline
void sofa::component::collision::TriangleOctreeRoot::calcTriangleAABB ( int  t,
double bb,
double size 
)
protected

used to compute the Bounding Box for each triangle

int sofa::component::collision::TriangleOctreeRoot::fillOctree ( int  t,
int  d = 0,
defaulttype::Vector3  v = defaulttype::Vector3 (0, 0, 0) 
)
protected

used to add a triangle to the octree