diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-18 00:44:58 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-18 00:44:58 +0300 |
commit | d52400bfbd2a7e4d09b5a71bc461a554d232af15 (patch) | |
tree | 08815f065fc90aac0ae62ae5f3a89d20e19399e6 /extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h | |
parent | 1ac0d54fea831c485e8e27e8bfa887e15beb58de (diff) | |
parent | 28f6d223d079b1e5cb67e3fc22fb7f818deb8dcb (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
2.5 got merged, but no new files were added. Calls to these files
are commented out with "XXX etch-a-ton". editarmature.c and
transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
(player still fails to link).
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h index 8361dcabe4b..d5a299c606f 100644 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h @@ -17,11 +17,12 @@ class btDynamicsWorld; #include "LinearMath/btAlignedObjectArray.h" #include "btWheelInfo.h" +#include "BulletDynamics/Dynamics/btActionInterface.h" class btVehicleTuning; ///rayCast vehicle, very special constraint that turn a rigidbody into a vehicle. -class btRaycastVehicle : public btTypedConstraint +class btRaycastVehicle : public btActionInterface { btAlignedObjectArray<btVector3> m_forwardWS; @@ -29,6 +30,11 @@ class btRaycastVehicle : public btTypedConstraint btAlignedObjectArray<btScalar> m_forwardImpulse; btAlignedObjectArray<btScalar> m_sideImpulse; + int m_userConstraintType; + + int m_userConstraintId; + + public: class btVehicleTuning { @@ -73,13 +79,24 @@ public: virtual ~btRaycastVehicle() ; - + + ///btActionInterface interface + virtual void updateAction( btCollisionWorld* collisionWorld, btScalar step) + { + updateVehicle(step); + } + + + ///btActionInterface interface + void debugDraw(btIDebugDraw* debugDrawer); + const btTransform& getChassisWorldTransform() const; btScalar rayCast(btWheelInfo& wheel); virtual void updateVehicle(btScalar step); - + + void resetSuspension(); btScalar getSteeringValue(int wheel) const; @@ -175,15 +192,24 @@ public: m_indexForwardAxis = forwardIndex; } - virtual void buildJacobian() + int getUserConstraintType() const + { + return m_userConstraintType ; + } + + void setUserConstraintType(int userConstraintType) + { + m_userConstraintType = userConstraintType; + }; + + void setUserConstraintId(int uid) { - //not yet + m_userConstraintId = uid; } - virtual void solveConstraint(btScalar timeStep) + int getUserConstraintId() const { - (void)timeStep; - //not yet + return m_userConstraintId; } |