Difference between revisions of "NewtonCollisionInfoRecord"
m (1 revision imported) |
|
(No difference)
|
Revision as of 08:02, 10 June 2019
NewtonCollisionInfoRecord is a data structure used by NewtonCollisionGetInfo to return information about a Newton collision.
NewtonCollisionInfoRecord.m_collisionType constants are defined in header as macro form. http://newtondynamics.com/forum/viewtopic.php?f=11&t=6658&p=46803#p46803
Internal values used in C++ code are defined as enum dgCollisionID in dgCollision.h. This internal values are not exposed via C API.
typedef struct NewtonCollisionInfoRecord
{
dFloat m_offsetMatrix[4][4];
int m_collisionType; // tag id to identify the collision primitive
int m_collisionUserID;
union {
NewtonBoxParam m_box;
NewtonConeParam m_cone;
NewtonSphereParam m_sphere;
NewtonCapsuleParam m_capsule;
NewtonCylinderParam m_cylinder;
NewtonChamferCylinderParam m_chamferCylinder;
NewtonConvexHullParam m_convexHull;
NewtonDeformableMeshParam m_deformableMesh;
NewtonCompoundCollisionParam m_compoundCollision;
NewtonCollisionTreeParam m_collisionTree;
NewtonHeightFieldCollisionParam m_heightField;
NewtonSceneCollisionParam m_sceneCollision;
dFloat m_paramArray[64]; // user define collision can use this to store information
};
} NewtonCollisionInfoRecord;