SO3Engine
|
base class for all joints. More...
#include <OgreNewt_Joint.h>
Public Member Functions | |
Joint () | |
constructor | |
virtual | ~Joint () |
destructor | |
Body * | getBody0 () const |
get the pointer to the first rigid body | |
Body * | getBody1 () const |
get the pointer to the first rigid body | |
const OgreNewt::World * | getWorld () |
get the pointer to the world | |
virtual void | submitConstraint (Ogre::Real timeStep, int threadIndex) |
must be define for a functioning joint. | |
virtual void | showDebugData (Ogre::SceneNode *debugRootNode) |
show joint visual debugging data | |
int | getCollisionState () const |
returns collision state | |
void | setCollisionState (int state) const |
sets the collision state | |
Ogre::Real | getStiffness () const |
get joint stiffness | |
void | setStiffness (Ogre::Real stiffness) const |
set joint stiffness | |
Protected Member Functions | |
void | addLinearRow (const Ogre::Vector3 &pt0, const Ogre::Vector3 &pt1, const Ogre::Vector3 &dir) const |
void | addAngularRow (Ogre::Radian relativeAngleError, const Ogre::Vector3 &dir) const |
void | addGeneralRow (const Ogre::Vector3 &linear0, const Ogre::Vector3 &angular0, const Ogre::Vector3 &linear1, const Ogre::Vector3 &angular1) const |
void | setRowMinimumFriction (Ogre::Real friction) const |
void | setRowMaximumFriction (Ogre::Real friction) const |
void | setRowStiffness (Ogre::Real stiffness) const |
void | setRowAcceleration (Ogre::Real accel) const |
void | setRowSpringDamper (Ogre::Real springK, Ogre::Real springD) const |
void | SetSupportJoint (CustomJoint *supportJoint) |
SetSupportJoint. | |
CustomJoint * | GetSupportJoint () const |
GetSupportJoint. | |
Static Protected Member Functions | |
static void _CDECL | destructorCallback (const CustomJoint *me) |
joint destructor callback glue | |
static void _CDECL | submitConstraintCallback (const CustomJoint *me, dFloat timestep, int threadIndex) |
submintContraint | |
Protected Attributes | |
CustomJoint * | m_joint |
Detailed Description
base class for all joints.
this class is inherited by all other specific joint types.
Definition at line 30 of file OgreNewt_Joint.h.
Constructor & Destructor Documentation
◆ Joint()
OgreNewt::Joint::Joint | ( | ) |
constructor
Definition at line 13 of file OgreNewt_Joint.cpp.
◆ ~Joint()
|
virtual |
destructor
Definition at line 18 of file OgreNewt_Joint.cpp.
Member Function Documentation
◆ addAngularRow()
|
protected |
Definition at line 89 of file OgreNewt_Joint.cpp.
◆ addGeneralRow()
|
protected |
Definition at line 94 of file OgreNewt_Joint.cpp.
◆ addLinearRow()
|
protected |
These functions are for applications who want to extend existing joint or to create entire new joint from scratch
Definition at line 84 of file OgreNewt_Joint.cpp.
◆ destructorCallback()
|
staticprotected |
◆ getBody0()
Body * OgreNewt::Joint::getBody0 | ( | ) | const |
get the pointer to the first rigid body
Definition at line 44 of file OgreNewt_Joint.cpp.
◆ getBody1()
Body * OgreNewt::Joint::getBody1 | ( | ) | const |
get the pointer to the first rigid body
Definition at line 57 of file OgreNewt_Joint.cpp.
◆ getCollisionState()
int OgreNewt::Joint::getCollisionState | ( | ) | const |
returns collision state
The collision state determines whether collision should be calculated between the parent and child bodies of the joint.
- Returns
- integer value. 1 = collision on, 0 = collision off.
Definition at line 143 of file OgreNewt_Joint.cpp.
◆ getStiffness()
Ogre::Real OgreNewt::Joint::getStiffness | ( | ) | const |
get joint stiffness
Joint stiffness adjusts how much "play" the joint can have. high stiffness = very small play, but more likely to become unstable.
- Returns
- float representing joint stiffness in range [0,1]
Definition at line 153 of file OgreNewt_Joint.cpp.
◆ GetSupportJoint()
|
protected |
GetSupportJoint.
Definition at line 38 of file OgreNewt_Joint.cpp.
◆ getWorld()
const OgreNewt::World * OgreNewt::Joint::getWorld | ( | ) |
get the pointer to the world
Definition at line 70 of file OgreNewt_Joint.cpp.
◆ setCollisionState()
void OgreNewt::Joint::setCollisionState | ( | int | state | ) | const |
sets the collision state
The collision state determines whether collision should be calculated between the parent and child bodies of the joint.
- Parameters
-
state integer value. 1 = collision on, 0 = collision off.
Definition at line 148 of file OgreNewt_Joint.cpp.
◆ setRowAcceleration()
|
protected |
Definition at line 128 of file OgreNewt_Joint.cpp.
◆ setRowMaximumFriction()
|
protected |
Definition at line 122 of file OgreNewt_Joint.cpp.
◆ setRowMinimumFriction()
|
protected |
Definition at line 116 of file OgreNewt_Joint.cpp.
◆ setRowSpringDamper()
|
protected |
Definition at line 138 of file OgreNewt_Joint.cpp.
◆ setRowStiffness()
|
protected |
Definition at line 133 of file OgreNewt_Joint.cpp.
◆ setStiffness()
void OgreNewt::Joint::setStiffness | ( | Ogre::Real | stiffness | ) | const |
set joint stiffness
Joint stiffness adjusts how much "play" the joint can have. high stiffness = very small play, but more likely to become unstable.
- Parameters
-
stiffness float representing joint stiffness in range [0,1]
Definition at line 158 of file OgreNewt_Joint.cpp.
◆ SetSupportJoint()
|
protected |
SetSupportJoint.
Definition at line 29 of file OgreNewt_Joint.cpp.
◆ showDebugData()
|
inlinevirtual |
show joint visual debugging data
this function is called from the Debug display utility to show joint debug display information the function should be overridden by any derive class who wishes to show debug physics information for this joint in real time.
Reimplemented in OgreNewt::PlayerController, and OgreNewt::Vehicle.
Definition at line 57 of file OgreNewt_Joint.h.
◆ submitConstraint()
|
inlinevirtual |
must be define for a functioning joint.
Reimplemented in OgreNewt::Hinge, OgreNewt::Slider, OgreNewt::PrebuiltCustomJoints::Custom2DJoint, and OgreNewt::PrebuiltCustomJoints::CustomRigidJoint.
Definition at line 50 of file OgreNewt_Joint.h.
◆ submitConstraintCallback()
|
staticprotected |
submintContraint
Definition at line 173 of file OgreNewt_Joint.cpp.
Member Data Documentation
◆ m_joint
|
protected |
Definition at line 130 of file OgreNewt_Joint.h.
The documentation for this class was generated from the following files:
- include/External/ogrenewt/OgreNewt_Joint.h
- src/External/ogrenewt/OgreNewt_Joint.cpp
Generated by 1.9.8