47 #ifndef CCollisionBasicsH 48 #define CCollisionBasicsH 153 m_segments =
nullptr;
154 m_triangles =
nullptr;
161 m_localNormal.
zero();
162 m_globalNormal.
zero();
209 m_nearestCollision.clear();
210 m_collisions.clear();
247 m_checkForNearestCollisionOnly =
true;
248 m_returnMinimalCollisionData =
false;
249 m_checkVisibleObjects =
true;
250 m_checkHapticObjects =
true;
251 m_adjustObjectMotion =
false;
252 m_ignoreShapes =
false;
253 m_collisionRadius = 0.0;
This class implements a 3D vector.
Definition: CVector3d.h:88
bool m_checkHapticObjects
If true, then collision detector shall check for collisions on haptic enabled objects (m_hapticEnable...
Definition: CCollisionBasics.h:266
Implements arrays of 3D triangles.
cCollisionEvent m_nearestCollision
Nearest collision event from the start point of the collision segment.
Definition: CCollisionBasics.h:221
bool m_ignoreShapes
If true, collision with shape objects are ignored (e.g. cShapeSphere, cShapeCylinder, cShapeBox, etc...)
Definition: CCollisionBasics.h:272
std::shared_ptr< cPointArray > cPointArrayPtr
Definition: CPointArray.h:71
cPointArrayPtr m_points
Pointer to point array (if available).
Definition: CCollisionBasics.h:100
Implement arrays of 3D segments.
void clear()
Initialize all data.
Definition: CCollisionBasics.h:148
Definition: CCollisionBasics.h:75
void zero()
This method clears all vector components with zeros.
Definition: CVector3d.h:256
Definition: CCollisionBasics.h:74
std::shared_ptr< cSegmentArray > cSegmentArrayPtr
Definition: CSegmentArray.h:65
bool m_adjustObjectMotion
If true, then adjust for object motion. (See dynamic proxy model).
Definition: CCollisionBasics.h:269
Definition: CCollisionBasics.h:78
virtual ~cCollisionRecorder()
Destructor of cCollisionRecorder.
Definition: CCollisionBasics.h:197
This structure stores the data related to a collision event.
Definition: CCollisionBasics.h:91
cCollisionRecorder()
Constructor of cCollisionRecorder.
Definition: CCollisionBasics.h:194
cCollisionType
Definition: CCollisionBasics.h:71
double m_squareDistance
Square distance between ray origin and collision point.
Definition: CCollisionBasics.h:133
bool m_checkVisibleObjects
If true, then collision detector shall check for collisions on visible objects (m_showEnabled == true...
Definition: CCollisionBasics.h:263
double m_posV01
Projection of collision point onto line going from Vertex0 to Vertex1 of triangle/segment/point (if a...
Definition: CCollisionBasics.h:136
void clear()
This method clears all collision records.
Definition: CCollisionBasics.h:207
int m_index
Index to collided point, segment, or triangle. This pointer may be NULL for collisions with non trian...
Definition: CCollisionBasics.h:109
double m_posV02
Projection of collision point onto line going from Vertex0 to Vertex2 of triangle/segment/point (if a...
Definition: CCollisionBasics.h:139
cGenericObject * m_object
Pointer to the collided object.
Definition: CCollisionBasics.h:97
cVector3d m_localNormal
Surface normal at collision point in reference to the objects coordinate frame (local coordinates)...
Definition: CCollisionBasics.h:127
cVector3d m_adjustedSegmentAPoint
Definition: CCollisionBasics.h:145
cVector3d m_localPos
Position of the collision point in reference to the objects coordinate frame (local coordinates)...
Definition: CCollisionBasics.h:121
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition: CGenericObject.h:112
cTriangleArrayPtr m_triangles
Pointer to triangle array (if available).
Definition: CCollisionBasics.h:106
int m_voxelIndexZ
Index Z of voxel in texture image (if available).
Definition: CCollisionBasics.h:118
This class implements a collision detection recorder that stores all collision events that are report...
Definition: CCollisionBasics.h:185
bool m_returnMinimalCollisionData
If true, return minimal amount of data about the collision.
Definition: CCollisionBasics.h:260
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition: CCollisionBasics.h:242
bool m_checkForNearestCollisionOnly
If true, only return the nearest collision event.
Definition: CCollisionBasics.h:257
cVector3d m_globalPos
Position of the collision point in world coordinates (global coordinates).
Definition: CCollisionBasics.h:124
Definition: CCollisionBasics.h:77
cCollisionSettings()
Constructor of cCollisionSettings.
Definition: CCollisionBasics.h:245
Definition: CCollisionBasics.h:73
cVector3d m_globalNormal
Surface normal at collision point in world coordinates (global coordinates).
Definition: CCollisionBasics.h:130
Implements arrays of 3D points.
int m_voxelIndexY
Index Y of voxel in texture image (if available).
Definition: CCollisionBasics.h:115
const double C_LARGE
Biggest value for a double.
Definition: CConstants.h:109
cCollisionType m_type
Collision type (triangle, voxel, line, point)
Definition: CCollisionBasics.h:94
Implements material properties.
Definition: CAudioBuffer.cpp:56
Definition: CCollisionBasics.h:76
double m_collisionRadius
Collision radius. This value typically corresponds to the radius of the virtual tool or cursor...
Definition: CCollisionBasics.h:275
std::shared_ptr< cTriangleArray > cTriangleArrayPtr
Definition: CTriangleArray.h:65
std::vector< cCollisionEvent > m_collisions
List of all detected collision events.
Definition: CCollisionBasics.h:224
cSegmentArrayPtr m_segments
Pointer to segment array (if available).
Definition: CCollisionBasics.h:103
int m_voxelIndexX
Index X of voxel in texture image (if available).
Definition: CCollisionBasics.h:112