added more game-engine physics vehicle infrastructure.
authorErwin Coumans <blender@erwincoumans.com>
Mon, 30 Jan 2006 20:49:41 +0000 (20:49 +0000)
committerErwin Coumans <blender@erwincoumans.com>
Mon, 30 Jan 2006 20:49:41 +0000 (20:49 +0000)
source/gameengine/Physics/common/PHY_IVehicle.cpp [new file with mode: 0644]
source/gameengine/Physics/common/PHY_IVehicle.h [new file with mode: 0644]

diff --git a/source/gameengine/Physics/common/PHY_IVehicle.cpp b/source/gameengine/Physics/common/PHY_IVehicle.cpp
new file mode 100644 (file)
index 0000000..3879e83
--- /dev/null
@@ -0,0 +1,7 @@
+
+#include "PHY_IVehicle.h"
+
+PHY_IVehicle::~PHY_IVehicle()
+{
+
+}
diff --git a/source/gameengine/Physics/common/PHY_IVehicle.h b/source/gameengine/Physics/common/PHY_IVehicle.h
new file mode 100644 (file)
index 0000000..655c115
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef PHY_IVEHICLE_H
+#define PHY_IVEHICLE_H
+
+//PHY_IVehicle provides a generic interface for (raycast based) vehicles. Mostly targetting 4 wheel cars and 2 wheel motorbikes.
+
+class PHY_IMotionState;
+#include "PHY_DynamicTypes.h"
+
+class PHY_IVehicle
+{
+public:
+
+       virtual ~PHY_IVehicle();
+       
+       virtual void    AddWheel(
+                       PHY_Vector3     connectionPoint,
+                       PHY_Vector3     downDirection,
+                       PHY_Vector3     axleDirection,
+                       float   suspensionRestLength,
+                       float wheelRadius,
+                       bool hasSteering
+               ) = 0;
+
+
+       virtual int             GetNumWheels() const = 0;
+       
+       virtual const PHY_IMotionState*         GetWheelMotionState(int wheelIndex) const = 0;
+
+       virtual int     GetUserConstraintId() const =0;
+       virtual int     GetUserConstraintType() const =0;
+
+       //some basic steering/braking/tuning/balancing (bikes)
+
+
+};
+
+#endif //PHY_IVEHICLE_H