fixed cmake/jam for HelloWorld sample
This commit is contained in:
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);
|
||||
|
||||
//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);
|
||||
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 ] ;
|
||||
Reference in New Issue
Block a user