SO3Engine
|
with the methods from this class you can set the behavior of each contac-point More...
#include <OgreNewt_ContactJoint.h>
Public Member Functions | |
Contact (void *contact, ContactJoint *parent) | |
constructor | |
~Contact () | |
destructor | |
operator bool () const | |
return true, if this is not a valid contact (end of the contact-list!) | |
Contact | getNext () const |
get the next contact from the parent contact-joint | |
OgreNewt::Body * | getBody0 () const |
get the first body | |
OgreNewt::Body * | getBody1 () const |
unsigned | getFaceAttribute () const |
get the face ID of a TreeCollision object | |
Ogre::Real | getNormalSpeed () const |
get the Collision ID of a body currently colliding | |
Ogre::Vector3 | getForce () const |
force of the collision | |
void | getPositionAndNormal (Ogre::Vector3 &pos, Ogre::Vector3 &norm, OgreNewt::Body *body) const |
get positoin and normal of the collision | |
void | getTangentDirections (Ogre::Vector3 &dir0, Ogre::Vector3 &dir1, OgreNewt::Body *body) const |
get the tangent vectors of the collision | |
Ogre::Real | getTangentSpeed (int index) const |
get tangent speed of the collision | |
void | setSoftness (Ogre::Real softness) |
set softness of the current contact | |
void | setElasticity (Ogre::Real elasticity) |
set elasticity of the current contact | |
void | setFrictionState (int state, int index) |
set friction state of current contact | |
void | setFrictionCoef (Ogre::Real stat, Ogre::Real kinetic, int index) |
set static friction for current contact | |
void | setTangentAcceleration (Ogre::Real accel, int index) |
set tangent acceleration for contact | |
void | rotateTangentDirections (const Ogre::Vector3 &dir) |
align tangent vectors with a user supplied direction | |
void | setNormalDirection (const Ogre::Vector3 &dir) |
manually set the normal for the collision. | |
void | setNormalAcceleration (Ogre::Real accel) |
manually set the acceleration along the collision normal. | |
void | remove () |
removes the contact from the parent contact-joint, this means newton doesn't process this contact | |
NewtonMaterial * | _getNewtonMaterial () |
get the NewtonMaterial from this callback. | |
Protected Attributes | |
NewtonMaterial * | m_material |
void * | m_contact |
OgreNewt::ContactJoint * | m_parent |
Detailed Description
with the methods from this class you can set the behavior of each contac-point
this class is for creating custom behavior between material GroupIDs. this class must not be inherited or instantiated directly in any way, you can obtain an object of this class in the contact-callback from the contactJoint and iterate through all contacts using the getNext-function
Definition at line 77 of file OgreNewt_ContactJoint.h.
Constructor & Destructor Documentation
◆ Contact()
OgreNewt::Contact::Contact | ( | void * | contact, |
ContactJoint * | parent | ||
) |
constructor
Definition at line 39 of file OgreNewt_ContactJoint.cpp.
◆ ~Contact()
OgreNewt::Contact::~Contact | ( | ) |
destructor
Definition at line 50 of file OgreNewt_ContactJoint.cpp.
Member Function Documentation
◆ _getNewtonMaterial()
|
inline |
get the NewtonMaterial from this callback.
Definition at line 199 of file OgreNewt_ContactJoint.h.
◆ getBody0()
|
inline |
get the first body
Definition at line 96 of file OgreNewt_ContactJoint.h.
◆ getBody1()
|
inline |
Definition at line 97 of file OgreNewt_ContactJoint.h.
◆ getFaceAttribute()
|
inline |
get the face ID of a TreeCollision object
Definition at line 100 of file OgreNewt_ContactJoint.h.
◆ getForce()
Ogre::Vector3 OgreNewt::Contact::getForce | ( | ) | const |
force of the collision
only valid for objects in a stable state (sitting on top of each other, etc)
Definition at line 60 of file OgreNewt_ContactJoint.cpp.
◆ getNext()
Contact OgreNewt::Contact::getNext | ( | ) | const |
get the next contact from the parent contact-joint
Definition at line 54 of file OgreNewt_ContactJoint.cpp.
◆ getNormalSpeed()
|
inline |
get the Collision ID of a body currently colliding
speed of the collision
Definition at line 106 of file OgreNewt_ContactJoint.h.
◆ getPositionAndNormal()
|
inline |
get positoin and normal of the collision
Definition at line 115 of file OgreNewt_ContactJoint.h.
◆ getTangentDirections()
|
inline |
get the tangent vectors of the collision
Definition at line 131 of file OgreNewt_ContactJoint.h.
◆ getTangentSpeed()
|
inline |
get tangent speed of the collision
Definition at line 148 of file OgreNewt_ContactJoint.h.
◆ operator bool()
|
inline |
return true, if this is not a valid contact (end of the contact-list!)
Definition at line 88 of file OgreNewt_ContactJoint.h.
◆ remove()
void OgreNewt::Contact::remove | ( | ) |
removes the contact from the parent contact-joint, this means newton doesn't process this contact
use this function, when you want to ignore this specific contact, but you need to get the next contact before, because this will invalidate this class (set all pointers to zero!)
Definition at line 67 of file OgreNewt_ContactJoint.cpp.
◆ rotateTangentDirections()
|
inline |
align tangent vectors with a user supplied direction
Definition at line 169 of file OgreNewt_ContactJoint.h.
◆ setElasticity()
|
inline |
set elasticity of the current contact
Definition at line 157 of file OgreNewt_ContactJoint.h.
◆ setFrictionCoef()
|
inline |
set static friction for current contact
Definition at line 163 of file OgreNewt_ContactJoint.h.
◆ setFrictionState()
|
inline |
set friction state of current contact
Definition at line 160 of file OgreNewt_ContactJoint.h.
◆ setNormalAcceleration()
|
inline |
manually set the acceleration along the collision normal.
Definition at line 189 of file OgreNewt_ContactJoint.h.
◆ setNormalDirection()
|
inline |
manually set the normal for the collision.
Definition at line 179 of file OgreNewt_ContactJoint.h.
◆ setSoftness()
|
inline |
set softness of the current contact
Definition at line 154 of file OgreNewt_ContactJoint.h.
◆ setTangentAcceleration()
|
inline |
set tangent acceleration for contact
Definition at line 166 of file OgreNewt_ContactJoint.h.
Member Data Documentation
◆ m_contact
|
protected |
Definition at line 203 of file OgreNewt_ContactJoint.h.
◆ m_material
|
protected |
Definition at line 202 of file OgreNewt_ContactJoint.h.
◆ m_parent
|
protected |
Definition at line 204 of file OgreNewt_ContactJoint.h.
The documentation for this class was generated from the following files:
- include/External/ogrenewt/OgreNewt_ContactJoint.h
- src/External/ogrenewt/OgreNewt_ContactJoint.cpp
Generated by 1.9.8