merged most of the changes from the branch into trunk, except for COLLADA, libxml and glut glitches.
Still need to verify to make sure no unwanted renaming is introduced.
This commit is contained in:
@@ -17,7 +17,7 @@ subject to the following restrictions:
|
||||
#include "CcdPhysicsController.h"
|
||||
#include "MyMotionState.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
#include "LinearMath/GenIDebugDraw.h"
|
||||
#include "LinearMath/btIDebugDraw.h"
|
||||
|
||||
#include "GLDebugDrawer.h"
|
||||
|
||||
@@ -53,12 +53,12 @@ int main(int argc,char** argv)
|
||||
|
||||
void ConstraintDemo::initPhysics()
|
||||
{
|
||||
//ConstraintSolver* solver = new SequentialImpulseConstraintSolver;
|
||||
//ConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
|
||||
//ConstraintSolver* solver = new OdeConstraintSolver;
|
||||
|
||||
CollisionDispatcher* dispatcher = new CollisionDispatcher();
|
||||
btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
|
||||
|
||||
OverlappingPairCache* broadphase = new SimpleBroadphase();
|
||||
btOverlappingPairCache* broadphase = new btSimpleBroadphase();
|
||||
|
||||
|
||||
m_physicsEnvironmentPtr = new CcdPhysicsEnvironment(dispatcher,broadphase);
|
||||
@@ -66,16 +66,16 @@ void ConstraintDemo::initPhysics()
|
||||
m_physicsEnvironmentPtr->setGravity(0,-10,0);
|
||||
|
||||
|
||||
CollisionShape* shape = new BoxShape(SimdVector3(CUBE_HALF_EXTENTS,CUBE_HALF_EXTENTS,CUBE_HALF_EXTENTS));
|
||||
SimdTransform trans;
|
||||
btCollisionShape* shape = new btBoxShape(btVector3(CUBE_HALF_EXTENTS,CUBE_HALF_EXTENTS,CUBE_HALF_EXTENTS));
|
||||
btTransform trans;
|
||||
trans.setIdentity();
|
||||
trans.setOrigin(SimdVector3(0,20,0));
|
||||
trans.setOrigin(btVector3(0,20,0));
|
||||
|
||||
bool isDynamic = false;
|
||||
float mass = 1.f;
|
||||
|
||||
CcdPhysicsController* ctrl0 = LocalCreatePhysicsObject( isDynamic,mass,trans,shape);
|
||||
trans.setOrigin(SimdVector3(2*CUBE_HALF_EXTENTS,20,0));
|
||||
trans.setOrigin(btVector3(2*CUBE_HALF_EXTENTS,20,0));
|
||||
isDynamic = true;
|
||||
CcdPhysicsController* ctrl1 = LocalCreatePhysicsObject( isDynamic,mass,trans,shape);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ subject to the following restrictions:
|
||||
|
||||
#include "DemoApplication.h"
|
||||
|
||||
///ConstraintDemo shows how to create a constraint, like Hinge or GenericD6constraint
|
||||
///ConstraintDemo shows how to create a constraint, like Hinge or btGenericD6constraint
|
||||
class ConstraintDemo : public DemoApplication
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -14,7 +14,7 @@ subject to the following restrictions:
|
||||
*/
|
||||
|
||||
#include "MyMotionState.h"
|
||||
#include "LinearMath/SimdPoint3.h"
|
||||
#include "LinearMath/btPoint3.h"
|
||||
|
||||
MyMotionState::MyMotionState()
|
||||
{
|
||||
@@ -51,13 +51,13 @@ void MyMotionState::getWorldOrientation(float& quatIma0,float& quatIma1,float& q
|
||||
|
||||
void MyMotionState::setWorldPosition(float posX,float posY,float posZ)
|
||||
{
|
||||
SimdPoint3 pos(posX,posY,posZ);
|
||||
btPoint3 pos(posX,posY,posZ);
|
||||
m_worldTransform.setOrigin( pos );
|
||||
}
|
||||
|
||||
void MyMotionState::setWorldOrientation(float quatIma0,float quatIma1,float quatIma2,float quatReal)
|
||||
{
|
||||
SimdQuaternion orn(quatIma0,quatIma1,quatIma2,quatReal);
|
||||
btQuaternion orn(quatIma0,quatIma1,quatIma2,quatReal);
|
||||
m_worldTransform.setRotation( orn );
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ subject to the following restrictions:
|
||||
#define MY_MOTIONSTATE_H
|
||||
|
||||
#include "PHY_IMotionState.h"
|
||||
#include <LinearMath/SimdTransform.h>
|
||||
#include <LinearMath/btTransform.h>
|
||||
|
||||
|
||||
class MyMotionState : public PHY_IMotionState
|
||||
@@ -37,7 +37,7 @@ class MyMotionState : public PHY_IMotionState
|
||||
|
||||
virtual void calculateWorldTransformations();
|
||||
|
||||
SimdTransform m_worldTransform;
|
||||
btTransform m_worldTransform;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user