fixed cmake/jam for HelloWorld sample
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
SUBDIRS( OpenGL AllBulletDemos MultiThreadedDemo CcdPhysicsDemo ConstraintDemo GenericJointDemo RagdollDemo BasicDemo BspDemo MovingConcaveDemo VehicleDemo ColladaDemo UserCollisionAlgorithm )
|
SUBDIRS( OpenGL AllBulletDemos HelloWorld MultiThreadedDemo CcdPhysicsDemo ConstraintDemo GenericJointDemo RagdollDemo BasicDemo BspDemo MovingConcaveDemo VehicleDemo ColladaDemo UserCollisionAlgorithm )
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,9 @@ void LinearConvexCastDemo::displayCallback(void)
|
|||||||
|
|
||||||
|
|
||||||
gGjkSimplexSolver.reset();
|
gGjkSimplexSolver.reset();
|
||||||
btSubsimplexConvexCast convexCaster( shapePtr[ 0 ], shapePtr[ 1 ], &gGjkSimplexSolver );
|
|
||||||
|
btGjkConvexCast convexCaster(shapePtr[ 0 ], shapePtr[ 1 ], &gGjkSimplexSolver );
|
||||||
|
//btSubsimplexConvexCast convexCaster( shapePtr[ 0 ], shapePtr[ 1 ], &gGjkSimplexSolver );
|
||||||
|
|
||||||
btConvexCast::CastResult result;
|
btConvexCast::CastResult result;
|
||||||
convexCaster.calcTimeOfImpact( tr[ 0 ], toA, tr[ 1 ], toB, result );
|
convexCaster.calcTimeOfImpact( tr[ 0 ], toA, tr[ 1 ], toB, result );
|
||||||
|
|||||||
14
Demos/HelloWorld/CMakeLists.txt
Normal file
14
Demos/HelloWorld/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# HelloWorld is a minimal sample creating, stepping and deleting a Bullet dynamics world
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
||||||
|
)
|
||||||
|
|
||||||
|
LINK_LIBRARIES(
|
||||||
|
LibBulletDynamics LibBulletCollision LibLinearMath
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_EXECUTABLE(HelloWorld
|
||||||
|
HelloWorld.cpp
|
||||||
|
)
|
||||||
|
|
||||||
@@ -116,9 +116,9 @@ int main(int argc, char** argv)
|
|||||||
dynamicsWorld->stepSimulation(1.f/60.f,10);
|
dynamicsWorld->stepSimulation(1.f/60.f,10);
|
||||||
|
|
||||||
//print positions of all objects
|
//print positions of all objects
|
||||||
for (i=dynamicsWorld->getNumCollisionObjects()-1; i>=0 ;i--)
|
for (int j=dynamicsWorld->getNumCollisionObjects()-1; j>=0 ;j--)
|
||||||
{
|
{
|
||||||
btCollisionObject* obj = dynamicsWorld->getCollisionObjectArray()[i];
|
btCollisionObject* obj = dynamicsWorld->getCollisionObjectArray()[j];
|
||||||
btRigidBody* body = btRigidBody::upcast(obj);
|
btRigidBody* body = btRigidBody::upcast(obj);
|
||||||
if (body && body->getMotionState())
|
if (body && body->getMotionState())
|
||||||
{
|
{
|
||||||
|
|||||||
3
Demos/HelloWorld/Jamfile
Normal file
3
Demos/HelloWorld/Jamfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SubDir TOP Demos HelloWorld ;
|
||||||
|
|
||||||
|
BulletBasicDemo HelloWorld : [ Wildcard *.h *.cpp ] ;
|
||||||
@@ -21,7 +21,7 @@ if $(GLUT.AVAILABLE) = "yes"
|
|||||||
rule BulletBasicDemo
|
rule BulletBasicDemo
|
||||||
{
|
{
|
||||||
Application $(<) : $(>) : noinstall console nomanifest ;
|
Application $(<) : $(>) : noinstall console nomanifest ;
|
||||||
LinkWith $(<) : bulletcollision bulletmath ;
|
LinkWith $(<) : bulletdynamics bulletcollision bulletmath ;
|
||||||
CFlags $(<) :
|
CFlags $(<) :
|
||||||
[ FIncludes $(TOP)/src ]
|
[ FIncludes $(TOP)/src ]
|
||||||
;
|
;
|
||||||
@@ -62,6 +62,7 @@ SubInclude TOP Demos MultiThreadedDemo ;
|
|||||||
#SubInclude TOP Demos ForkLiftDemo ;
|
#SubInclude TOP Demos ForkLiftDemo ;
|
||||||
SubInclude TOP Demos BulletDinoDemo ;
|
SubInclude TOP Demos BulletDinoDemo ;
|
||||||
SubInclude TOP Demos EPAPenDepthDemo ;
|
SubInclude TOP Demos EPAPenDepthDemo ;
|
||||||
|
SubInclude TOP Demos HelloWorld ;
|
||||||
SubInclude TOP Demos BspDemo ;
|
SubInclude TOP Demos BspDemo ;
|
||||||
SubInclude TOP Demos BasicDemo ;
|
SubInclude TOP Demos BasicDemo ;
|
||||||
SubInclude TOP Demos ConvexDecompositionDemo ;
|
SubInclude TOP Demos ConvexDecompositionDemo ;
|
||||||
|
|||||||
Reference in New Issue
Block a user