Skip to content

Commit

Permalink
remove btContinuousDynamicsWorld, it is obsolete and was never comple…
Browse files Browse the repository at this point in the history
…ted.

If you need tunneling prevention, one option is to use the CCD motion clamping in btDiscreteDynamicsWorld. See also Bullet/Demos/CcdPhysicsDemo.
You can use an embedded sphere that prevents tunneling, using the following settings:

		body->setCcdMotionThreshold(0.5);
		body->setCcdSweptSphereRadius(0.9f);


Add a camera zoom setting for the demos, thanks to ejtttje, fixes Issue 543
  • Loading branch information
erwin.coumans committed Sep 15, 2011
1 parent 69a932f commit 654fe78
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 256 deletions.
7 changes: 4 additions & 3 deletions Demos/OpenGL/DemoApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ m_modifierKeys(0),
m_scaleBottom(0.5f),
m_scaleFactor(2.f),
m_cameraUp(0,1,0),
m_forwardAxis(2),
m_forwardAxis(2),
m_zoomStepSize(0.4),
m_glutScreenWidth(0),
m_glutScreenHeight(0),
m_frustumZNear(1.f),
Expand Down Expand Up @@ -271,14 +272,14 @@ void DemoApplication::stepBack()
}
void DemoApplication::zoomIn()
{
m_cameraDistance -= btScalar(0.4); updateCamera();
m_cameraDistance -= btScalar(m_zoomStepSize); updateCamera();
if (m_cameraDistance < btScalar(0.1))
m_cameraDistance = btScalar(0.1);

}
void DemoApplication::zoomOut()
{
m_cameraDistance += btScalar(0.4); updateCamera();
m_cameraDistance += btScalar(m_zoomStepSize); updateCamera();

}

Expand Down
1 change: 1 addition & 0 deletions Demos/OpenGL/DemoApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class DemoApplication
float m_scaleFactor;
btVector3 m_cameraUp;
int m_forwardAxis;
float m_zoomStepSize;

int m_glutScreenWidth;
int m_glutScreenHeight;
Expand Down
8 changes: 4 additions & 4 deletions Demos/SerializeDemo/SerializeDemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ class MySoftBulletWorldImporter : public btBulletWorldImporter
if (softBodyData->m_pose)
{
psb->m_pose.m_aqq.deSerializeFloat( softBodyData->m_pose->m_aqq);
psb->m_pose.m_bframe = softBodyData->m_pose->m_bframe;
psb->m_pose.m_bvolume = softBodyData->m_pose->m_bvolume;
psb->m_pose.m_bframe = (softBodyData->m_pose->m_bframe!=0);
psb->m_pose.m_bvolume = (softBodyData->m_pose->m_bvolume!=0);
psb->m_pose.m_com.deSerializeFloat(softBodyData->m_pose->m_com);

psb->m_pose.m_pos.resize(softBodyData->m_pose->m_numPositions);
Expand Down Expand Up @@ -349,9 +349,9 @@ class MySoftBulletWorldImporter : public btBulletWorldImporter
psb->m_clusters[i]->m_adamping = softBodyData->m_clusters[i].m_adamping;
psb->m_clusters[i]->m_av.deSerializeFloat(softBodyData->m_clusters[i].m_av);
psb->m_clusters[i]->m_clusterIndex = softBodyData->m_clusters[i].m_clusterIndex;
psb->m_clusters[i]->m_collide = softBodyData->m_clusters[i].m_collide;
psb->m_clusters[i]->m_collide = (softBodyData->m_clusters[i].m_collide!=0);
psb->m_clusters[i]->m_com.deSerializeFloat(softBodyData->m_clusters[i].m_com);
psb->m_clusters[i]->m_containsAnchor = softBodyData->m_clusters[i].m_containsAnchor;
psb->m_clusters[i]->m_containsAnchor = (softBodyData->m_clusters[i].m_containsAnchor!=0);
psb->m_clusters[i]->m_dimpulses[0].deSerializeFloat(softBodyData->m_clusters[i].m_dimpulses[0]);
psb->m_clusters[i]->m_dimpulses[1].deSerializeFloat(softBodyData->m_clusters[i].m_dimpulses[1]);

Expand Down
2 changes: 0 additions & 2 deletions src/BulletDynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ SET(BulletDynamics_SRCS
ConstraintSolver/btSolve2LinearConstraint.cpp
ConstraintSolver/btTypedConstraint.cpp
ConstraintSolver/btUniversalConstraint.cpp
Dynamics/btContinuousDynamicsWorld.cpp
Dynamics/btDiscreteDynamicsWorld.cpp
Dynamics/btRigidBody.cpp
Dynamics/btSimpleDynamicsWorld.cpp
Expand Down Expand Up @@ -50,7 +49,6 @@ SET(ConstraintSolver_HDRS
)
SET(Dynamics_HDRS
Dynamics/btActionInterface.h
Dynamics/btContinuousDynamicsWorld.h
Dynamics/btDiscreteDynamicsWorld.h
Dynamics/btDynamicsWorld.h
Dynamics/btSimpleDynamicsWorld.h
Expand Down
196 changes: 0 additions & 196 deletions src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class btOverlappingPairCache;
class btConstraintSolver;

///The btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds.
///Please use btDiscreteDynamicsWorld instead (or btContinuousDynamicsWorld once it is finished).
///Please use btDiscreteDynamicsWorld instead
class btSimpleDynamicsWorld : public btDynamicsWorld
{
protected:
Expand Down
3 changes: 0 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ libBulletCollision_la_SOURCES = \
BulletCollision/Gimpact/gim_tri_collision.cpp

libBulletDynamics_la_SOURCES = \
BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp \
BulletDynamics/Dynamics/btRigidBody.cpp \
BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp \
BulletDynamics/Dynamics/Bullet-C-API.cpp \
Expand All @@ -328,7 +327,6 @@ libBulletDynamics_la_SOURCES = \
BulletDynamics/Character/btKinematicCharacterController.h \
BulletDynamics/Character/btCharacterControllerInterface.h \
BulletDynamics/Dynamics/btActionInterface.h \
BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
BulletDynamics/Dynamics/btRigidBody.h \
BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
Expand Down Expand Up @@ -389,7 +387,6 @@ nobase_bullet_include_HEADERS += \
BulletDynamics/Vehicle/btWheelInfo.h \
BulletDynamics/Vehicle/btVehicleRaycaster.h \
BulletDynamics/Dynamics/btActionInterface.h \
BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
BulletDynamics/Dynamics/btRigidBody.h \
BulletDynamics/Dynamics/btDynamicsWorld.h \
BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
Expand Down
1 change: 0 additions & 1 deletion src/btBulletDynamicsCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ subject to the following restrictions:
#include "btBulletCollisionCommon.h"

#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
#include "BulletDynamics/Dynamics/btContinuousDynamicsWorld.h"

#include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
Expand Down

0 comments on commit 654fe78

Please sign in to comment.