Difference between revisions of "NewtonWorldConvexCastReturnInfo"

From Newton Wiki
Jump to: navigation, search
m (1 revision imported)
 
Line 6: Line 6:
  
 
<source lang="cpp">
 
<source lang="cpp">
 +
 
     typedef struct NewtonWorldConvexCastReturnInfo
 
     typedef struct NewtonWorldConvexCastReturnInfo
 
{
 
{
 
dFloat m_point[4]; // collision point in global space
 
dFloat m_point[4]; // collision point in global space
 
dFloat m_normal[4]; // surface normal at collision point in global space
 
dFloat m_normal[4]; // surface normal at collision point in global space
//dFloat m_normalOnHitPoint[4];          // surface normal at the surface of the hit body,
 
// is the same as the normal calculated by a ray cast hitting the body at the hit point
 
 
dLong m_contactID; // collision ID at contact point
 
dLong m_contactID; // collision ID at contact point
 
const NewtonBody* m_hitBody; // body hit at contact point
 
const NewtonBody* m_hitBody; // body hit at contact point

Latest revision as of 06:06, 18 June 2019

Used By

NewtonWorldConvexCast

Structure

    typedef struct NewtonWorldConvexCastReturnInfo
	{
		dFloat m_point[4];						// collision point in global space
		dFloat m_normal[4];						// surface normal at collision point in global space
		dLong m_contactID;						// collision ID at contact point
		const NewtonBody* m_hitBody;			// body hit at contact point
		dFloat m_penetration;                   // contact penetration at collision point
	} NewtonWorldConvexCastReturnInfo;

Remarks

ContactID is the id of the shape at the conatct point, for a collision tree it will be the ID of the face, in a compound it will be the ID of the subshape, in a heightfield will be the id of the cell.