Phobius
05-04-2009 07:39:17
Here is a patch for maximum angular velocity. This patch is a spawn off of r2497.
Index: OgreOdeBody.cpp
===================================================================
--- OgreOdeBody.cpp (revision 2497)
+++ OgreOdeBody.cpp (working copy)
@@ -245,6 +245,16 @@
}
//-----------------------------------------------------------------------
+Ogre::Real Body::getAngularVelocityMax() const {
+ return (Real)dBodyGetMaxAngularSpeed(_body);
+}
+
+//-----------------------------------------------------------------------
+void Body::setAngularVelocityMax(Ogre::Real angularMax) {
+ dBodySetMaxAngularSpeed(_body, (dReal)angularMax);
+}
+
+//-----------------------------------------------------------------------
const Ogre::String& Body::getMovableType() const
{
return MovableType;
@@ -851,4 +861,4 @@
}
return collided;
-}
\ No newline at end of file
+}Index: OgreOdeBody.h
===================================================================
--- OgreOdeBody.h (revision 2497)
+++ OgreOdeBody.h (working copy)
@@ -173,6 +173,8 @@
const Ogre::Vector3& getLinearVelocity();
const Ogre::Vector3& getAngularVelocity();
+ Ogre::Real getAngularVelocityMax() const;
+ void setAngularVelocityMax(Ogre::Real angularMax);
virtual const Ogre::String& getMovableType() const;
virtual void _notifyAttached(Ogre::Node* parent,bool isTagPoint = false);