irr::newton::MaterialPair Class Reference

a pair of materials. More...

#include <material_pair.hpp>

Inheritance diagram for irr::newton::MaterialPair:

irr::newton::MaterialPairAndContact List of all members.

Public Member Functions

void disableContact ()
unsigned getContactFaceAttribute ()
irr::core::vector3df getContactForce ()
irr::core::vector3df getContactNormal ()
irr::core::vector3df getContactPosition ()
void getContactTangentDirections (irr::core::vector3df &primary, irr::core::vector3df &secondary)
irr::f32 getCurrentTimeStep ()
NewtonMaterial * getNewtonMaterialPair ()
 MaterialPair (NewtonMaterial *material_to_set)
 constructor, don't call directly
 MaterialPair ()
 constructor, don't call directly
void setContactElasticity (irr::f32 value)
void setContactFrictionState (irr::s32 state, bool index)
void setContactSoftness (irr::f32 value)
 ~MaterialPair ()
 deconstructor

Detailed Description

a pair of materials.

Used only in material callbacks (when two materials contact) The function of this class can only be called inside a material callback ALL DOCUMENTATIONS OF THE FUNCTIONS ARE TAKEN FROM NEWTON DOCUMENTATION


Constructor & Destructor Documentation

irr::newton::MaterialPair::MaterialPair (  )  [inline]

constructor, don't call directly

irr::newton::MaterialPair::MaterialPair ( NewtonMaterial *  material_to_set  )  [inline]

constructor, don't call directly

irr::newton::MaterialPair::~MaterialPair (  )  [inline]

deconstructor


Member Function Documentation

void irr::newton::MaterialPair::disableContact (  ) 

Disable processing for the contact

Returns:
none

unsigned irr::newton::MaterialPair::getContactFaceAttribute (  ) 

Return the face attribute assigned to this face when for a user defined collision or a Newton collision tree this function can be used by the application to retrieve the face id of a polygon for a collision tree

Returns:
face attribute for collision trees. Zero if the contact was generated by two convex collisions.

irr::core::vector3df irr::newton::MaterialPair::getContactForce (  ) 

Get the contact force vector in global space The contact force value is only valid when calculating resting contacts. This means if two bodies collide with non zero relative velocity, the reaction force will be an impulse, which is not a reaction force, this will return zero vector. this function will only return meaningful values when the colliding bodies are at rest.

Returns:
the contact force vector

irr::core::vector3df irr::newton::MaterialPair::getContactNormal (  ) 

Get the contact normal in global space

Returns:
contact narmal
See also:
getContactPosition()

irr::core::vector3df irr::newton::MaterialPair::getContactPosition (  ) 

Get the contact position in global space

Returns:
contact position
See also:
getContactNormal()

void irr::newton::MaterialPair::getContactTangentDirections ( irr::core::vector3df &  primary,
irr::core::vector3df &  secondary 
)

Get the contact tangent vector to the contact point

Parameters:
primary reference to a vector to hold the primary tangent vector
secondary reference to a vector to hold the secondary tangent vector
Returns:
none

irr::f32 irr::newton::MaterialPair::getCurrentTimeStep (  ) 

Get the current time step. This function can be useful for the implementation of powered contacts.

Returns:
the current time step

NewtonMaterial* irr::newton::MaterialPair::getNewtonMaterialPair (  )  [inline]

get newton material

Returns:
newton material

void irr::newton::MaterialPair::setContactElasticity ( irr::f32  value  ) 

Override the default elasticity (coefficient of restitution) value for the contact

Parameters:
value new elasticity

void irr::newton::MaterialPair::setContactFrictionState ( irr::s32  state,
bool  index 
)

Enable or disable friction calculation for this contact.

Parameters:
state new state. 0 makes the contact frictionless along the index tangent vector
index index to the tangent vector. 0 for primary tangent vector or 1 for the secondary tangent vector.
Returns:
none

void irr::newton::MaterialPair::setContactSoftness ( irr::f32  value  ) 

Override the default softness value for the contact

Parameters:
value new softness


The documentation for this class was generated from the following file:
Generated on Fri Dec 15 16:58:33 2006 for IrrNewt by  doxygen 1.5.1-p1