ug4
ug::node_tree::CollisionElementID Struct Reference

#include <collision_element_info.h>

Public Member Functions

 CollisionElementID ()
 
 CollisionElementID (int i)
 
 CollisionElementID (void *p)
 
bool is_valid ()
 
bool operator== (const CollisionElementID &id) const
 

Public Attributes

union {
   int   m_intID
 
   void *   m_ptrID
 
}; 
 

Detailed Description

This struct allows to specify a pointer or an integer-id that shall be stored with each element (edge or triangle) in a collision-tree.

Note that only a pointer or an integer may be stored not both at the same time.

If you construct an empty CollisionElementID, it will be set to invalid by default. Note that an integer value of -1 marks the CollisionElementID as invalid.

Constructor & Destructor Documentation

◆ CollisionElementID() [1/3]

ug::node_tree::CollisionElementID::CollisionElementID ( )
inline

◆ CollisionElementID() [2/3]

ug::node_tree::CollisionElementID::CollisionElementID ( void *  p)
inline

References p.

◆ CollisionElementID() [3/3]

ug::node_tree::CollisionElementID::CollisionElementID ( int  i)
inline

Member Function Documentation

◆ is_valid()

bool ug::node_tree::CollisionElementID::is_valid ( )
inline

References m_intID.

◆ operator==()

bool ug::node_tree::CollisionElementID::operator== ( const CollisionElementID id) const
inline

References m_ptrID.

Member Data Documentation

◆ 

union { ... }

◆ m_intID

int ug::node_tree::CollisionElementID::m_intID

Referenced by is_valid().

◆ m_ptrID

void* ug::node_tree::CollisionElementID::m_ptrID

Referenced by operator==().


The documentation for this struct was generated from the following file: