chai3d::cCollisionEvent Struct Reference

This structure stores the data related to a collision event.

#include <CCollisionBasics.h>

Public Member Functions

void clear ()
 Initialize all data. More...
 

Public Attributes

cCollisionType m_type
 Collision type (triangle, voxel, line, point) More...
 
cGenericObject * m_object
 Pointer to the collided object. More...
 
cPointArrayPtr m_points
 Pointer to point array (if available). More...
 
cSegmentArrayPtr m_segments
 Pointer to segment array (if available). More...
 
cTriangleArrayPtr m_triangles
 Pointer to triangle array (if available). More...
 
int m_index
 Index to collided point, segment, or triangle. This pointer may be NULL for collisions with non triangle based objects. More...
 
int m_voxelIndexX
 Index X of voxel in texture image (if available). More...
 
int m_voxelIndexY
 Index Y of voxel in texture image (if available). More...
 
int m_voxelIndexZ
 Index Z of voxel in texture image (if available). More...
 
cVector3d m_localPos
 Position of the collision point in reference to the objects coordinate frame (local coordinates). More...
 
cVector3d m_globalPos
 Position of the collision point in world coordinates (global coordinates). More...
 
cVector3d m_localNormal
 Surface normal at collision point in reference to the objects coordinate frame (local coordinates). More...
 
cVector3d m_globalNormal
 Surface normal at collision point in world coordinates (global coordinates). More...
 
double m_squareDistance
 Square distance between ray origin and collision point. More...
 
double m_posV01
 Projection of collision point onto line going from Vertex0 to Vertex1 of triangle/segment/point (if available). Value is bounded to [0.0, 1.0]. More...
 
double m_posV02
 Projection of collision point onto line going from Vertex0 to Vertex2 of triangle/segment/point (if available). Value is bounded to [0.0, 1.0]. More...
 
cVector3d m_adjustedSegmentAPoint
 

Member Function Documentation

§ clear()

void chai3d::cCollisionEvent::clear ( )
inline

Member Data Documentation

§ m_type

cCollisionType chai3d::cCollisionEvent::m_type

§ m_object

cGenericObject* chai3d::cCollisionEvent::m_object

§ m_points

cPointArrayPtr chai3d::cCollisionEvent::m_points

§ m_segments

cSegmentArrayPtr chai3d::cCollisionEvent::m_segments

§ m_triangles

cTriangleArrayPtr chai3d::cCollisionEvent::m_triangles

§ m_index

int chai3d::cCollisionEvent::m_index

§ m_voxelIndexX

int chai3d::cCollisionEvent::m_voxelIndexX

§ m_voxelIndexY

int chai3d::cCollisionEvent::m_voxelIndexY

§ m_voxelIndexZ

int chai3d::cCollisionEvent::m_voxelIndexZ

§ m_localPos

cVector3d chai3d::cCollisionEvent::m_localPos

§ m_globalPos

cVector3d chai3d::cCollisionEvent::m_globalPos

§ m_localNormal

cVector3d chai3d::cCollisionEvent::m_localNormal

§ m_globalNormal

cVector3d chai3d::cCollisionEvent::m_globalNormal

§ m_squareDistance

double chai3d::cCollisionEvent::m_squareDistance

§ m_posV01

double chai3d::cCollisionEvent::m_posV01

§ m_posV02

double chai3d::cCollisionEvent::m_posV02

§ m_adjustedSegmentAPoint

cVector3d chai3d::cCollisionEvent::m_adjustedSegmentAPoint

If the position of segment A is modified to take into account motion (see m_adjustObjectMotion in cCollisionSettings), the value is stored here.


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