Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-03-13 21:04:38 +0300
committerMartin Poirier <theeth@yahoo.com>2009-03-13 21:04:38 +0300
commit54a55827ecee7f25d6a52255d8a639498a678fa6 (patch)
tree6311657bfab7e75fa59e6828e0381bdcd4ec9eda /extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h
parentdff781c2a8c77f35fefe00b0a561235861d4d053 (diff)
parent39acb4efa4c3f35806f5dc37124ff1028eb18215 (diff)
merging trunk 19093:19274etch-a-ton
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h')
-rw-r--r--extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h42
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;
}