SO3Engine
|
slider joint. More...
#include <OgreNewt_BasicJoints.h>
Public Member Functions | |
Slider (const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos, const Ogre::Vector3 &pin) | |
constructor | |
~Slider () | |
destructor. | |
void | enableLimits (bool state) |
enable limits. | |
void | setFriction (Ogre::Real friction) |
void | enableMotor (bool state) |
enable motor. | |
void | setMotorVelocity (Ogre::Real velocity, Ogre::Real strength) |
void | setLimits (Ogre::Real minStopDist, Ogre::Real maxStopDist) |
set minimum and maximum stops limits. | |
void | enableSpring (bool state) |
enable spring. | |
void | setSpring (Ogre::Real springStrength, Ogre::Real springDamping) |
set spring strenght and damping | |
Ogre::Vector3 | getJointForce () |
retrieve the current joint force. | |
Ogre::Real | getJointVelocity () const |
get the relative joint angle around the hinge pin. | |
Ogre::Real | getDistance () const |
virtual void | submitConstraint (Ogre::Real timestep, int threadindex) |
must be define for a functioning joint. | |
Public Member Functions inherited from OgreNewt::Joint | |
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 | 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 | |
Additional Inherited Members | |
Protected Member Functions inherited from OgreNewt::Joint | |
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 inherited from OgreNewt::Joint | |
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 inherited from OgreNewt::Joint | |
CustomJoint * | m_joint |
Detailed Description
slider joint.
simple slider joint. implement motors/limits through a callback.
Definition at line 234 of file OgreNewt_BasicJoints.h.
Constructor & Destructor Documentation
◆ Slider()
OgreNewt::Slider::Slider | ( | const OgreNewt::Body * | child, |
const OgreNewt::Body * | parent, | ||
const Ogre::Vector3 & | pos, | ||
const Ogre::Vector3 & | pin | ||
) |
constructor
- Parameters
-
child pointer to the child rigid body. parent pointer to the parent rigid body. pass NULL to make the world itself the parent (aka a rigid joint) pin direction of the joint pin in global space
Definition at line 627 of file OgreNewt_BasicJoints.cpp.
◆ ~Slider()
OgreNewt::Slider::~Slider | ( | ) |
destructor.
Definition at line 648 of file OgreNewt_BasicJoints.cpp.
Member Function Documentation
◆ enableLimits()
void OgreNewt::Slider::enableLimits | ( | bool | state | ) |
enable limits.
Definition at line 653 of file OgreNewt_BasicJoints.cpp.
◆ enableMotor()
void OgreNewt::Slider::enableMotor | ( | bool | state | ) |
enable motor.
Definition at line 666 of file OgreNewt_BasicJoints.cpp.
◆ enableSpring()
void OgreNewt::Slider::enableSpring | ( | bool | state | ) |
enable spring.
Definition at line 704 of file OgreNewt_BasicJoints.cpp.
◆ getDistance()
Ogre::Real OgreNewt::Slider::getDistance | ( | ) | const |
Definition at line 734 of file OgreNewt_BasicJoints.cpp.
◆ getJointForce()
Ogre::Vector3 OgreNewt::Slider::getJointForce | ( | ) |
retrieve the current joint force.
This can be used to find the "stress" on the joint. you can do special effects like break the joint if the force exceedes some value, etc.
Definition at line 715 of file OgreNewt_BasicJoints.cpp.
◆ getJointVelocity()
Ogre::Real OgreNewt::Slider::getJointVelocity | ( | ) | const |
get the relative joint angle around the hinge pin.
Definition at line 729 of file OgreNewt_BasicJoints.cpp.
◆ setFriction()
void OgreNewt::Slider::setFriction | ( | Ogre::Real | friction | ) |
Definition at line 740 of file OgreNewt_BasicJoints.cpp.
◆ setLimits()
void OgreNewt::Slider::setLimits | ( | Ogre::Real | minStopDist, |
Ogre::Real | maxStopDist | ||
) |
set minimum and maximum stops limits.
Definition at line 690 of file OgreNewt_BasicJoints.cpp.
◆ setMotorVelocity()
void OgreNewt::Slider::setMotorVelocity | ( | Ogre::Real | velocity, |
Ogre::Real | strength | ||
) |
Definition at line 677 of file OgreNewt_BasicJoints.cpp.
◆ setSpring()
void OgreNewt::Slider::setSpring | ( | Ogre::Real | springStrength, |
Ogre::Real | springDamping | ||
) |
set spring strenght and damping
Definition at line 709 of file OgreNewt_BasicJoints.cpp.
◆ submitConstraint()
|
virtual |
must be define for a functioning joint.
Reimplemented from OgreNewt::Joint.
Definition at line 746 of file OgreNewt_BasicJoints.cpp.
The documentation for this class was generated from the following files:
- include/External/ogrenewt/OgreNewt_BasicJoints.h
- src/External/ogrenewt/OgreNewt_BasicJoints.cpp
Generated by 1.9.8