Add the old Bullet 2.x obsolete demos, and CMake buildsystem files, and gradually move them to newer Bullet 3.x structure
Use statically linked freeglut, instead of dynamic glut for the obsolete Bullet 2.x demos Add the 'reset' method to b3GpuDynamicsWorld, and use it in the BasicGpuDemo (pretty slow in debug mode, use release mode) Don't crash in btCollisionWorld, if there is no collision dispatcher
This commit is contained in:
@@ -12,6 +12,7 @@ class btTypedConstraint;
|
||||
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "BulletDynamics/Dynamics/btDynamicsWorld.h"
|
||||
#include "Bullet3Common/b3Logging.h"
|
||||
|
||||
|
||||
class b3GpuDynamicsWorld : public btDynamicsWorld
|
||||
@@ -30,9 +31,9 @@ class b3GpuDynamicsWorld : public btDynamicsWorld
|
||||
bool m_cpuGpuSync;
|
||||
float m_localTime;
|
||||
class btRigidBody* m_staticBody;//used for picking and Bullet 2.x compatibility. In Bullet 3.x all constraints have explicitly 2 bodies.
|
||||
|
||||
int findOrRegisterCollisionShape(const btCollisionShape* colShape);
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
b3GpuDynamicsWorld(class b3GpuSapBroadphase* bp,class b3GpuNarrowPhase* np, class b3GpuRigidBodyPipeline* rigidBodyPipeline);
|
||||
@@ -57,7 +58,6 @@ public:
|
||||
virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false);
|
||||
|
||||
virtual void removeConstraint(btTypedConstraint* constraint);
|
||||
|
||||
void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;
|
||||
|
||||
btAlignedObjectArray<class btCollisionObject*>& getCollisionObjectArray();
|
||||
@@ -75,8 +75,6 @@ public:
|
||||
addRigidBody(body);
|
||||
}
|
||||
|
||||
|
||||
|
||||
virtual void addAction(btActionInterface* action)
|
||||
{
|
||||
btAssert(0);
|
||||
@@ -108,6 +106,8 @@ public:
|
||||
|
||||
///this can be useful to synchronize a single rigid body -> graphics object
|
||||
void synchronizeSingleMotionState(btRigidBody* body);
|
||||
|
||||
void reset();
|
||||
};
|
||||
|
||||
#endif //B3_GPU_DYNAMICS_WORLD_H
|
||||
|
||||
Reference in New Issue
Block a user