#include <material_pair.hpp>
Inheritance diagram for irr::newton::MaterialPair:
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 |
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
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
void irr::newton::MaterialPair::disableContact | ( | ) |
Disable processing for the contact
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
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.
irr::core::vector3df irr::newton::MaterialPair::getContactNormal | ( | ) |
irr::core::vector3df irr::newton::MaterialPair::getContactPosition | ( | ) |
void irr::newton::MaterialPair::getContactTangentDirections | ( | irr::core::vector3df & | primary, | |
irr::core::vector3df & | secondary | |||
) |
Get the contact tangent vector to the contact point
primary | reference to a vector to hold the primary tangent vector | |
secondary | reference to a vector to hold the secondary tangent vector |
irr::f32 irr::newton::MaterialPair::getCurrentTimeStep | ( | ) |
Get the current time step. This function can be useful for the implementation of powered contacts.
NewtonMaterial* irr::newton::MaterialPair::getNewtonMaterialPair | ( | ) | [inline] |
get newton material
void irr::newton::MaterialPair::setContactElasticity | ( | irr::f32 | value | ) |
Override the default elasticity (coefficient of restitution) value for the contact
value | new elasticity |
void irr::newton::MaterialPair::setContactFrictionState | ( | irr::s32 | state, | |
bool | index | |||
) |
Enable or disable friction calculation for this contact.
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. |
void irr::newton::MaterialPair::setContactSoftness | ( | irr::f32 | value | ) |
Override the default softness value for the contact
value | new softness |