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 |
|
inline |
cCollisionType chai3d::cCollisionEvent::m_type |
cGenericObject* chai3d::cCollisionEvent::m_object |
cPointArrayPtr chai3d::cCollisionEvent::m_points |
cSegmentArrayPtr chai3d::cCollisionEvent::m_segments |
cTriangleArrayPtr chai3d::cCollisionEvent::m_triangles |
int chai3d::cCollisionEvent::m_index |
int chai3d::cCollisionEvent::m_voxelIndexX |
int chai3d::cCollisionEvent::m_voxelIndexY |
int chai3d::cCollisionEvent::m_voxelIndexZ |
cVector3d chai3d::cCollisionEvent::m_localPos |
cVector3d chai3d::cCollisionEvent::m_globalPos |
cVector3d chai3d::cCollisionEvent::m_localNormal |
cVector3d chai3d::cCollisionEvent::m_globalNormal |
double chai3d::cCollisionEvent::m_squareDistance |
double chai3d::cCollisionEvent::m_posV01 |
double chai3d::cCollisionEvent::m_posV02 |
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.