ug4
ug::node_tree::CollisionTrianglesNode Class Reference

holds index tuples defining triangles. More...

#include <collision_triangles_node.h>

+ Inheritance diagram for ug::node_tree::CollisionTrianglesNode:

Public Member Functions

virtual void add_triangle (int ind1, int ind2, int ind3)
 
virtual void add_triangle (int ind1, int ind2, int ind3, CollisionElementID triID)
 
virtual void add_triangles (int *pIndices, CollisionElementID *pTriIDs, size_t numTris)
 pIndices and pTriIDs have to be of size numTris*3 More...
 
virtual void add_triangles (int *pIndices, size_t numTris)
 pIndices has to be of size numTris*3 More...
 
virtual void get_triangle (size_t index, int &ind1Out, int &ind2Out, int &ind3Out) const
 
virtual CollisionElementID get_triangle_id (size_t triInd)
 if no identifier has been set for an edge -1 is returned. More...
 
virtual const int * get_triangles () const
 
virtual size_t num_triangles () const
 
virtual void set_triangle_id (size_t triInd, CollisionElementID triID)
 
virtual ~CollisionTrianglesNode ()
 
- Public Member Functions inherited from ug::node_tree::Node
virtual ~Node ()
 
- Public Member Functions inherited from ug::node_tree::Object
unsigned int getObjectCode ()
 
virtual ~Object ()
 

Static Public Member Functions

static SPCollisionTrianglesNode create ()
 

Protected Types

typedef std::vector< CollisionElementIDIDVec
 
typedef std::vector< int > IndexVec
 

Protected Member Functions

 CollisionTrianglesNode ()
 
- Protected Member Functions inherited from ug::node_tree::Node
 Node ()
 
- Protected Member Functions inherited from ug::node_tree::Object
 Object ()
 
 Object (const Object &obj)
 

Protected Attributes

bool m_bTriangleIDsSupplied
 
IDVec m_vTriIDs
 
IndexVec m_vTris
 
- Protected Attributes inherited from ug::node_tree::Object
unsigned int m_objectCode
 

Detailed Description

holds index tuples defining triangles.

The index-tuples refer to the next CollisionTreeRootNode, which is higher in the hierarchy.

An identifier can be stored with each triangle - either an integer-value or a void-pointer. Normally appears as a subordinate of CollisionTreeRootNode.

Member Typedef Documentation

◆ IDVec

◆ IndexVec

typedef std::vector<int> ug::node_tree::CollisionTrianglesNode::IndexVec
protected

Constructor & Destructor Documentation

◆ ~CollisionTrianglesNode()

ug::node_tree::CollisionTrianglesNode::~CollisionTrianglesNode ( )
virtual

◆ CollisionTrianglesNode()

ug::node_tree::CollisionTrianglesNode::CollisionTrianglesNode ( )
protected

References m_bTriangleIDsSupplied.

Referenced by create().

Member Function Documentation

◆ add_triangle() [1/2]

void ug::node_tree::CollisionTrianglesNode::add_triangle ( int  ind1,
int  ind2,
int  ind3 
)
virtual

References m_bTriangleIDsSupplied, and m_vTris.

◆ add_triangle() [2/2]

void ug::node_tree::CollisionTrianglesNode::add_triangle ( int  ind1,
int  ind2,
int  ind3,
CollisionElementID  triID 
)
virtual

◆ add_triangles() [1/2]

void ug::node_tree::CollisionTrianglesNode::add_triangles ( int *  pIndices,
CollisionElementID pTriIDs,
size_t  numTris 
)
virtual

pIndices and pTriIDs have to be of size numTris*3

References m_bTriangleIDsSupplied, m_vTriIDs, and m_vTris.

◆ add_triangles() [2/2]

void ug::node_tree::CollisionTrianglesNode::add_triangles ( int *  pIndices,
size_t  numTris 
)
virtual

pIndices has to be of size numTris*3

References m_bTriangleIDsSupplied, m_vTriIDs, and m_vTris.

◆ create()

◆ get_triangle()

void ug::node_tree::CollisionTrianglesNode::get_triangle ( size_t  index,
int &  ind1Out,
int &  ind2Out,
int &  ind3Out 
) const
virtual

References m_vTris.

◆ get_triangle_id()

CollisionElementID ug::node_tree::CollisionTrianglesNode::get_triangle_id ( size_t  triInd)
virtual

◆ get_triangles()

const int * ug::node_tree::CollisionTrianglesNode::get_triangles ( ) const
virtual

◆ num_triangles()

size_t ug::node_tree::CollisionTrianglesNode::num_triangles ( ) const
virtual

◆ set_triangle_id()

void ug::node_tree::CollisionTrianglesNode::set_triangle_id ( size_t  triInd,
CollisionElementID  triID 
)
virtual

Member Data Documentation

◆ m_bTriangleIDsSupplied

bool ug::node_tree::CollisionTrianglesNode::m_bTriangleIDsSupplied
protected

◆ m_vTriIDs

IDVec ug::node_tree::CollisionTrianglesNode::m_vTriIDs
protected

◆ m_vTris

IndexVec ug::node_tree::CollisionTrianglesNode::m_vTris
protected

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