ソースを参照

Removed PhysicsCharacter public dependencies on btActionInterface.
Added new generated lua bindings for PhysicsVehicle.

setaylor 13 年 前
コミット
b251d0ded3

+ 4 - 0
gameplay/gameplay.vcxproj

@@ -171,6 +171,8 @@
     <ClCompile Include="src\lua\lua_PhysicsRigidBodyParameters.cpp" />
     <ClCompile Include="src\lua\lua_PhysicsRigidBodyParameters.cpp" />
     <ClCompile Include="src\lua\lua_PhysicsSocketConstraint.cpp" />
     <ClCompile Include="src\lua\lua_PhysicsSocketConstraint.cpp" />
     <ClCompile Include="src\lua\lua_PhysicsSpringConstraint.cpp" />
     <ClCompile Include="src\lua\lua_PhysicsSpringConstraint.cpp" />
+    <ClCompile Include="src\lua\lua_PhysicsVehicle.cpp" />
+    <ClCompile Include="src\lua\lua_PhysicsVehicleWheel.cpp" />
     <ClCompile Include="src\lua\lua_Plane.cpp" />
     <ClCompile Include="src\lua\lua_Plane.cpp" />
     <ClCompile Include="src\lua\lua_Platform.cpp" />
     <ClCompile Include="src\lua\lua_Platform.cpp" />
     <ClCompile Include="src\lua\lua_Properties.cpp" />
     <ClCompile Include="src\lua\lua_Properties.cpp" />
@@ -434,6 +436,8 @@
     <ClInclude Include="src\lua\lua_PhysicsRigidBodyParameters.h" />
     <ClInclude Include="src\lua\lua_PhysicsRigidBodyParameters.h" />
     <ClInclude Include="src\lua\lua_PhysicsSocketConstraint.h" />
     <ClInclude Include="src\lua\lua_PhysicsSocketConstraint.h" />
     <ClInclude Include="src\lua\lua_PhysicsSpringConstraint.h" />
     <ClInclude Include="src\lua\lua_PhysicsSpringConstraint.h" />
+    <ClInclude Include="src\lua\lua_PhysicsVehicle.h" />
+    <ClInclude Include="src\lua\lua_PhysicsVehicleWheel.h" />
     <ClInclude Include="src\lua\lua_Plane.h" />
     <ClInclude Include="src\lua\lua_Plane.h" />
     <ClInclude Include="src\lua\lua_Platform.h" />
     <ClInclude Include="src\lua\lua_Platform.h" />
     <ClInclude Include="src\lua\lua_Properties.h" />
     <ClInclude Include="src\lua\lua_Properties.h" />

+ 12 - 0
gameplay/gameplay.vcxproj.filters

@@ -798,6 +798,12 @@
     <ClCompile Include="src\PhysicsVehicleWheel.cpp">
     <ClCompile Include="src\PhysicsVehicleWheel.cpp">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="src\lua\lua_PhysicsVehicle.cpp">
+      <Filter>lua</Filter>
+    </ClCompile>
+    <ClCompile Include="src\lua\lua_PhysicsVehicleWheel.cpp">
+      <Filter>lua</Filter>
+    </ClCompile>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClInclude Include="src\Animation.h">
     <ClInclude Include="src\Animation.h">
@@ -1586,6 +1592,12 @@
     <ClInclude Include="src\PhysicsVehicle.h">
     <ClInclude Include="src\PhysicsVehicle.h">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="src\lua\lua_PhysicsVehicle.h">
+      <Filter>lua</Filter>
+    </ClInclude>
+    <ClInclude Include="src\lua\lua_PhysicsVehicleWheel.h">
+      <Filter>lua</Filter>
+    </ClInclude>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="src\gameplay-main-macosx.mm">
     <None Include="src\gameplay-main-macosx.mm">

+ 65 - 70
gameplay/src/PhysicsCharacter.cpp

@@ -39,24 +39,6 @@ public:
         if (object == _me || object->getType() == PhysicsCollisionObject::GHOST_OBJECT)
         if (object == _me || object->getType() == PhysicsCollisionObject::GHOST_OBJECT)
             return 1.0f;
             return 1.0f;
 
 
-        /*
-        btVector3 hitNormalWorld;
-        if (normalInWorldSpace)
-        {
-            hitNormalWorld = convexResult.m_hitNormalLocal;
-        } else
-        {
-            // transform normal into worldspace
-            hitNormalWorld = convexResult.m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal;
-        }
-
-        btScalar dotUp = _up.dot(hitNormalWorld);
-        if (dotUp < _minSlopeDot)
-        {
-            return btScalar(1.0);
-        }
-        */
-
         return ClosestConvexResultCallback::addSingleResult(convexResult, normalInWorldSpace);
         return ClosestConvexResultCallback::addSingleResult(convexResult, normalInWorldSpace);
     }
     }
 
 
@@ -71,7 +53,7 @@ PhysicsCharacter::PhysicsCharacter(Node* node, const PhysicsCollisionShape::Defi
     : PhysicsGhostObject(node, shape), _moveVelocity(0,0,0), _forwardVelocity(0.0f), _rightVelocity(0.0f),
     : PhysicsGhostObject(node, shape), _moveVelocity(0,0,0), _forwardVelocity(0.0f), _rightVelocity(0.0f),
     _verticalVelocity(0, 0, 0), _currentVelocity(0,0,0), _normalizedVelocity(0,0,0),
     _verticalVelocity(0, 0, 0), _currentVelocity(0,0,0), _normalizedVelocity(0,0,0),
     _colliding(false), _collisionNormal(0,0,0), _currentPosition(0,0,0), _stepHeight(0.1f),
     _colliding(false), _collisionNormal(0,0,0), _currentPosition(0,0,0), _stepHeight(0.1f),
-    _slopeAngle(0.0f), _cosSlopeAngle(0.0f), _physicsEnabled(true), _mass(mass)
+    _slopeAngle(0.0f), _cosSlopeAngle(0.0f), _physicsEnabled(true), _mass(mass), _actionInterface(NULL)
 {
 {
     setMaxSlopeAngle(45.0f);
     setMaxSlopeAngle(45.0f);
 
 
@@ -81,14 +63,17 @@ PhysicsCharacter::PhysicsCharacter(Node* node, const PhysicsCollisionShape::Defi
 
 
     // Register ourselves as an action on the physics world so we are called back during physics ticks.
     // Register ourselves as an action on the physics world so we are called back during physics ticks.
     GP_ASSERT(Game::getInstance()->getPhysicsController() && Game::getInstance()->getPhysicsController()->_world);
     GP_ASSERT(Game::getInstance()->getPhysicsController() && Game::getInstance()->getPhysicsController()->_world);
-    Game::getInstance()->getPhysicsController()->_world->addAction(this);
+    _actionInterface = new ActionInterface(this);
+    Game::getInstance()->getPhysicsController()->_world->addAction(_actionInterface);
 }
 }
 
 
 PhysicsCharacter::~PhysicsCharacter()
 PhysicsCharacter::~PhysicsCharacter()
 {
 {
     // Unregister ourselves as action from world.
     // Unregister ourselves as action from world.
     GP_ASSERT(Game::getInstance()->getPhysicsController() && Game::getInstance()->getPhysicsController()->_world);
     GP_ASSERT(Game::getInstance()->getPhysicsController() && Game::getInstance()->getPhysicsController()->_world);
-    Game::getInstance()->getPhysicsController()->_world->removeAction(this);
+    Game::getInstance()->getPhysicsController()->_world->removeAction(_actionInterface);
+    SAFE_DELETE(_actionInterface);
+
 }
 }
 
 
 PhysicsCharacter* PhysicsCharacter::create(Node* node, Properties* properties)
 PhysicsCharacter* PhysicsCharacter::create(Node* node, Properties* properties)
@@ -318,53 +303,6 @@ void PhysicsCharacter::updateCurrentVelocity()
     }
     }
 }
 }
 
 
-void PhysicsCharacter::updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep)
-{
-    GP_ASSERT(_ghostObject);
-    GP_ASSERT(_node);
-
-    // First check for existing collisions and attempt to respond/fix them.
-    // Basically we are trying to move the character so that it does not penetrate
-    // any other collision objects in the scene. We need to do this to ensure that
-    // the following steps (movement) start from a clean slate, where the character
-    // is not colliding with anything. Also, this step handles collision between
-    // dynamic objects (i.e. objects that moved and now intersect the character).
-    if (_physicsEnabled)
-    {
-        _colliding = false;
-        int stepCount = 0;
-        while (fixCollision(collisionWorld))
-        {
-            _colliding = true;
-
-            if (++stepCount > 4)
-            {
-                // Most likely we are wedged between a number of different collision objects.
-                break;
-            }
-        }
-    }
-
-    // Update current and target world positions.
-    btVector3 startPosition = _ghostObject->getWorldTransform().getOrigin();
-    _currentPosition = startPosition;
-
-    // Process movement in the up direction.
-    if (_physicsEnabled)
-        stepUp(collisionWorld, deltaTimeStep);
-    
-    // Process horizontal movement.
-    stepForwardAndStrafe(collisionWorld, deltaTimeStep);
-
-    // Process movement in the down direction.
-    if (_physicsEnabled)
-        stepDown(collisionWorld, deltaTimeStep);
-
-    // Set new position.
-    btVector3 translation = _currentPosition - startPosition;
-    _node->translate(translation.x(), translation.y(), translation.z());
-}
-
 void PhysicsCharacter::stepUp(btCollisionWorld* collisionWorld, btScalar time)
 void PhysicsCharacter::stepUp(btCollisionWorld* collisionWorld, btScalar time)
 {
 {
     btVector3 targetPosition(_currentPosition);
     btVector3 targetPosition(_currentPosition);
@@ -692,9 +630,66 @@ bool PhysicsCharacter::fixCollision(btCollisionWorld* world)
     return collision;
     return collision;
 }
 }
 
 
-void PhysicsCharacter::debugDraw(btIDebugDraw* debugDrawer)
+PhysicsCharacter::ActionInterface::ActionInterface(PhysicsCharacter* character) : character(character)
 {
 {
-    // debug drawing handled by PhysicsController
 }
 }
 
 
+void PhysicsCharacter::ActionInterface::updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep)
+{
+    character->updateAction(collisionWorld, deltaTimeStep);
+}
+
+void PhysicsCharacter::ActionInterface::debugDraw(btIDebugDraw* debugDrawer)
+{
+    // Not used yet.
+}
+
+void PhysicsCharacter::updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep)
+{
+    GP_ASSERT(_ghostObject);
+    GP_ASSERT(_node);
+
+    // First check for existing collisions and attempt to respond/fix them.
+    // Basically we are trying to move the character so that it does not penetrate
+    // any other collision objects in the scene. We need to do this to ensure that
+    // the following steps (movement) start from a clean slate, where the character
+    // is not colliding with anything. Also, this step handles collision between
+    // dynamic objects (i.e. objects that moved and now intersect the character).
+    if (_physicsEnabled)
+    {
+        _colliding = false;
+        int stepCount = 0;
+        while (fixCollision(collisionWorld))
+        {
+            _colliding = true;
+
+            if (++stepCount > 4)
+            {
+                // Most likely we are wedged between a number of different collision objects.
+                break;
+            }
+        }
+    }
+
+    // Update current and target world positions.
+    btVector3 startPosition = _ghostObject->getWorldTransform().getOrigin();
+    _currentPosition = startPosition;
+
+    // Process movement in the up direction.
+    if (_physicsEnabled)
+        stepUp(collisionWorld, deltaTimeStep);
+    
+    // Process horizontal movement.
+    stepForwardAndStrafe(collisionWorld, deltaTimeStep);
+
+    // Process movement in the down direction.
+    if (_physicsEnabled)
+        stepDown(collisionWorld, deltaTimeStep);
+
+    // Set new position.
+    btVector3 translation = _currentPosition - startPosition;
+    _node->translate(translation.x(), translation.y(), translation.z());
+}
+
+
 }
 }

+ 21 - 13
gameplay/src/PhysicsCharacter.h

@@ -19,7 +19,7 @@ namespace gameplay
  * character than would be possible if trying to move a character by applying
  * character than would be possible if trying to move a character by applying
  * physical simulation with forces.
  * physical simulation with forces.
  */
  */
-class PhysicsCharacter : public PhysicsGhostObject, public btActionInterface
+class PhysicsCharacter : public PhysicsGhostObject
 {
 {
     friend class Node;
     friend class Node;
 
 
@@ -179,18 +179,6 @@ public:
      */
      */
     void jump(float height);
     void jump(float height);
 
 
-    /**
-     * @see btActionInterface::updateAction
-     * @script{ignore}
-     */
-    void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep);
-
-    /**
-     * @see btActionInterface::debugDraw
-     * @script{ignore}
-     */
-    void debugDraw(btIDebugDraw* debugDrawer);
-
 protected:
 protected:
 
 
     /**
     /**
@@ -240,6 +228,25 @@ private:
 
 
     bool fixCollision(btCollisionWorld* world);
     bool fixCollision(btCollisionWorld* world);
 
 
+    /**
+     * Hides the callback interfaces within the PhysicsCharacter.
+     * @script{ignore}
+     */
+    class ActionInterface : public btActionInterface
+    {
+    public:
+
+        ActionInterface(PhysicsCharacter* character);
+
+        void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep);
+
+        void debugDraw(btIDebugDraw* debugDrawer);
+        
+        PhysicsCharacter* character;
+    };
+
+    void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep);
+
     btVector3 _moveVelocity;
     btVector3 _moveVelocity;
     float _forwardVelocity;
     float _forwardVelocity;
     float _rightVelocity;
     float _rightVelocity;
@@ -255,6 +262,7 @@ private:
     float _cosSlopeAngle;
     float _cosSlopeAngle;
     bool _physicsEnabled;
     bool _physicsEnabled;
     float _mass;
     float _mass;
+    ActionInterface* _actionInterface;
 };
 };
 
 
 }
 }

+ 2 - 3
gameplay/src/PhysicsRigidBody.h

@@ -344,10 +344,9 @@ private:
     /**
     /**
      * Creates a rigid body from the specified properties object.
      * Creates a rigid body from the specified properties object.
      * 
      * 
-     * @param node The node to create a rigid body for; note that the node must have
-     *      a model attached to it prior to creating a rigid body for it.
+     * @param node The node to create a rigid body for; note that the node must have a model attached to it prior to creating a rigid body for it.
      * @param properties The properties object defining the rigid body.
      * @param properties The properties object defining the rigid body.
-     * @param namespace The namespace expected (default is "RIGID_BODY").
+     * @param nspace The namespace expected (default is "RIGID_BODY").
      * @return The newly created rigid body, or <code>NULL</code> if the rigid body failed to load.
      * @return The newly created rigid body, or <code>NULL</code> if the rigid body failed to load.
      */
      */
     static PhysicsRigidBody* create(Node* node, Properties* properties, const char* nspace = "RIGID_BODY");
     static PhysicsRigidBody* create(Node* node, Properties* properties, const char* nspace = "RIGID_BODY");

+ 23 - 22
gameplay/src/PhysicsVehicle.cpp

@@ -1,24 +1,23 @@
 #include "Base.h"
 #include "Base.h"
-#include "Game.h" // for access to physics controller
+#include "Game.h"
 #include "Node.h"
 #include "Node.h"
 #include "PhysicsVehicle.h"
 #include "PhysicsVehicle.h"
 #include "PhysicsVehicleWheel.h"
 #include "PhysicsVehicleWheel.h"
-//TODO: move inline implementations into a separate INL file
 
 
 namespace gameplay
 namespace gameplay
 {
 {
 
 
-//
-// The default vehicle raycaster in Bullet currently does not filter out the vehicle's own
-// rigid body from the ray test which can result in unexpected behavior. These implementations
-// are intended to fix that.
-//
+/**
+  * The default vehicle raycaster in Bullet currently does not filter out the vehicle's own
+  * rigid body from the ray test which can result in unexpected behavior. These implementations
+  * are intended to fix that.
+  *
+  * @script{ignore}
+  */
 class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
 class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
 {
 {
-private:
-    btCollisionObject* _me;
-
 public:
 public:
+
     ClosestNotMeRayResultCallback(const btVector3& from, const btVector3& to, btCollisionObject* me)
     ClosestNotMeRayResultCallback(const btVector3& from, const btVector3& to, btCollisionObject* me)
         : btCollisionWorld::ClosestRayResultCallback(from, to), _me(me)
         : btCollisionWorld::ClosestRayResultCallback(from, to), _me(me)
     {
     {
@@ -31,14 +30,20 @@ public:
 
 
         return ClosestRayResultCallback::addSingleResult(rayResult, normalInWorldSpace);
         return ClosestRayResultCallback::addSingleResult(rayResult, normalInWorldSpace);
     }
     }
+
+private:
+
+    btCollisionObject* _me;
 };
 };
 
 
+/**
+  * @script{ignore}
+  */
 class VehicleNotMeRaycaster : public btVehicleRaycaster
 class VehicleNotMeRaycaster : public btVehicleRaycaster
 {
 {
-    btDynamicsWorld* _dynamicsWorld;
-    btCollisionObject* _me;
 
 
 public:
 public:
+
     VehicleNotMeRaycaster(btDynamicsWorld* world, btCollisionObject* me)
     VehicleNotMeRaycaster(btDynamicsWorld* world, btCollisionObject* me)
         : _dynamicsWorld(world), _me(me)
         : _dynamicsWorld(world), _me(me)
     {
     {
@@ -47,7 +52,6 @@ public:
     void* castRay(const btVector3& from, const btVector3& to, btVehicleRaycasterResult& result)
     void* castRay(const btVector3& from, const btVector3& to, btVehicleRaycasterResult& result)
     {
     {
         ClosestNotMeRayResultCallback rayCallback(from, to, _me);
         ClosestNotMeRayResultCallback rayCallback(from, to, _me);
-
         _dynamicsWorld->rayTest(from, to, rayCallback);
         _dynamicsWorld->rayTest(from, to, rayCallback);
 
 
         if (rayCallback.hasHit())
         if (rayCallback.hasHit())
@@ -64,15 +68,18 @@ public:
         }
         }
         return 0;
         return 0;
     }
     }
+
+private:
+
+    btDynamicsWorld* _dynamicsWorld;
+    btCollisionObject* _me;
 };
 };
 
 
 PhysicsVehicle::PhysicsVehicle(Node* node, const PhysicsCollisionShape::Definition& shape, const PhysicsRigidBody::Parameters& parameters)
 PhysicsVehicle::PhysicsVehicle(Node* node, const PhysicsCollisionShape::Definition& shape, const PhysicsRigidBody::Parameters& parameters)
     : PhysicsCollisionObject(node)
     : PhysicsCollisionObject(node)
 {
 {
-    //
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // that is where the rigid body gets added to the dynamics world.
     // that is where the rigid body gets added to the dynamics world.
-    //
     _rigidBody = new PhysicsRigidBody(node, shape, parameters);
     _rigidBody = new PhysicsRigidBody(node, shape, parameters);
 
 
     initialize();
     initialize();
@@ -88,12 +95,9 @@ PhysicsVehicle::PhysicsVehicle(Node* node, PhysicsRigidBody* rigidBody)
 
 
 PhysicsVehicle* PhysicsVehicle::create(Node* node, Properties* properties)
 PhysicsVehicle* PhysicsVehicle::create(Node* node, Properties* properties)
 {
 {
-    //
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // that is where the rigid body gets added to the dynamics world.
     // that is where the rigid body gets added to the dynamics world.
-    //
     PhysicsRigidBody* rigidBody = PhysicsRigidBody::create(node, properties, "VEHICLE");
     PhysicsRigidBody* rigidBody = PhysicsRigidBody::create(node, properties, "VEHICLE");
-
     PhysicsVehicle* vehicle = new PhysicsVehicle(node, rigidBody);
     PhysicsVehicle* vehicle = new PhysicsVehicle(node, rigidBody);
 
 
     // Load the defined vehicle parameters.
     // Load the defined vehicle parameters.
@@ -141,7 +145,7 @@ void PhysicsVehicle::initialize()
     _vehicle->setCoordinateSystem(0, 1, 2);
     _vehicle->setCoordinateSystem(0, 1, 2);
 
 
     // Advertise self among ancestor nodes so that wheels can bind to self.
     // Advertise self among ancestor nodes so that wheels can bind to self.
-    // (See PhysicsVehicleWheel and Node for more details).
+    // See PhysicsVehicleWheel and Node for more details.
     for (Node* n = getNode()->getParent(); n; n = n->getParent())
     for (Node* n = getNode()->getParent(); n; n = n->getParent())
     {
     {
         n->addAdvertisedDescendant(getNode());
         n->addAdvertisedDescendant(getNode());
@@ -150,12 +154,9 @@ void PhysicsVehicle::initialize()
 
 
 PhysicsVehicle::~PhysicsVehicle()
 PhysicsVehicle::~PhysicsVehicle()
 {
 {
-    //
     // Note that the destructor for PhysicsRigidBody calls removeCollisionObject and so
     // Note that the destructor for PhysicsRigidBody calls removeCollisionObject and so
     // that is where the rigid body gets removed from the dynamics world. The vehicle
     // that is where the rigid body gets removed from the dynamics world. The vehicle
     // itself is just an action interface in the dynamics world.
     // itself is just an action interface in the dynamics world.
-    //
-
     SAFE_DELETE(_vehicle);
     SAFE_DELETE(_vehicle);
     SAFE_DELETE(_vehicleRaycaster);
     SAFE_DELETE(_vehicleRaycaster);
     SAFE_DELETE(_rigidBody);
     SAFE_DELETE(_rigidBody);

+ 11 - 11
gameplay/src/PhysicsVehicle.h

@@ -51,14 +51,14 @@ public:
     /**
     /**
      * Returns the rigid body associated with this vehicle.
      * Returns the rigid body associated with this vehicle.
      */
      */
-    /*TODO: inline*/ PhysicsRigidBody* getRigidBody() const;
+    PhysicsRigidBody* getRigidBody() const;
 
 
     /**
     /**
      * Returns the number of wheels on this vehicle.
      * Returns the number of wheels on this vehicle.
      *
      *
      * @return the number of wheels on this vehicle.
      * @return the number of wheels on this vehicle.
      */
      */
-    /*TODO: inline*/ unsigned int getNumWheels() const;
+    unsigned int getNumWheels() const;
 
 
     /**
     /**
      * Gets the wheel at the specified index.
      * Gets the wheel at the specified index.
@@ -66,7 +66,7 @@ public:
      * @param i index of wheel.
      * @param i index of wheel.
      * @return the wheel at the specified index.
      * @return the wheel at the specified index.
      */
      */
-    /*TODO: inline*/ PhysicsVehicleWheel* getWheel(unsigned int i);
+    PhysicsVehicleWheel* getWheel(unsigned int i);
 
 
     /**
     /**
      * Permanently adds a wheel to this vehicle.
      * Permanently adds a wheel to this vehicle.
@@ -78,7 +78,7 @@ public:
     /**
     /**
      * Returns an indication of vehicle speed in kilometers per hour.
      * Returns an indication of vehicle speed in kilometers per hour.
      */
      */
-    /*TODO: inline*/ float getSpeedKph() const;
+    float getSpeedKph() const;
 
 
     /**
     /**
      * Updates the vehicle state using the specified normalized command
      * Updates the vehicle state using the specified normalized command
@@ -95,42 +95,42 @@ public:
      *
      *
      * @return steering gain at full deflection.
      * @return steering gain at full deflection.
      */
      */
-    /*TODO: inline*/ float getSteeringGain() const;
+    float getSteeringGain() const;
 
 
     /**
     /**
      * Sets steering gain at full deflection.
      * Sets steering gain at full deflection.
      *
      *
      * @param steeringGain steering gain at full deflection.
      * @param steeringGain steering gain at full deflection.
      */
      */
-    /*TODO: inline*/ void setSteeringGain(float steeringGain);
+    void setSteeringGain(float steeringGain);
 
 
     /**
     /**
      * Gets braking force at full braking.
      * Gets braking force at full braking.
      *
      *
      * @return braking force at full braking.
      * @return braking force at full braking.
      */
      */
-    /*TODO: inline*/ float getBrakingForce() const;
+    float getBrakingForce() const;
 
 
     /**
     /**
      * Sets braking force at full braking.
      * Sets braking force at full braking.
      *
      *
      * @param brakingForce braking force at full braking.
      * @param brakingForce braking force at full braking.
      */
      */
-    /*TODO: inline*/ void setBrakingForce(float brakingForce);
+    void setBrakingForce(float brakingForce);
 
 
     /**
     /**
      * Gets driving force at full throttle.
      * Gets driving force at full throttle.
      *
      *
      * @return driving force at full throttle.
      * @return driving force at full throttle.
      */
      */
-    /*TODO: inline*/ float getDrivingForce() const;
+    float getDrivingForce() const;
 
 
     /**
     /**
      * Sets driving force at full throttle.
      * Sets driving force at full throttle.
      *
      *
      * @param drivingForce driving force at full throttle.
      * @param drivingForce driving force at full throttle.
      */
      */
-    /*TODO: inline*/ void setDrivingForce(float drivingForce);
+    void setDrivingForce(float drivingForce);
 
 
 protected:
 protected:
 
 
@@ -202,4 +202,4 @@ private:
 
 
 }
 }
 
 
-#endif /* PHYSICSVEHICLE_H_ */
+#endif

+ 7 - 23
gameplay/src/PhysicsVehicleWheel.cpp

@@ -2,7 +2,6 @@
 #include "Node.h"
 #include "Node.h"
 #include "PhysicsVehicle.h"
 #include "PhysicsVehicle.h"
 #include "PhysicsVehicleWheel.h"
 #include "PhysicsVehicleWheel.h"
-//TODO: move inline implementations into a separate INL file
 
 
 namespace gameplay
 namespace gameplay
 {
 {
@@ -10,10 +9,8 @@ namespace gameplay
 PhysicsVehicleWheel::PhysicsVehicleWheel(Node* node, const PhysicsCollisionShape::Definition& shape, const PhysicsRigidBody::Parameters& parameters)
 PhysicsVehicleWheel::PhysicsVehicleWheel(Node* node, const PhysicsCollisionShape::Definition& shape, const PhysicsRigidBody::Parameters& parameters)
     : PhysicsCollisionObject(node)
     : PhysicsCollisionObject(node)
 {
 {
-    //
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // that is where the rigid body gets added to the dynamics world.
     // that is where the rigid body gets added to the dynamics world.
-    //
     _rigidBody = new PhysicsRigidBody(node, shape, parameters);
     _rigidBody = new PhysicsRigidBody(node, shape, parameters);
 
 
     findAncestorAndBind();
     findAncestorAndBind();
@@ -29,12 +26,9 @@ PhysicsVehicleWheel::PhysicsVehicleWheel(Node* node, PhysicsRigidBody* rigidBody
 
 
 PhysicsVehicleWheel* PhysicsVehicleWheel::create(Node* node, Properties* properties)
 PhysicsVehicleWheel* PhysicsVehicleWheel::create(Node* node, Properties* properties)
 {
 {
-    //
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // Note that the constructor for PhysicsRigidBody calls addCollisionObject and so
     // that is where the rigid body gets added to the dynamics world.
     // that is where the rigid body gets added to the dynamics world.
-    //
     PhysicsRigidBody* rigidBody = PhysicsRigidBody::create(node, properties, "VEHICLE_WHEEL");
     PhysicsRigidBody* rigidBody = PhysicsRigidBody::create(node, properties, "VEHICLE_WHEEL");
-
     PhysicsVehicleWheel* wheel = new PhysicsVehicleWheel(node, rigidBody);
     PhysicsVehicleWheel* wheel = new PhysicsVehicleWheel(node, rigidBody);
 
 
     // Load the defined wheel parameters.
     // Load the defined wheel parameters.
@@ -125,16 +119,14 @@ void PhysicsVehicleWheel::findAncestorAndBind()
 {
 {
     GP_ASSERT(getNode());
     GP_ASSERT(getNode());
 
 
-    //
     // This is not an efficient algorithm if the number of advertised
     // This is not an efficient algorithm if the number of advertised
     // descendants gets large. In fact, this search is O(n*m) in the
     // descendants gets large. In fact, this search is O(n*m) in the
     // worst case with n nodes and m advertised descendants per node.
     // worst case with n nodes and m advertised descendants per node.
     // But (1) we are only visiting ancestor nodes, and (2) the number
     // But (1) we are only visiting ancestor nodes, and (2) the number
     // of advertised descendants is expected to be small since this
     // of advertised descendants is expected to be small since this
-    // mechanism is currently only used for binding wheels onto a
-    // vehicle.
-    //TODO: revisit if the advertised descendants mechanism becomes popular.
+    // mechanism is currently only used for binding wheels onto a vehicle.
     //
     //
+    // TODO: revisit if the advertised descendants mechanism becomes popular.
     PhysicsVehicle* host = NULL;
     PhysicsVehicle* host = NULL;
     PhysicsCollisionObject* collisionObject;
     PhysicsCollisionObject* collisionObject;
     Node* m;
     Node* m;
@@ -224,10 +216,7 @@ void PhysicsVehicleWheel::setWheelDirection(const Vector3& wheelDirection)
     GP_ASSERT(_host);
     GP_ASSERT(_host);
     GP_ASSERT(_host->_vehicle);
     GP_ASSERT(_host->_vehicle);
 
 
-    _host->_vehicle->getWheelInfo(_indexInHost).m_wheelDirectionCS.setValue(
-        wheelDirection.x,
-        wheelDirection.y,
-        wheelDirection.z);
+    _host->_vehicle->getWheelInfo(_indexInHost).m_wheelDirectionCS.setValue(wheelDirection.x, wheelDirection.y, wheelDirection.z);
 }
 }
 
 
 void PhysicsVehicleWheel::getWheelAxle(Vector3* wheelAxle) const
 void PhysicsVehicleWheel::getWheelAxle(Vector3* wheelAxle) const
@@ -244,10 +233,7 @@ void PhysicsVehicleWheel::setWheelAxle(const Vector3& wheelAxle)
     GP_ASSERT(_host);
     GP_ASSERT(_host);
     GP_ASSERT(_host->_vehicle);
     GP_ASSERT(_host->_vehicle);
 
 
-    _host->_vehicle->getWheelInfo(_indexInHost).m_wheelAxleCS.setValue(
-        wheelAxle.x,
-        wheelAxle.y,
-        wheelAxle.z);
+    _host->_vehicle->getWheelInfo(_indexInHost).m_wheelAxleCS.setValue( wheelAxle.x, wheelAxle.y, wheelAxle.z);
 }
 }
 
 
 void PhysicsVehicleWheel::getStrutConnectionPoint(Vector3* strutConnectionPoint) const
 void PhysicsVehicleWheel::getStrutConnectionPoint(Vector3* strutConnectionPoint) const
@@ -263,11 +249,9 @@ void PhysicsVehicleWheel::setStrutConnectionPoint(const Vector3& strutConnection
 {
 {
     GP_ASSERT(_host);
     GP_ASSERT(_host);
     GP_ASSERT(_host->_vehicle);
     GP_ASSERT(_host->_vehicle);
-
-    _host->_vehicle->getWheelInfo(_indexInHost).m_chassisConnectionPointCS.setValue(
-        strutConnectionPoint.x,
-        strutConnectionPoint.y,
-        strutConnectionPoint.z);
+    _host->_vehicle->getWheelInfo(_indexInHost).m_chassisConnectionPointCS.setValue(strutConnectionPoint.x,
+                                                                                    strutConnectionPoint.y,
+                                                                                    strutConnectionPoint.z);
 }
 }
 
 
 float PhysicsVehicleWheel::getStrutRestLength() const
 float PhysicsVehicleWheel::getStrutRestLength() const

+ 28 - 28
gameplay/src/PhysicsVehicleWheel.h

@@ -65,182 +65,182 @@ public:
      *
      *
      * @return true if this is a front wheel, false otherwise.
      * @return true if this is a front wheel, false otherwise.
      */
      */
-    /*TODO: inline*/ bool isFront() const;
+    bool isFront() const;
 
 
     /**
     /**
      * Sets whether this is a front wheel.
      * Sets whether this is a front wheel.
      *
      *
      * @param front true if this is a front wheel, false otherwise.
      * @param front true if this is a front wheel, false otherwise.
      */
      */
-    /*TODO: inline*/ void setFront(bool front);
+    void setFront(bool front);
 
 
     /**
     /**
      * Gets direction of strut extension, in chassis space.
      * Gets direction of strut extension, in chassis space.
      *
      *
      * @param wheelDirection address of where to store the result.
      * @param wheelDirection address of where to store the result.
      */
      */
-    /*TODO: inline*/ void getWheelDirection(Vector3* wheelDirection) const;
+    void getWheelDirection(Vector3* wheelDirection) const;
 
 
     /**
     /**
      * Sets direction of strut extension, in chassis space.
      * Sets direction of strut extension, in chassis space.
      *
      *
      * @param wheelDirection direction of strut extension.
      * @param wheelDirection direction of strut extension.
      */
      */
-    /*TODO: inline*/ void setWheelDirection(const Vector3& wheelDirection);
+    void setWheelDirection(const Vector3& wheelDirection);
 
 
     /**
     /**
      * Gets direction of axle (the spin axis), in chassis space.
      * Gets direction of axle (the spin axis), in chassis space.
      *
      *
      * @param wheelAxle address of where to store the result.
      * @param wheelAxle address of where to store the result.
      */
      */
-    /*TODO: inline*/ void getWheelAxle(Vector3* wheelAxle) const;
+    void getWheelAxle(Vector3* wheelAxle) const;
 
 
     /**
     /**
      * Sets direction of axle (the spin axis), in chassis space.
      * Sets direction of axle (the spin axis), in chassis space.
      *
      *
      * @param wheelAxle direction of axle (the spin axis).
      * @param wheelAxle direction of axle (the spin axis).
      */
      */
-    /*TODO: inline*/ void setWheelAxle(const Vector3& wheelAxle);
+    void setWheelAxle(const Vector3& wheelAxle);
 
 
     /**
     /**
      * Gets strut connection point, in chassis space.
      * Gets strut connection point, in chassis space.
      *
      *
      * @param strutConnectionPoint address of where to store the result.
      * @param strutConnectionPoint address of where to store the result.
      */
      */
-    /*TODO: inline*/ void getStrutConnectionPoint(Vector3* strutConnectionPoint) const;
+    void getStrutConnectionPoint(Vector3* strutConnectionPoint) const;
 
 
     /**
     /**
      * Sets strut connection point, in chassis space.
      * Sets strut connection point, in chassis space.
      *
      *
      * @param strutConnectionPoint strut connection point.
      * @param strutConnectionPoint strut connection point.
      */
      */
-    /*TODO: inline*/ void setStrutConnectionPoint(const Vector3& strutConnectionPoint);
+    void setStrutConnectionPoint(const Vector3& strutConnectionPoint);
 
 
     /**
     /**
      * Gets the strut rest length.
      * Gets the strut rest length.
      *
      *
      * @return the strut rest length.
      * @return the strut rest length.
      */
      */
-    /*TODO: inline*/ float getStrutRestLength() const;
+    float getStrutRestLength() const;
 
 
     /**
     /**
      * Sets the strut rest length.
      * Sets the strut rest length.
      *
      *
      * @param strutRestLength the strut rest length.
      * @param strutRestLength the strut rest length.
      */
      */
-    /*TODO: inline*/ void setStrutRestLength(float strutRestLength);
+    void setStrutRestLength(float strutRestLength);
 
 
     /**
     /**
      * Gets the maximum strut travel.
      * Gets the maximum strut travel.
      *
      *
      * @return the maximum strut travel.
      * @return the maximum strut travel.
      */
      */
-    /*TODO: inline*/ float getStrutTravelMax() const;
+    float getStrutTravelMax() const;
 
 
     /**
     /**
      * Sets the maximum strut travel.
      * Sets the maximum strut travel.
      *
      *
      * @param strutTravelMax the maximum strut travel.
      * @param strutTravelMax the maximum strut travel.
      */
      */
-    /*TODO: inline*/ void setStrutTravelMax(float strutTravelMax);
+    void setStrutTravelMax(float strutTravelMax);
 
 
     /**
     /**
      * Gets the strut stiffness, normalized to chassis mass.
      * Gets the strut stiffness, normalized to chassis mass.
      *
      *
      * @return the strut stiffness, normalized to chassis mass.
      * @return the strut stiffness, normalized to chassis mass.
      */
      */
-    /*TODO: inline*/ float getStrutStiffness() const;
+    float getStrutStiffness() const;
 
 
     /**
     /**
      * Sets the strut stiffness, normalized to chassis mass.
      * Sets the strut stiffness, normalized to chassis mass.
      *
      *
      * @param strutStiffness the strut stiffness, normalized to chassis mass.
      * @param strutStiffness the strut stiffness, normalized to chassis mass.
      */
      */
-    /*TODO: inline*/ void setStrutStiffness(float strutStiffness);
+    void setStrutStiffness(float strutStiffness);
 
 
     /**
     /**
      * Gets strut damping under compression, normalized to chassis mass.
      * Gets strut damping under compression, normalized to chassis mass.
      *
      *
      * @return strut damping under compression, normalized to chassis mass.
      * @return strut damping under compression, normalized to chassis mass.
      */
      */
-    /*TODO: inline*/ float getStrutDampingCompression() const;
+    float getStrutDampingCompression() const;
 
 
     /**
     /**
      * Sets strut damping under compression, normalized to chassis mass.
      * Sets strut damping under compression, normalized to chassis mass.
      *
      *
      * @param strutDampingCompression strut damping under compression, normalized to chassis mass.
      * @param strutDampingCompression strut damping under compression, normalized to chassis mass.
      */
      */
-    /*TODO: inline*/ void setStrutDampingCompression(float strutDampingCompression);
+    void setStrutDampingCompression(float strutDampingCompression);
 
 
     /**
     /**
      * Gets strut damping under relaxation, normalized to chassis mass.
      * Gets strut damping under relaxation, normalized to chassis mass.
      *
      *
      * @return strut damping under relaxation, normalized to chassis mass.
      * @return strut damping under relaxation, normalized to chassis mass.
      */
      */
-    /*TODO: inline*/ float getStrutDampingRelaxation() const;
+    float getStrutDampingRelaxation() const;
 
 
     /**
     /**
      * Sets strut damping under relaxation, normalized to chassis mass.
      * Sets strut damping under relaxation, normalized to chassis mass.
      *
      *
      * @param strutDampingRelaxation strut damping under relaxation, normalized to chassis mass.
      * @param strutDampingRelaxation strut damping under relaxation, normalized to chassis mass.
      */
      */
-    /*TODO: inline*/ void setStrutDampingRelaxation(float strutDampingRelaxation);
+    void setStrutDampingRelaxation(float strutDampingRelaxation);
 
 
     /**
     /**
      * Gets the maximum strut force.
      * Gets the maximum strut force.
      *
      *
      * @return the maximum strut force.
      * @return the maximum strut force.
      */
      */
-    /*TODO: inline*/ float getStrutForceMax() const;
+    float getStrutForceMax() const;
 
 
     /**
     /**
      * Sets the maximum strut force.
      * Sets the maximum strut force.
      *
      *
      * @param strutForceMax the maximum strut force.
      * @param strutForceMax the maximum strut force.
      */
      */
-    /*TODO: inline*/ void setStrutForceMax(float strutForceMax);
+    void setStrutForceMax(float strutForceMax);
 
 
     /**
     /**
      * Gets the breakout friction.
      * Gets the breakout friction.
      *
      *
      * @return the breakout friction.
      * @return the breakout friction.
      */
      */
-    /*TODO: inline*/ float getFrictionBreakout() const;
+    float getFrictionBreakout() const;
 
 
     /**
     /**
      * Sets the breakout friction.
      * Sets the breakout friction.
      *
      *
      * @param frictionBreakout the breakout friction.
      * @param frictionBreakout the breakout friction.
      */
      */
-    /*TODO: inline*/ void setFrictionBreakout(float frictionBreakout);
+    void setFrictionBreakout(float frictionBreakout);
 
 
     /**
     /**
      * Gets the wheel radius.
      * Gets the wheel radius.
      *
      *
      * @return the wheel radius.
      * @return the wheel radius.
      */
      */
-    /*TODO: inline*/ float getWheelRadius() const;
+    float getWheelRadius() const;
 
 
     /**
     /**
      * Sets the wheel radius.
      * Sets the wheel radius.
      *
      *
      * @param wheelRadius the wheel radius.
      * @param wheelRadius the wheel radius.
      */
      */
-    /*TODO: inline*/ void setWheelRadius(float wheelRadius);
+    void setWheelRadius(float wheelRadius);
 
 
     /**
     /**
      * Gets roll influence which determines how side friction affects chassis roll.
      * Gets roll influence which determines how side friction affects chassis roll.
      *
      *
      * @return roll influence, normalized factor.
      * @return roll influence, normalized factor.
      */
      */
-    /*TODO: inline*/ float getRollInfluence() const;
+    float getRollInfluence() const;
 
 
     /**
     /**
      * Sets roll influence which determines how side friction affects chassis roll.
      * Sets roll influence which determines how side friction affects chassis roll.
      *
      *
      * @param rollInfluence roll influence, normalized factor.
      * @param rollInfluence roll influence, normalized factor.
      */
      */
-    /*TODO: inline*/ void setRollInfluence(float rollInfluence);
+    void setRollInfluence(float rollInfluence);
 
 
 protected:
 protected:
 
 
@@ -317,7 +317,7 @@ private:
      * @param host the host vehicle.
      * @param host the host vehicle.
      * @param indexInHost the index of this wheel within the host vehicle.
      * @param indexInHost the index of this wheel within the host vehicle.
      */
      */
-    /*TODO: inline*/ void setHost(PhysicsVehicle* host, unsigned int indexInHost);
+    void setHost(PhysicsVehicle* host, unsigned int indexInHost);
 
 
     /**
     /**
      * Adds this wheel to the specified Bullet vehicle.
      * Adds this wheel to the specified Bullet vehicle.
@@ -333,4 +333,4 @@ private:
 
 
 }
 }
 
 
-#endif /* PHYSICSVEHICLEWHEEL_H_ */
+#endif

+ 6 - 6
gameplay/src/lua/lua_GestureGestureEvent.cpp

@@ -6,33 +6,33 @@ namespace gameplay
 
 
 static const char* enumStringEmpty = "";
 static const char* enumStringEmpty = "";
 
 
+static const char* luaEnumString_GestureGestureEvent_GESTURE_TAP = "GESTURE_TAP";
 static const char* luaEnumString_GestureGestureEvent_GESTURE_SWIPE = "GESTURE_SWIPE";
 static const char* luaEnumString_GestureGestureEvent_GESTURE_SWIPE = "GESTURE_SWIPE";
 static const char* luaEnumString_GestureGestureEvent_GESTURE_PINCH = "GESTURE_PINCH";
 static const char* luaEnumString_GestureGestureEvent_GESTURE_PINCH = "GESTURE_PINCH";
-static const char* luaEnumString_GestureGestureEvent_GESTURE_TAP = "GESTURE_TAP";
 static const char* luaEnumString_GestureGestureEvent_GESTURE_ANY_SUPPORTED = "GESTURE_ANY_SUPPORTED";
 static const char* luaEnumString_GestureGestureEvent_GESTURE_ANY_SUPPORTED = "GESTURE_ANY_SUPPORTED";
 
 
 Gesture::GestureEvent lua_enumFromString_GestureGestureEvent(const char* s)
 Gesture::GestureEvent lua_enumFromString_GestureGestureEvent(const char* s)
 {
 {
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_TAP) == 0)
+        return Gesture::GESTURE_TAP;
     if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_SWIPE) == 0)
     if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_SWIPE) == 0)
         return Gesture::GESTURE_SWIPE;
         return Gesture::GESTURE_SWIPE;
     if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_PINCH) == 0)
     if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_PINCH) == 0)
         return Gesture::GESTURE_PINCH;
         return Gesture::GESTURE_PINCH;
-    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_TAP) == 0)
-        return Gesture::GESTURE_TAP;
     if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_ANY_SUPPORTED) == 0)
     if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_ANY_SUPPORTED) == 0)
         return Gesture::GESTURE_ANY_SUPPORTED;
         return Gesture::GESTURE_ANY_SUPPORTED;
     GP_ERROR("Invalid enumeration value '%s' for enumeration Gesture::GestureEvent.", s);
     GP_ERROR("Invalid enumeration value '%s' for enumeration Gesture::GestureEvent.", s);
-    return Gesture::GESTURE_SWIPE;
+    return Gesture::GESTURE_TAP;
 }
 }
 
 
 const char* lua_stringFromEnum_GestureGestureEvent(Gesture::GestureEvent e)
 const char* lua_stringFromEnum_GestureGestureEvent(Gesture::GestureEvent e)
 {
 {
+    if (e == Gesture::GESTURE_TAP)
+        return luaEnumString_GestureGestureEvent_GESTURE_TAP;
     if (e == Gesture::GESTURE_SWIPE)
     if (e == Gesture::GESTURE_SWIPE)
         return luaEnumString_GestureGestureEvent_GESTURE_SWIPE;
         return luaEnumString_GestureGestureEvent_GESTURE_SWIPE;
     if (e == Gesture::GESTURE_PINCH)
     if (e == Gesture::GESTURE_PINCH)
         return luaEnumString_GestureGestureEvent_GESTURE_PINCH;
         return luaEnumString_GestureGestureEvent_GESTURE_PINCH;
-    if (e == Gesture::GESTURE_TAP)
-        return luaEnumString_GestureGestureEvent_GESTURE_TAP;
     if (e == Gesture::GESTURE_ANY_SUPPORTED)
     if (e == Gesture::GESTURE_ANY_SUPPORTED)
         return luaEnumString_GestureGestureEvent_GESTURE_ANY_SUPPORTED;
         return luaEnumString_GestureGestureEvent_GESTURE_ANY_SUPPORTED;
     GP_ERROR("Invalid enumeration value '%d' for enumeration Gesture::GestureEvent.", e);
     GP_ERROR("Invalid enumeration value '%d' for enumeration Gesture::GestureEvent.", e);

+ 5 - 1
gameplay/src/lua/lua_Global.cpp

@@ -44,6 +44,8 @@ void luaRegister_lua_Global()
     ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsCharacter");
     ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsCharacter");
     ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsGhostObject");
     ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsGhostObject");
     ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsRigidBody");
     ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsRigidBody");
+    ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsVehicle");
+    ScriptUtil::setGlobalHierarchyPair("PhysicsCollisionObject", "PhysicsVehicleWheel");
     ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsFixedConstraint");
     ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsFixedConstraint");
     ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsGenericConstraint");
     ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsGenericConstraint");
     ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsHingeConstraint");
     ScriptUtil::setGlobalHierarchyPair("PhysicsConstraint", "PhysicsHingeConstraint");
@@ -360,9 +362,9 @@ void luaRegister_lua_Global()
     {
     {
         std::vector<std::string> scopePath;
         std::vector<std::string> scopePath;
         scopePath.push_back("Gesture");
         scopePath.push_back("Gesture");
+        ScriptUtil::registerConstantString("GESTURE_TAP", "GESTURE_TAP", scopePath);
         ScriptUtil::registerConstantString("GESTURE_SWIPE", "GESTURE_SWIPE", scopePath);
         ScriptUtil::registerConstantString("GESTURE_SWIPE", "GESTURE_SWIPE", scopePath);
         ScriptUtil::registerConstantString("GESTURE_PINCH", "GESTURE_PINCH", scopePath);
         ScriptUtil::registerConstantString("GESTURE_PINCH", "GESTURE_PINCH", scopePath);
-        ScriptUtil::registerConstantString("GESTURE_TAP", "GESTURE_TAP", scopePath);
         ScriptUtil::registerConstantString("GESTURE_ANY_SUPPORTED", "GESTURE_ANY_SUPPORTED", scopePath);
         ScriptUtil::registerConstantString("GESTURE_ANY_SUPPORTED", "GESTURE_ANY_SUPPORTED", scopePath);
     }
     }
 
 
@@ -632,6 +634,8 @@ void luaRegister_lua_Global()
         ScriptUtil::registerConstantString("RIGID_BODY", "RIGID_BODY", scopePath);
         ScriptUtil::registerConstantString("RIGID_BODY", "RIGID_BODY", scopePath);
         ScriptUtil::registerConstantString("CHARACTER", "CHARACTER", scopePath);
         ScriptUtil::registerConstantString("CHARACTER", "CHARACTER", scopePath);
         ScriptUtil::registerConstantString("GHOST_OBJECT", "GHOST_OBJECT", scopePath);
         ScriptUtil::registerConstantString("GHOST_OBJECT", "GHOST_OBJECT", scopePath);
+        ScriptUtil::registerConstantString("VEHICLE", "VEHICLE", scopePath);
+        ScriptUtil::registerConstantString("VEHICLE_WHEEL", "VEHICLE_WHEEL", scopePath);
         ScriptUtil::registerConstantString("NONE", "NONE", scopePath);
         ScriptUtil::registerConstantString("NONE", "NONE", scopePath);
     }
     }
 
 

+ 130 - 0
gameplay/src/lua/lua_Joint.cpp

@@ -12,6 +12,8 @@
 #include "PhysicsCharacter.h"
 #include "PhysicsCharacter.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsRigidBody.h"
 #include "PhysicsRigidBody.h"
+#include "PhysicsVehicle.h"
+#include "PhysicsVehicleWheel.h"
 #include "Ref.h"
 #include "Ref.h"
 #include "Scene.h"
 #include "Scene.h"
 #include "ScriptController.h"
 #include "ScriptController.h"
@@ -28,6 +30,7 @@ void luaRegister_Joint()
 {
 {
     const luaL_Reg lua_members[] = 
     const luaL_Reg lua_members[] = 
     {
     {
+        {"addAdvertisedDescendant", lua_Joint_addAdvertisedDescendant},
         {"addChild", lua_Joint_addChild},
         {"addChild", lua_Joint_addChild},
         {"addListener", lua_Joint_addListener},
         {"addListener", lua_Joint_addListener},
         {"addRef", lua_Joint_addRef},
         {"addRef", lua_Joint_addRef},
@@ -40,6 +43,7 @@ void luaRegister_Joint()
         {"findNode", lua_Joint_findNode},
         {"findNode", lua_Joint_findNode},
         {"getActiveCameraTranslationView", lua_Joint_getActiveCameraTranslationView},
         {"getActiveCameraTranslationView", lua_Joint_getActiveCameraTranslationView},
         {"getActiveCameraTranslationWorld", lua_Joint_getActiveCameraTranslationWorld},
         {"getActiveCameraTranslationWorld", lua_Joint_getActiveCameraTranslationWorld},
+        {"getAdvertisedDescendant", lua_Joint_getAdvertisedDescendant},
         {"getAgent", lua_Joint_getAgent},
         {"getAgent", lua_Joint_getAgent},
         {"getAnimation", lua_Joint_getAnimation},
         {"getAnimation", lua_Joint_getAnimation},
         {"getAnimationPropertyComponentCount", lua_Joint_getAnimationPropertyComponentCount},
         {"getAnimationPropertyComponentCount", lua_Joint_getAnimationPropertyComponentCount},
@@ -67,6 +71,7 @@ void luaRegister_Joint()
         {"getMatrix", lua_Joint_getMatrix},
         {"getMatrix", lua_Joint_getMatrix},
         {"getModel", lua_Joint_getModel},
         {"getModel", lua_Joint_getModel},
         {"getNextSibling", lua_Joint_getNextSibling},
         {"getNextSibling", lua_Joint_getNextSibling},
+        {"getNumAdvertisedDescendants", lua_Joint_getNumAdvertisedDescendants},
         {"getParent", lua_Joint_getParent},
         {"getParent", lua_Joint_getParent},
         {"getParticleEmitter", lua_Joint_getParticleEmitter},
         {"getParticleEmitter", lua_Joint_getParticleEmitter},
         {"getPreviousSibling", lua_Joint_getPreviousSibling},
         {"getPreviousSibling", lua_Joint_getPreviousSibling},
@@ -216,6 +221,44 @@ int lua_Joint__gc(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
+int lua_Joint_addAdvertisedDescendant(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
+
+                Joint* instance = getInstance(state);
+                instance->addAdvertisedDescendant(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_Joint_addAdvertisedDescendant - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joint_addChild(lua_State* state)
 int lua_Joint_addChild(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.
@@ -1043,6 +1086,56 @@ int lua_Joint_getActiveCameraTranslationWorld(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
+int lua_Joint_getAdvertisedDescendant(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
+
+                Joint* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getAdvertisedDescendant(param1);
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Node");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_Joint_getAdvertisedDescendant - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joint_getAgent(lua_State* state)
 int lua_Joint_getAgent(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.
@@ -2370,6 +2463,43 @@ int lua_Joint_getNextSibling(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
+int lua_Joint_getNumAdvertisedDescendants(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joint* instance = getInstance(state);
+                unsigned int result = instance->getNumAdvertisedDescendants();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_Joint_getNumAdvertisedDescendants - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joint_getParent(lua_State* state)
 int lua_Joint_getParent(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.

+ 3 - 0
gameplay/src/lua/lua_Joint.h

@@ -6,6 +6,7 @@ namespace gameplay
 
 
 // Lua bindings for Joint.
 // Lua bindings for Joint.
 int lua_Joint__gc(lua_State* state);
 int lua_Joint__gc(lua_State* state);
+int lua_Joint_addAdvertisedDescendant(lua_State* state);
 int lua_Joint_addChild(lua_State* state);
 int lua_Joint_addChild(lua_State* state);
 int lua_Joint_addListener(lua_State* state);
 int lua_Joint_addListener(lua_State* state);
 int lua_Joint_addRef(lua_State* state);
 int lua_Joint_addRef(lua_State* state);
@@ -18,6 +19,7 @@ int lua_Joint_destroyAnimation(lua_State* state);
 int lua_Joint_findNode(lua_State* state);
 int lua_Joint_findNode(lua_State* state);
 int lua_Joint_getActiveCameraTranslationView(lua_State* state);
 int lua_Joint_getActiveCameraTranslationView(lua_State* state);
 int lua_Joint_getActiveCameraTranslationWorld(lua_State* state);
 int lua_Joint_getActiveCameraTranslationWorld(lua_State* state);
+int lua_Joint_getAdvertisedDescendant(lua_State* state);
 int lua_Joint_getAgent(lua_State* state);
 int lua_Joint_getAgent(lua_State* state);
 int lua_Joint_getAnimation(lua_State* state);
 int lua_Joint_getAnimation(lua_State* state);
 int lua_Joint_getAnimationPropertyComponentCount(lua_State* state);
 int lua_Joint_getAnimationPropertyComponentCount(lua_State* state);
@@ -45,6 +47,7 @@ int lua_Joint_getLight(lua_State* state);
 int lua_Joint_getMatrix(lua_State* state);
 int lua_Joint_getMatrix(lua_State* state);
 int lua_Joint_getModel(lua_State* state);
 int lua_Joint_getModel(lua_State* state);
 int lua_Joint_getNextSibling(lua_State* state);
 int lua_Joint_getNextSibling(lua_State* state);
+int lua_Joint_getNumAdvertisedDescendants(lua_State* state);
 int lua_Joint_getParent(lua_State* state);
 int lua_Joint_getParent(lua_State* state);
 int lua_Joint_getParticleEmitter(lua_State* state);
 int lua_Joint_getParticleEmitter(lua_State* state);
 int lua_Joint_getPreviousSibling(lua_State* state);
 int lua_Joint_getPreviousSibling(lua_State* state);

+ 130 - 0
gameplay/src/lua/lua_Node.cpp

@@ -11,6 +11,8 @@
 #include "PhysicsCharacter.h"
 #include "PhysicsCharacter.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsRigidBody.h"
 #include "PhysicsRigidBody.h"
+#include "PhysicsVehicle.h"
+#include "PhysicsVehicleWheel.h"
 #include "Ref.h"
 #include "Ref.h"
 #include "Scene.h"
 #include "Scene.h"
 #include "ScriptController.h"
 #include "ScriptController.h"
@@ -27,6 +29,7 @@ void luaRegister_Node()
 {
 {
     const luaL_Reg lua_members[] = 
     const luaL_Reg lua_members[] = 
     {
     {
+        {"addAdvertisedDescendant", lua_Node_addAdvertisedDescendant},
         {"addChild", lua_Node_addChild},
         {"addChild", lua_Node_addChild},
         {"addListener", lua_Node_addListener},
         {"addListener", lua_Node_addListener},
         {"addRef", lua_Node_addRef},
         {"addRef", lua_Node_addRef},
@@ -39,6 +42,7 @@ void luaRegister_Node()
         {"findNode", lua_Node_findNode},
         {"findNode", lua_Node_findNode},
         {"getActiveCameraTranslationView", lua_Node_getActiveCameraTranslationView},
         {"getActiveCameraTranslationView", lua_Node_getActiveCameraTranslationView},
         {"getActiveCameraTranslationWorld", lua_Node_getActiveCameraTranslationWorld},
         {"getActiveCameraTranslationWorld", lua_Node_getActiveCameraTranslationWorld},
+        {"getAdvertisedDescendant", lua_Node_getAdvertisedDescendant},
         {"getAgent", lua_Node_getAgent},
         {"getAgent", lua_Node_getAgent},
         {"getAnimation", lua_Node_getAnimation},
         {"getAnimation", lua_Node_getAnimation},
         {"getAnimationPropertyComponentCount", lua_Node_getAnimationPropertyComponentCount},
         {"getAnimationPropertyComponentCount", lua_Node_getAnimationPropertyComponentCount},
@@ -65,6 +69,7 @@ void luaRegister_Node()
         {"getMatrix", lua_Node_getMatrix},
         {"getMatrix", lua_Node_getMatrix},
         {"getModel", lua_Node_getModel},
         {"getModel", lua_Node_getModel},
         {"getNextSibling", lua_Node_getNextSibling},
         {"getNextSibling", lua_Node_getNextSibling},
+        {"getNumAdvertisedDescendants", lua_Node_getNumAdvertisedDescendants},
         {"getParent", lua_Node_getParent},
         {"getParent", lua_Node_getParent},
         {"getParticleEmitter", lua_Node_getParticleEmitter},
         {"getParticleEmitter", lua_Node_getParticleEmitter},
         {"getPreviousSibling", lua_Node_getPreviousSibling},
         {"getPreviousSibling", lua_Node_getPreviousSibling},
@@ -215,6 +220,44 @@ int lua_Node__gc(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
+int lua_Node_addAdvertisedDescendant(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
+
+                Node* instance = getInstance(state);
+                instance->addAdvertisedDescendant(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_Node_addAdvertisedDescendant - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Node_addChild(lua_State* state)
 int lua_Node_addChild(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.
@@ -1042,6 +1085,56 @@ int lua_Node_getActiveCameraTranslationWorld(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
+int lua_Node_getAdvertisedDescendant(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
+
+                Node* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getAdvertisedDescendant(param1);
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Node");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_Node_getAdvertisedDescendant - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Node_getAgent(lua_State* state)
 int lua_Node_getAgent(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.
@@ -2323,6 +2416,43 @@ int lua_Node_getNextSibling(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
+int lua_Node_getNumAdvertisedDescendants(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Node* instance = getInstance(state);
+                unsigned int result = instance->getNumAdvertisedDescendants();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_Node_getNumAdvertisedDescendants - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Node_getParent(lua_State* state)
 int lua_Node_getParent(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.

+ 3 - 0
gameplay/src/lua/lua_Node.h

@@ -6,6 +6,7 @@ namespace gameplay
 
 
 // Lua bindings for Node.
 // Lua bindings for Node.
 int lua_Node__gc(lua_State* state);
 int lua_Node__gc(lua_State* state);
+int lua_Node_addAdvertisedDescendant(lua_State* state);
 int lua_Node_addChild(lua_State* state);
 int lua_Node_addChild(lua_State* state);
 int lua_Node_addListener(lua_State* state);
 int lua_Node_addListener(lua_State* state);
 int lua_Node_addRef(lua_State* state);
 int lua_Node_addRef(lua_State* state);
@@ -18,6 +19,7 @@ int lua_Node_destroyAnimation(lua_State* state);
 int lua_Node_findNode(lua_State* state);
 int lua_Node_findNode(lua_State* state);
 int lua_Node_getActiveCameraTranslationView(lua_State* state);
 int lua_Node_getActiveCameraTranslationView(lua_State* state);
 int lua_Node_getActiveCameraTranslationWorld(lua_State* state);
 int lua_Node_getActiveCameraTranslationWorld(lua_State* state);
+int lua_Node_getAdvertisedDescendant(lua_State* state);
 int lua_Node_getAgent(lua_State* state);
 int lua_Node_getAgent(lua_State* state);
 int lua_Node_getAnimation(lua_State* state);
 int lua_Node_getAnimation(lua_State* state);
 int lua_Node_getAnimationPropertyComponentCount(lua_State* state);
 int lua_Node_getAnimationPropertyComponentCount(lua_State* state);
@@ -44,6 +46,7 @@ int lua_Node_getLight(lua_State* state);
 int lua_Node_getMatrix(lua_State* state);
 int lua_Node_getMatrix(lua_State* state);
 int lua_Node_getModel(lua_State* state);
 int lua_Node_getModel(lua_State* state);
 int lua_Node_getNextSibling(lua_State* state);
 int lua_Node_getNextSibling(lua_State* state);
+int lua_Node_getNumAdvertisedDescendants(lua_State* state);
 int lua_Node_getParent(lua_State* state);
 int lua_Node_getParent(lua_State* state);
 int lua_Node_getParticleEmitter(lua_State* state);
 int lua_Node_getParticleEmitter(lua_State* state);
 int lua_Node_getPreviousSibling(lua_State* state);
 int lua_Node_getPreviousSibling(lua_State* state);

+ 2 - 0
gameplay/src/lua/lua_NodeCloneContext.cpp

@@ -11,6 +11,8 @@
 #include "PhysicsCharacter.h"
 #include "PhysicsCharacter.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsRigidBody.h"
 #include "PhysicsRigidBody.h"
+#include "PhysicsVehicle.h"
+#include "PhysicsVehicleWheel.h"
 #include "Ref.h"
 #include "Ref.h"
 #include "Scene.h"
 #include "Scene.h"
 #include "ScriptController.h"
 #include "ScriptController.h"

+ 10 - 0
gameplay/src/lua/lua_PhysicsCollisionObjectType.cpp

@@ -9,6 +9,8 @@ static const char* enumStringEmpty = "";
 static const char* luaEnumString_PhysicsCollisionObjectType_RIGID_BODY = "RIGID_BODY";
 static const char* luaEnumString_PhysicsCollisionObjectType_RIGID_BODY = "RIGID_BODY";
 static const char* luaEnumString_PhysicsCollisionObjectType_CHARACTER = "CHARACTER";
 static const char* luaEnumString_PhysicsCollisionObjectType_CHARACTER = "CHARACTER";
 static const char* luaEnumString_PhysicsCollisionObjectType_GHOST_OBJECT = "GHOST_OBJECT";
 static const char* luaEnumString_PhysicsCollisionObjectType_GHOST_OBJECT = "GHOST_OBJECT";
+static const char* luaEnumString_PhysicsCollisionObjectType_VEHICLE = "VEHICLE";
+static const char* luaEnumString_PhysicsCollisionObjectType_VEHICLE_WHEEL = "VEHICLE_WHEEL";
 static const char* luaEnumString_PhysicsCollisionObjectType_NONE = "NONE";
 static const char* luaEnumString_PhysicsCollisionObjectType_NONE = "NONE";
 
 
 PhysicsCollisionObject::Type lua_enumFromString_PhysicsCollisionObjectType(const char* s)
 PhysicsCollisionObject::Type lua_enumFromString_PhysicsCollisionObjectType(const char* s)
@@ -19,6 +21,10 @@ PhysicsCollisionObject::Type lua_enumFromString_PhysicsCollisionObjectType(const
         return PhysicsCollisionObject::CHARACTER;
         return PhysicsCollisionObject::CHARACTER;
     if (strcmp(s, luaEnumString_PhysicsCollisionObjectType_GHOST_OBJECT) == 0)
     if (strcmp(s, luaEnumString_PhysicsCollisionObjectType_GHOST_OBJECT) == 0)
         return PhysicsCollisionObject::GHOST_OBJECT;
         return PhysicsCollisionObject::GHOST_OBJECT;
+    if (strcmp(s, luaEnumString_PhysicsCollisionObjectType_VEHICLE) == 0)
+        return PhysicsCollisionObject::VEHICLE;
+    if (strcmp(s, luaEnumString_PhysicsCollisionObjectType_VEHICLE_WHEEL) == 0)
+        return PhysicsCollisionObject::VEHICLE_WHEEL;
     if (strcmp(s, luaEnumString_PhysicsCollisionObjectType_NONE) == 0)
     if (strcmp(s, luaEnumString_PhysicsCollisionObjectType_NONE) == 0)
         return PhysicsCollisionObject::NONE;
         return PhysicsCollisionObject::NONE;
     GP_ERROR("Invalid enumeration value '%s' for enumeration PhysicsCollisionObject::Type.", s);
     GP_ERROR("Invalid enumeration value '%s' for enumeration PhysicsCollisionObject::Type.", s);
@@ -33,6 +39,10 @@ const char* lua_stringFromEnum_PhysicsCollisionObjectType(PhysicsCollisionObject
         return luaEnumString_PhysicsCollisionObjectType_CHARACTER;
         return luaEnumString_PhysicsCollisionObjectType_CHARACTER;
     if (e == PhysicsCollisionObject::GHOST_OBJECT)
     if (e == PhysicsCollisionObject::GHOST_OBJECT)
         return luaEnumString_PhysicsCollisionObjectType_GHOST_OBJECT;
         return luaEnumString_PhysicsCollisionObjectType_GHOST_OBJECT;
+    if (e == PhysicsCollisionObject::VEHICLE)
+        return luaEnumString_PhysicsCollisionObjectType_VEHICLE;
+    if (e == PhysicsCollisionObject::VEHICLE_WHEEL)
+        return luaEnumString_PhysicsCollisionObjectType_VEHICLE_WHEEL;
     if (e == PhysicsCollisionObject::NONE)
     if (e == PhysicsCollisionObject::NONE)
         return luaEnumString_PhysicsCollisionObjectType_NONE;
         return luaEnumString_PhysicsCollisionObjectType_NONE;
     GP_ERROR("Invalid enumeration value '%d' for enumeration PhysicsCollisionObject::Type.", e);
     GP_ERROR("Invalid enumeration value '%d' for enumeration PhysicsCollisionObject::Type.", e);

+ 1072 - 0
gameplay/src/lua/lua_PhysicsVehicle.cpp

@@ -0,0 +1,1072 @@
+#include "Base.h"
+#include "ScriptController.h"
+#include "lua_PhysicsVehicle.h"
+#include "Base.h"
+#include "Game.h"
+#include "Node.h"
+#include "PhysicsCollisionObject.h"
+#include "PhysicsController.h"
+#include "PhysicsVehicle.h"
+#include "PhysicsVehicleWheel.h"
+#include "ScriptController.h"
+#include "lua_PhysicsCollisionObjectCollisionListenerEventType.h"
+#include "lua_PhysicsCollisionObjectType.h"
+#include "lua_PhysicsCollisionShapeType.h"
+
+namespace gameplay
+{
+
+void luaRegister_PhysicsVehicle()
+{
+    const luaL_Reg lua_members[] = 
+    {
+        {"addCollisionListener", lua_PhysicsVehicle_addCollisionListener},
+        {"addWheel", lua_PhysicsVehicle_addWheel},
+        {"collidesWith", lua_PhysicsVehicle_collidesWith},
+        {"getBrakingForce", lua_PhysicsVehicle_getBrakingForce},
+        {"getCollisionShape", lua_PhysicsVehicle_getCollisionShape},
+        {"getDrivingForce", lua_PhysicsVehicle_getDrivingForce},
+        {"getNode", lua_PhysicsVehicle_getNode},
+        {"getNumWheels", lua_PhysicsVehicle_getNumWheels},
+        {"getRigidBody", lua_PhysicsVehicle_getRigidBody},
+        {"getShapeType", lua_PhysicsVehicle_getShapeType},
+        {"getSpeedKph", lua_PhysicsVehicle_getSpeedKph},
+        {"getSteeringGain", lua_PhysicsVehicle_getSteeringGain},
+        {"getType", lua_PhysicsVehicle_getType},
+        {"getWheel", lua_PhysicsVehicle_getWheel},
+        {"isDynamic", lua_PhysicsVehicle_isDynamic},
+        {"isEnabled", lua_PhysicsVehicle_isEnabled},
+        {"isKinematic", lua_PhysicsVehicle_isKinematic},
+        {"removeCollisionListener", lua_PhysicsVehicle_removeCollisionListener},
+        {"setBrakingForce", lua_PhysicsVehicle_setBrakingForce},
+        {"setDrivingForce", lua_PhysicsVehicle_setDrivingForce},
+        {"setEnabled", lua_PhysicsVehicle_setEnabled},
+        {"setSteeringGain", lua_PhysicsVehicle_setSteeringGain},
+        {"update", lua_PhysicsVehicle_update},
+        {NULL, NULL}
+    };
+    const luaL_Reg* lua_statics = NULL;
+    std::vector<std::string> scopePath;
+
+    ScriptUtil::registerClass("PhysicsVehicle", lua_members, NULL, NULL, lua_statics, scopePath);
+}
+
+static PhysicsVehicle* getInstance(lua_State* state)
+{
+    void* userdata = luaL_checkudata(state, 1, "PhysicsVehicle");
+    luaL_argcheck(state, userdata != NULL, 1, "'PhysicsVehicle' expected.");
+    return (PhysicsVehicle*)((ScriptUtil::LuaObject*)userdata)->instance;
+}
+
+int lua_PhysicsVehicle_addCollisionListener(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->addCollisionListener(param1);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->addCollisionListener(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_addCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->addCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->addCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_addCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_addWheel(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsVehicleWheel> param1 = ScriptUtil::getObjectPointer<PhysicsVehicleWheel>(2, "PhysicsVehicleWheel", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->addWheel(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_addWheel - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_collidesWith(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(2, "PhysicsCollisionObject", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                bool result = instance->collidesWith(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_collidesWith - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getBrakingForce(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                float result = instance->getBrakingForce();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getBrakingForce - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getCollisionShape(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getCollisionShape();
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "PhysicsCollisionShape");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getCollisionShape - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getDrivingForce(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                float result = instance->getDrivingForce();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getDrivingForce - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getNode(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getNode();
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Node");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getNode - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getNumWheels(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                unsigned int result = instance->getNumWheels();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getNumWheels - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getRigidBody(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getRigidBody();
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "PhysicsRigidBody");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getRigidBody - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getShapeType(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                PhysicsCollisionShape::Type result = instance->getShapeType();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_PhysicsCollisionShapeType(result));
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getShapeType - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getSpeedKph(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                float result = instance->getSpeedKph();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getSpeedKph - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getSteeringGain(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                float result = instance->getSteeringGain();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getSteeringGain - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getType(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                PhysicsCollisionObject::Type result = instance->getType();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_PhysicsCollisionObjectType(result));
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getType - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_getWheel(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
+
+                PhysicsVehicle* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getWheel(param1);
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "PhysicsVehicleWheel");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_getWheel - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_isDynamic(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                bool result = instance->isDynamic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_isDynamic - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_isEnabled(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                bool result = instance->isEnabled();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_isEnabled - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_isKinematic(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                bool result = instance->isKinematic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_isKinematic - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_removeCollisionListener(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->removeCollisionListener(param1);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->removeCollisionListener(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_removeCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->removeCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->removeCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_removeCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_setBrakingForce(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->setBrakingForce(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_setBrakingForce - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_setDrivingForce(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->setDrivingForce(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_setDrivingForce - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_setEnabled(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = ScriptUtil::luaCheckBool(state, 2);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->setEnabled(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_setEnabled - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_setSteeringGain(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->setSteeringGain(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_setSteeringGain - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicle_update(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 4:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                // Get parameter 3 off the stack.
+                float param3 = (float)luaL_checknumber(state, 4);
+
+                PhysicsVehicle* instance = getInstance(state);
+                instance->update(param1, param2, param3);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicle_update - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+}

+ 36 - 0
gameplay/src/lua/lua_PhysicsVehicle.h

@@ -0,0 +1,36 @@
+#ifndef LUA_PHYSICSVEHICLE_H_
+#define LUA_PHYSICSVEHICLE_H_
+
+namespace gameplay
+{
+
+// Lua bindings for PhysicsVehicle.
+int lua_PhysicsVehicle_addCollisionListener(lua_State* state);
+int lua_PhysicsVehicle_addWheel(lua_State* state);
+int lua_PhysicsVehicle_collidesWith(lua_State* state);
+int lua_PhysicsVehicle_getBrakingForce(lua_State* state);
+int lua_PhysicsVehicle_getCollisionShape(lua_State* state);
+int lua_PhysicsVehicle_getDrivingForce(lua_State* state);
+int lua_PhysicsVehicle_getNode(lua_State* state);
+int lua_PhysicsVehicle_getNumWheels(lua_State* state);
+int lua_PhysicsVehicle_getRigidBody(lua_State* state);
+int lua_PhysicsVehicle_getShapeType(lua_State* state);
+int lua_PhysicsVehicle_getSpeedKph(lua_State* state);
+int lua_PhysicsVehicle_getSteeringGain(lua_State* state);
+int lua_PhysicsVehicle_getType(lua_State* state);
+int lua_PhysicsVehicle_getWheel(lua_State* state);
+int lua_PhysicsVehicle_isDynamic(lua_State* state);
+int lua_PhysicsVehicle_isEnabled(lua_State* state);
+int lua_PhysicsVehicle_isKinematic(lua_State* state);
+int lua_PhysicsVehicle_removeCollisionListener(lua_State* state);
+int lua_PhysicsVehicle_setBrakingForce(lua_State* state);
+int lua_PhysicsVehicle_setDrivingForce(lua_State* state);
+int lua_PhysicsVehicle_setEnabled(lua_State* state);
+int lua_PhysicsVehicle_setSteeringGain(lua_State* state);
+int lua_PhysicsVehicle_update(lua_State* state);
+
+void luaRegister_PhysicsVehicle();
+
+}
+
+#endif

+ 1624 - 0
gameplay/src/lua/lua_PhysicsVehicleWheel.cpp

@@ -0,0 +1,1624 @@
+#include "Base.h"
+#include "ScriptController.h"
+#include "lua_PhysicsVehicleWheel.h"
+#include "Base.h"
+#include "Game.h"
+#include "Node.h"
+#include "PhysicsCollisionObject.h"
+#include "PhysicsController.h"
+#include "PhysicsVehicle.h"
+#include "PhysicsVehicleWheel.h"
+#include "ScriptController.h"
+#include "lua_PhysicsCollisionObjectCollisionListenerEventType.h"
+#include "lua_PhysicsCollisionObjectType.h"
+#include "lua_PhysicsCollisionShapeType.h"
+
+namespace gameplay
+{
+
+void luaRegister_PhysicsVehicleWheel()
+{
+    const luaL_Reg lua_members[] = 
+    {
+        {"addCollisionListener", lua_PhysicsVehicleWheel_addCollisionListener},
+        {"collidesWith", lua_PhysicsVehicleWheel_collidesWith},
+        {"getCollisionShape", lua_PhysicsVehicleWheel_getCollisionShape},
+        {"getFrictionBreakout", lua_PhysicsVehicleWheel_getFrictionBreakout},
+        {"getNode", lua_PhysicsVehicleWheel_getNode},
+        {"getRollInfluence", lua_PhysicsVehicleWheel_getRollInfluence},
+        {"getShapeType", lua_PhysicsVehicleWheel_getShapeType},
+        {"getStrutConnectionPoint", lua_PhysicsVehicleWheel_getStrutConnectionPoint},
+        {"getStrutDampingCompression", lua_PhysicsVehicleWheel_getStrutDampingCompression},
+        {"getStrutDampingRelaxation", lua_PhysicsVehicleWheel_getStrutDampingRelaxation},
+        {"getStrutForceMax", lua_PhysicsVehicleWheel_getStrutForceMax},
+        {"getStrutRestLength", lua_PhysicsVehicleWheel_getStrutRestLength},
+        {"getStrutStiffness", lua_PhysicsVehicleWheel_getStrutStiffness},
+        {"getStrutTravelMax", lua_PhysicsVehicleWheel_getStrutTravelMax},
+        {"getType", lua_PhysicsVehicleWheel_getType},
+        {"getWheelAxle", lua_PhysicsVehicleWheel_getWheelAxle},
+        {"getWheelDirection", lua_PhysicsVehicleWheel_getWheelDirection},
+        {"getWheelRadius", lua_PhysicsVehicleWheel_getWheelRadius},
+        {"isDynamic", lua_PhysicsVehicleWheel_isDynamic},
+        {"isEnabled", lua_PhysicsVehicleWheel_isEnabled},
+        {"isFront", lua_PhysicsVehicleWheel_isFront},
+        {"isKinematic", lua_PhysicsVehicleWheel_isKinematic},
+        {"removeCollisionListener", lua_PhysicsVehicleWheel_removeCollisionListener},
+        {"setEnabled", lua_PhysicsVehicleWheel_setEnabled},
+        {"setFrictionBreakout", lua_PhysicsVehicleWheel_setFrictionBreakout},
+        {"setFront", lua_PhysicsVehicleWheel_setFront},
+        {"setRollInfluence", lua_PhysicsVehicleWheel_setRollInfluence},
+        {"setStrutConnectionPoint", lua_PhysicsVehicleWheel_setStrutConnectionPoint},
+        {"setStrutDampingCompression", lua_PhysicsVehicleWheel_setStrutDampingCompression},
+        {"setStrutDampingRelaxation", lua_PhysicsVehicleWheel_setStrutDampingRelaxation},
+        {"setStrutForceMax", lua_PhysicsVehicleWheel_setStrutForceMax},
+        {"setStrutRestLength", lua_PhysicsVehicleWheel_setStrutRestLength},
+        {"setStrutStiffness", lua_PhysicsVehicleWheel_setStrutStiffness},
+        {"setStrutTravelMax", lua_PhysicsVehicleWheel_setStrutTravelMax},
+        {"setWheelAxle", lua_PhysicsVehicleWheel_setWheelAxle},
+        {"setWheelDirection", lua_PhysicsVehicleWheel_setWheelDirection},
+        {"setWheelRadius", lua_PhysicsVehicleWheel_setWheelRadius},
+        {"transform", lua_PhysicsVehicleWheel_transform},
+        {NULL, NULL}
+    };
+    const luaL_Reg* lua_statics = NULL;
+    std::vector<std::string> scopePath;
+
+    ScriptUtil::registerClass("PhysicsVehicleWheel", lua_members, NULL, NULL, lua_statics, scopePath);
+}
+
+static PhysicsVehicleWheel* getInstance(lua_State* state)
+{
+    void* userdata = luaL_checkudata(state, 1, "PhysicsVehicleWheel");
+    luaL_argcheck(state, userdata != NULL, 1, "'PhysicsVehicleWheel' expected.");
+    return (PhysicsVehicleWheel*)((ScriptUtil::LuaObject*)userdata)->instance;
+}
+
+int lua_PhysicsVehicleWheel_addCollisionListener(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->addCollisionListener(param1);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->addCollisionListener(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_addCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->addCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->addCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_addCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_collidesWith(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(2, "PhysicsCollisionObject", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                bool result = instance->collidesWith(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_collidesWith - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getCollisionShape(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getCollisionShape();
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "PhysicsCollisionShape");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getCollisionShape - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getFrictionBreakout(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getFrictionBreakout();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getFrictionBreakout - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getNode(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getNode();
+                if (returnPtr)
+                {
+                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Node");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getNode - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getRollInfluence(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getRollInfluence();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getRollInfluence - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getShapeType(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                PhysicsCollisionShape::Type result = instance->getShapeType();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_PhysicsCollisionShapeType(result));
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getShapeType - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutConnectionPoint(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->getStrutConnectionPoint(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutConnectionPoint - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutDampingCompression(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getStrutDampingCompression();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutDampingCompression - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutDampingRelaxation(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getStrutDampingRelaxation();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutDampingRelaxation - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutForceMax(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getStrutForceMax();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutForceMax - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutRestLength(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getStrutRestLength();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutRestLength - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutStiffness(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getStrutStiffness();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutStiffness - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getStrutTravelMax(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getStrutTravelMax();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutTravelMax - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getType(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                PhysicsCollisionObject::Type result = instance->getType();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_PhysicsCollisionObjectType(result));
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getType - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getWheelAxle(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->getWheelAxle(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getWheelAxle - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getWheelDirection(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->getWheelDirection(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getWheelDirection - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_getWheelRadius(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                float result = instance->getWheelRadius();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_getWheelRadius - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_isDynamic(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                bool result = instance->isDynamic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_isDynamic - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_isEnabled(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                bool result = instance->isEnabled();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_isEnabled - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_isFront(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                bool result = instance->isFront();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_isFront - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_isKinematic(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                bool result = instance->isKinematic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_isKinematic - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_removeCollisionListener(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->removeCollisionListener(param1);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->removeCollisionListener(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_removeCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->removeCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->removeCollisionListener(param1, param2);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_removeCollisionListener - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setEnabled(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = ScriptUtil::luaCheckBool(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setEnabled(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setEnabled - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setFrictionBreakout(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setFrictionBreakout(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setFrictionBreakout - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setFront(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = ScriptUtil::luaCheckBool(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setFront(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setFront - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setRollInfluence(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setRollInfluence(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setRollInfluence - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutConnectionPoint(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutConnectionPoint(*param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutConnectionPoint - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutDampingCompression(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutDampingCompression(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutDampingCompression - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutDampingRelaxation(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutDampingRelaxation(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutDampingRelaxation - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutForceMax(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutForceMax(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutForceMax - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutRestLength(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutRestLength(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutRestLength - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutStiffness(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutStiffness(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutStiffness - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setStrutTravelMax(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setStrutTravelMax(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutTravelMax - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setWheelAxle(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setWheelAxle(*param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setWheelAxle - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setWheelDirection(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setWheelDirection(*param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setWheelDirection - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_setWheelRadius(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->setWheelRadius(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_setWheelRadius - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_PhysicsVehicleWheel_transform(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
+
+                PhysicsVehicleWheel* instance = getInstance(state);
+                instance->transform(param1);
+                
+                return 0;
+            }
+            else
+            {
+                lua_pushstring(state, "lua_PhysicsVehicleWheel_transform - Failed to match the given parameters to a valid function signature.");
+                lua_error(state);
+            }
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+}

+ 51 - 0
gameplay/src/lua/lua_PhysicsVehicleWheel.h

@@ -0,0 +1,51 @@
+#ifndef LUA_PHYSICSVEHICLEWHEEL_H_
+#define LUA_PHYSICSVEHICLEWHEEL_H_
+
+namespace gameplay
+{
+
+// Lua bindings for PhysicsVehicleWheel.
+int lua_PhysicsVehicleWheel_addCollisionListener(lua_State* state);
+int lua_PhysicsVehicleWheel_collidesWith(lua_State* state);
+int lua_PhysicsVehicleWheel_getCollisionShape(lua_State* state);
+int lua_PhysicsVehicleWheel_getFrictionBreakout(lua_State* state);
+int lua_PhysicsVehicleWheel_getNode(lua_State* state);
+int lua_PhysicsVehicleWheel_getRollInfluence(lua_State* state);
+int lua_PhysicsVehicleWheel_getShapeType(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutConnectionPoint(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutDampingCompression(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutDampingRelaxation(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutForceMax(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutRestLength(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutStiffness(lua_State* state);
+int lua_PhysicsVehicleWheel_getStrutTravelMax(lua_State* state);
+int lua_PhysicsVehicleWheel_getType(lua_State* state);
+int lua_PhysicsVehicleWheel_getWheelAxle(lua_State* state);
+int lua_PhysicsVehicleWheel_getWheelDirection(lua_State* state);
+int lua_PhysicsVehicleWheel_getWheelRadius(lua_State* state);
+int lua_PhysicsVehicleWheel_isDynamic(lua_State* state);
+int lua_PhysicsVehicleWheel_isEnabled(lua_State* state);
+int lua_PhysicsVehicleWheel_isFront(lua_State* state);
+int lua_PhysicsVehicleWheel_isKinematic(lua_State* state);
+int lua_PhysicsVehicleWheel_removeCollisionListener(lua_State* state);
+int lua_PhysicsVehicleWheel_setEnabled(lua_State* state);
+int lua_PhysicsVehicleWheel_setFrictionBreakout(lua_State* state);
+int lua_PhysicsVehicleWheel_setFront(lua_State* state);
+int lua_PhysicsVehicleWheel_setRollInfluence(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutConnectionPoint(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutDampingCompression(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutDampingRelaxation(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutForceMax(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutRestLength(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutStiffness(lua_State* state);
+int lua_PhysicsVehicleWheel_setStrutTravelMax(lua_State* state);
+int lua_PhysicsVehicleWheel_setWheelAxle(lua_State* state);
+int lua_PhysicsVehicleWheel_setWheelDirection(lua_State* state);
+int lua_PhysicsVehicleWheel_setWheelRadius(lua_State* state);
+int lua_PhysicsVehicleWheel_transform(lua_State* state);
+
+void luaRegister_PhysicsVehicleWheel();
+
+}
+
+#endif

+ 2 - 0
gameplay/src/lua/lua_all_bindings.cpp

@@ -86,6 +86,8 @@ void lua_RegisterAllBindings()
     luaRegister_PhysicsRigidBodyParameters();
     luaRegister_PhysicsRigidBodyParameters();
     luaRegister_PhysicsSocketConstraint();
     luaRegister_PhysicsSocketConstraint();
     luaRegister_PhysicsSpringConstraint();
     luaRegister_PhysicsSpringConstraint();
+    luaRegister_PhysicsVehicle();
+    luaRegister_PhysicsVehicleWheel();
     luaRegister_Plane();
     luaRegister_Plane();
     luaRegister_Platform();
     luaRegister_Platform();
     luaRegister_Properties();
     luaRegister_Properties();

+ 2 - 0
gameplay/src/lua/lua_all_bindings.h

@@ -81,6 +81,8 @@
 #include "lua_PhysicsRigidBodyParameters.h"
 #include "lua_PhysicsRigidBodyParameters.h"
 #include "lua_PhysicsSocketConstraint.h"
 #include "lua_PhysicsSocketConstraint.h"
 #include "lua_PhysicsSpringConstraint.h"
 #include "lua_PhysicsSpringConstraint.h"
+#include "lua_PhysicsVehicle.h"
+#include "lua_PhysicsVehicleWheel.h"
 #include "lua_Plane.h"
 #include "lua_Plane.h"
 #include "lua_Platform.h"
 #include "lua_Platform.h"
 #include "lua_Properties.h"
 #include "lua_Properties.h"