SO3Engine
|
OgreNewt_BasicJoints.cpp
Go to the documentation of this file.
21 BallAndSocketLimits::BallAndSocketLimits(const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos) : Joint()
30 suppportJoint = new CustomLimitBallAndSocket(pinsAndPivoFrame, child->getNewtonBody(), parent ? parent->getNewtonBody() : NULL);
39 void BallAndSocketLimits::setLimits(Ogre::Radian maxCone, Ogre::Radian minTwist, Ogre::Radian maxTwist)
88 BallAndSocket::BallAndSocket(const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos) : Joint()
97 suppportJoint = new CustomBallAndSocket(pinsAndPivoFrame, child->getNewtonBody(), parent ? parent->getNewtonBody() : NULL);
148 ControlledBallAndSocket::ControlledBallAndSocket(const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos) : Joint()
157 suppportJoint = new CustomControlledBallAndSocket(pinsAndPivoFrame, child->getNewtonBody(), parent ? parent->getNewtonBody() : NULL);
278 Hinge::Hinge(const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos, const Ogre::Vector3& pin) : Joint()
288 suppportJoint = new CustomHinge(pinsAndPivoFrame, child->getNewtonBody(), parent ? parent->getNewtonBody() : NULL);
575 if (m_useLimits && ((m_constraintType != CONSTRAINT_OMEGA && m_constraintType != CONSTRAINT_ANGLE) || !m_useMotor))
627 Slider::Slider(const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos, const Ogre::Vector3& pin) : Joint()
644 suppportJoint = new CustomSlider(pinsAndPivoFrame, child->getNewtonBody(), parent ? parent->getNewtonBody() : NULL);
756 UpVector::UpVector(const Body* body, const Ogre::Vector3& pin) : Joint(), m_pin(pin.normalisedCopy())
832 void KinematicController::setTargetMatrix(const Ogre::Vector3& position, const Ogre::Quaternion& rotation)
841 void KinematicController::getTargetMatrix(Ogre::Vector3& position, Ogre::Quaternion& rotation) const
861 unsigned _CDECL Slider::newtonCallback(const NewtonJoint* slider, NewtonHingeSliderUpdateDesc* desc)
928 Universal::Universal(const World* world, const OgreNewt::Body* child, const OgreNewt::Body* parent, const Ogre::Vector3& pos, const Ogre::Vector3& pin0, const Ogre::Vector3& pin1) : Joint()
963 unsigned _CDECL Universal::newtonCallback(const NewtonJoint* universal, NewtonHingeSliderUpdateDesc* desc)
1047 m_joint = NewtonConstraintCreateUpVector(world->getNewtonWorld(), &pin.x, body->getNewtonBody());
1090 Custom2DJoint::Custom2DJoint(const OgreNewt::Body* body, const Ogre::Vector3& pin) : CustomJoint(4, body, NULL)
1211 CustomRigidJoint::CustomRigidJoint(OgreNewt::Body *child, OgreNewt::Body *parent, Ogre::Vector3 dir, Ogre::Vector3 pos) : OgreNewt::OgCustomJoint(6, child, parent)
1251 CustomDryRollingFriction::CustomDryRollingFriction( OgreNewt::Body* child, Ogre::Real radius, Ogre::Real rollingFrictionCoefficient ) :
Ogre::Vector3 getJointAngle()
retrieve the current joint angle
Definition OgreNewt_BasicJoints.cpp:106
Ogre::Vector3 getJointForce()
retrieve the current joint force.
Definition OgreNewt_BasicJoints.cpp:134
Ogre::Vector3 getJointOmega()
retrieve the current joint omega
Definition OgreNewt_BasicJoints.cpp:120
BallAndSocket(const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos)
constructor
Definition OgreNewt_BasicJoints.cpp:88
Ogre::Vector3 getJointForce()
retrieve the current joint force.
Definition OgreNewt_BasicJoints.cpp:74
void setLimits(Ogre::Radian maxCone, Ogre::Radian minTwist, Ogre::Radian maxTwist)
set limits for the joints rotation
Definition OgreNewt_BasicJoints.cpp:39
BallAndSocketLimits(const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos)
constructor
Definition OgreNewt_BasicJoints.cpp:21
NewtonBody * getNewtonBody() const
get a pointer to the NewtonBody object
Definition OgreNewt_Body.h:127
void getPositionOrientation(Ogre::Vector3 &pos, Ogre::Quaternion &orient) const
get position and orientation in form of an Ogre::Vector(position) and Ogre::Quaternion(orientation)
Definition OgreNewt_Body.cpp:425
Ogre::Vector3 getJointOmega()
retrieve the current joint omega
Definition OgreNewt_BasicJoints.cpp:180
void SetPitchAngle(Ogre::Real angle)
Definition OgreNewt_BasicJoints.cpp:225
void SetAngularVelocity(Ogre::Real omegaMag)
Definition OgreNewt_BasicJoints.cpp:208
void SetYawAngle(Ogre::Real angle)
Definition OgreNewt_BasicJoints.cpp:242
Ogre::Real GetPitchAngle() const
Definition OgreNewt_BasicJoints.cpp:236
Ogre::Real GetYawAngle() const
Definition OgreNewt_BasicJoints.cpp:253
ControlledBallAndSocket(const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos)
constructor
Definition OgreNewt_BasicJoints.cpp:148
Ogre::Vector3 getJointAngle()
retrieve the current joint angle
Definition OgreNewt_BasicJoints.cpp:166
void SetRollAngle(Ogre::Real angle)
Definition OgreNewt_BasicJoints.cpp:259
Ogre::Vector3 getJointForce()
retrieve the current joint force.
Definition OgreNewt_BasicJoints.cpp:194
Ogre::Real GetAngularVelocity() const
Definition OgreNewt_BasicJoints.cpp:219
Ogre::Real GetRollAngle() const
Definition OgreNewt_BasicJoints.cpp:270
Ogre::Radian getJointAngularVelocity() const
get the relative joint angle around the hinge pin.
Definition OgreNewt_BasicJoints.cpp:435
Ogre::Real m_motorMinFriction
Definition OgreNewt_BasicJoints.h:222
Ogre::Real m_motorMaxFriction
Definition OgreNewt_BasicJoints.h:223
void setLimits(Ogre::Radian minAngle, Ogre::Radian maxAngle)
set minimum and maximum hinge limits.
Definition OgreNewt_BasicJoints.cpp:330
ConstraintType m_constraintType
Definition OgreNewt_BasicJoints.h:209
void setDesiredOmega(Ogre::Radian omega, Ogre::Real strength=0.5f)
sets desired rotational velocity of the joint
Definition OgreNewt_BasicJoints.cpp:345
void setDesiredAngle(Ogre::Radian angle, Ogre::Real minFriction=0, Ogre::Real maxFriction=0)
set desired angle and optionally minimum and maximum friction
Definition OgreNewt_BasicJoints.cpp:378
Hinge(const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos, const Ogre::Vector3 &pin)
constructor
Definition OgreNewt_BasicJoints.cpp:278
void setBrake(Ogre::Real maxForce=0)
apply hinge brake for one frame.
Definition OgreNewt_BasicJoints.cpp:402
Ogre::Vector3 getJointPin() const
get the joint pin in global space
Definition OgreNewt_BasicJoints.cpp:443
virtual void submitConstraint(Ogre::Real timestep, int threadindex)
must be define for a functioning joint.
Definition OgreNewt_BasicJoints.cpp:451
Ogre::Vector3 getJointForce()
retrieve the current joint force.
Definition OgreNewt_BasicJoints.cpp:421
ConstraintType m_lastConstraintType
Definition OgreNewt_BasicJoints.h:210
Ogre::Radian getJointAngle() const
get the relative joint angle around the hinge pin.
Definition OgreNewt_BasicJoints.cpp:415
void setRowMaximumFriction(Ogre::Real friction) const
Definition OgreNewt_Joint.cpp:122
void setRowAcceleration(Ogre::Real accel) const
Definition OgreNewt_Joint.cpp:128
void setRowMinimumFriction(Ogre::Real friction) const
Definition OgreNewt_Joint.cpp:116
void setRowStiffness(Ogre::Real stiffness) const
Definition OgreNewt_Joint.cpp:133
void addAngularRow(Ogre::Radian relativeAngleError, const Ogre::Vector3 &dir) const
Definition OgreNewt_Joint.cpp:89
void setRowSpringDamper(Ogre::Real springK, Ogre::Real springD) const
Definition OgreNewt_Joint.cpp:138
void addLinearRow(const Ogre::Vector3 &pt0, const Ogre::Vector3 &pt1, const Ogre::Vector3 &dir) const
Definition OgreNewt_Joint.cpp:84
void setTargetPosit(const Ogre::Vector3 &position)
set the position part of the attachment matrix
Definition OgreNewt_BasicJoints.cpp:816
void getTargetMatrix(Ogre::Vector3 &position, Ogre::Quaternion &rotation) const
set the position and orientation part of the attachment matrix
Definition OgreNewt_BasicJoints.cpp:841
void setTargetMatrix(const Ogre::Vector3 &position, const Ogre::Quaternion &rotation)
set the position and orientation part of the attachment matrix
Definition OgreNewt_BasicJoints.cpp:832
void setMaxLinearFriction(Ogre::Real accel)
set the linear acceleration the joint can take before the joint is violated .
Definition OgreNewt_BasicJoints.cpp:803
void setMaxAngularFriction(Ogre::Real alpha)
set the angular acceleration the joint can take before the joint is violated .
Definition OgreNewt_BasicJoints.cpp:809
void setTargetRotation(const Ogre::Quaternion &rotation)
set the orientation part of the attachment matrix
Definition OgreNewt_BasicJoints.cpp:823
KinematicController(const OgreNewt::Body *child, const Ogre::Vector3 &pos)
constructor
Definition OgreNewt_BasicJoints.cpp:781
Definition OgreNewt_Joint.h:134
void pinAndDirToLocal(const Ogre::Vector3 &pinpt, const Ogre::Vector3 &pindir, Ogre::Quaternion &localOrient0, Ogre::Vector3 &localPos0, Ogre::Quaternion &localOrient1, Ogre::Vector3 &localPos1) const
Definition OgreNewt_Joint.cpp:198
void localToGlobal(const Ogre::Quaternion &localOrient, const Ogre::Vector3 &localPos, Ogre::Quaternion &globalOrient, Ogre::Vector3 &globalPos, int bodyIndex) const
Definition OgreNewt_Joint.cpp:226
virtual void submitConstraint(Ogre::Real timeStep, int threadIndex)
overloaded function that applies the actual constraint.
Definition OgreNewt_BasicJoints.cpp:1108
Custom2DJoint(const OgreNewt::Body *body, const Ogre::Vector3 &pin)
constructor
Definition OgreNewt_BasicJoints.cpp:1090
CustomRigidJoint(OgreNewt::Body *child, OgreNewt::Body *parent, Ogre::Vector3 dir, Ogre::Vector3 pos)
Definition OgreNewt_BasicJoints.cpp:1211
~CustomRigidJoint()
Definition OgreNewt_BasicJoints.cpp:1217
virtual void submitConstraint(Ogre::Real timeStep, int threadIndex)
must be define for a functioning joint.
Definition OgreNewt_BasicJoints.cpp:1221
void setMotorVelocity(Ogre::Real velocity, Ogre::Real strength)
Definition OgreNewt_BasicJoints.cpp:677
void setSpring(Ogre::Real springStrength, Ogre::Real springDamping)
set spring strenght and damping
Definition OgreNewt_BasicJoints.cpp:709
Slider(const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos, const Ogre::Vector3 &pin)
constructor
Definition OgreNewt_BasicJoints.cpp:627
virtual void submitConstraint(Ogre::Real timestep, int threadindex)
must be define for a functioning joint.
Definition OgreNewt_BasicJoints.cpp:746
Ogre::Vector3 getJointForce()
retrieve the current joint force.
Definition OgreNewt_BasicJoints.cpp:715
void setLimits(Ogre::Real minStopDist, Ogre::Real maxStopDist)
set minimum and maximum stops limits.
Definition OgreNewt_BasicJoints.cpp:690
void setFriction(Ogre::Real friction)
Definition OgreNewt_BasicJoints.cpp:740
Ogre::Real getJointVelocity() const
get the relative joint angle around the hinge pin.
Definition OgreNewt_BasicJoints.cpp:729
Ogre::Real calculateStopAlpha0(Ogre::Real angle) const
calculate the acceleration neccesary to stop the joint at the specified angle on pin 0.
Definition OgreNewt_BasicJoints.cpp:1021
static unsigned _CDECL newtonCallback(const NewtonJoint *universal, NewtonHingeSliderUpdateDesc *desc)
newton callback. used internally.
Definition OgreNewt_BasicJoints.cpp:963
Universal(const World *world, const OgreNewt::Body *child, const OgreNewt::Body *parent, const Ogre::Vector3 &pos, const Ogre::Vector3 &pin0, const Ogre::Vector3 &pin1)
constructor
Definition OgreNewt_BasicJoints.cpp:928
void setCallbackAccel(Ogre::Real accel, unsigned axis)
set the acceleration around a particular pin.
Definition OgreNewt_BasicJoints.cpp:980
void setCallbackFrictionMax(Ogre::Real max, unsigned axis)
set the maximum friction around a particular pin.
Definition OgreNewt_BasicJoints.cpp:991
Ogre::Vector3 getJointForce() const
get the force on the joint.
Definition OgreNewt_BasicJoints.cpp:954
NewtonHingeSliderUpdateDesc * m_desc
Definition OgreNewt_BasicJoints.h:430
Ogre::Real calculateStopAlpha1(Ogre::Real angle) const
calculate the acceleration neccesary to stop the joint at the specified angle on pin 1.
Definition OgreNewt_BasicJoints.cpp:1029
void setCallbackFrictionMin(Ogre::Real min, unsigned axis)
set the minimum friction around a particular pin
Definition OgreNewt_BasicJoints.cpp:1002
Ogre::Real getCallbackTimestep() const
get the current phsics timestep.
Definition OgreNewt_BasicJoints.cpp:1013
const Ogre::Vector3 & getPin() const
get the current pin direction.
Definition OgreNewt_BasicJoints.cpp:775
UpVector(const Body *body, const Ogre::Vector3 &pin)
constructor
Definition OgreNewt_BasicJoints.cpp:756
NewtonWorld * getNewtonWorld() const
retrieves a pointer to the NewtonWorld
Definition OgreNewt_World.h:284
_OgreNewtExport void MatrixToQuatPos(const dFloat *matrix, Ogre::Quaternion &quat, Ogre::Vector3 &pos)
Take a Newton matrix and create a Quaternion + Position_vector.
_OgreNewtExport void QuatPosToMatrix(const Ogre::Quaternion &quat, const Ogre::Vector3 &pos, dFloat *matrix)
Take a Quaternion and Position Matrix and create a Newton-happy float matrix!
Definition OgreNewt_Tools.cpp:33
Generated by 1.9.8