Project

General

Profile

SO3Engine

base class for all joints. More...

#include <OgreNewt_Joint.h>

Inheritance diagram for OgreNewt::Joint:
OgreNewt::BallAndSocket OgreNewt::BallAndSocketLimits OgreNewt::ControlledBallAndSocket OgreNewt::Hinge OgreNewt::KinematicController OgreNewt::OgCustomJoint OgreNewt::PlayerController OgreNewt::Slider OgreNewt::Universal OgreNewt::UpVector OgreNewt::UpVector OgreNewt::Vehicle

Public Member Functions

 Joint ()
 constructor
 
virtual ~Joint ()
 destructor
 
BodygetBody0 () const
 get the pointer to the first rigid body
 
BodygetBody1 () const
 get the pointer to the first rigid body
 
const OgreNewt::WorldgetWorld ()
 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()

OgreNewt::Joint::~Joint ( )
virtual

destructor

Definition at line 18 of file OgreNewt_Joint.cpp.

Member Function Documentation

◆ addAngularRow()

void OgreNewt::Joint::addAngularRow ( Ogre::Radian  relativeAngleError,
const Ogre::Vector3 &  dir 
) const
protected

Definition at line 89 of file OgreNewt_Joint.cpp.

◆ addGeneralRow()

void OgreNewt::Joint::addGeneralRow ( const Ogre::Vector3 &  linear0,
const Ogre::Vector3 &  angular0,
const Ogre::Vector3 &  linear1,
const Ogre::Vector3 &  angular1 
) const
protected

Definition at line 94 of file OgreNewt_Joint.cpp.

◆ addLinearRow()

void OgreNewt::Joint::addLinearRow ( const Ogre::Vector3 &  pt0,
const Ogre::Vector3 &  pt1,
const Ogre::Vector3 &  dir 
) const
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()

void _CDECL OgreNewt::Joint::destructorCallback ( const CustomJoint *  me)
staticprotected

joint destructor callback glue

destructor

Definition at line 164 of file OgreNewt_Joint.cpp.

◆ 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()

CustomJoint * OgreNewt::Joint::GetSupportJoint ( ) const
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
stateinteger value. 1 = collision on, 0 = collision off.

Definition at line 148 of file OgreNewt_Joint.cpp.

◆ setRowAcceleration()

void OgreNewt::Joint::setRowAcceleration ( Ogre::Real  accel) const
protected

Definition at line 128 of file OgreNewt_Joint.cpp.

◆ setRowMaximumFriction()

void OgreNewt::Joint::setRowMaximumFriction ( Ogre::Real  friction) const
protected

Definition at line 122 of file OgreNewt_Joint.cpp.

◆ setRowMinimumFriction()

void OgreNewt::Joint::setRowMinimumFriction ( Ogre::Real  friction) const
protected

Definition at line 116 of file OgreNewt_Joint.cpp.

◆ setRowSpringDamper()

void OgreNewt::Joint::setRowSpringDamper ( Ogre::Real  springK,
Ogre::Real  springD 
) const
protected

Definition at line 138 of file OgreNewt_Joint.cpp.

◆ setRowStiffness()

void OgreNewt::Joint::setRowStiffness ( Ogre::Real  stiffness) const
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
stiffnessfloat representing joint stiffness in range [0,1]

Definition at line 158 of file OgreNewt_Joint.cpp.

◆ SetSupportJoint()

void OgreNewt::Joint::SetSupportJoint ( CustomJoint *  supportJoint)
protected

SetSupportJoint.

Definition at line 29 of file OgreNewt_Joint.cpp.

◆ showDebugData()

virtual void OgreNewt::Joint::showDebugData ( Ogre::SceneNode *  debugRootNode)
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()

virtual void OgreNewt::Joint::submitConstraint ( Ogre::Real  timeStep,
int  threadIndex 
)
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()

void _CDECL OgreNewt::Joint::submitConstraintCallback ( const CustomJoint *  me,
dFloat  timestep,
int  threadIndex 
)
staticprotected

submintContraint

Definition at line 173 of file OgreNewt_Joint.cpp.

Member Data Documentation

◆ m_joint

CustomJoint* OgreNewt::Joint::m_joint
protected

Definition at line 130 of file OgreNewt_Joint.h.


The documentation for this class was generated from the following files: