Add BulletWorldImporter: it takes the in-memory data from BulletFileLoader and instantiates objects in a BulletDynamicsWorld.

Note that BulletFileLoader is has no dependencies on BulletDynamics/BulletCollision.
Also added a custom build step to copy asset (.bullet and .obj file) into the executable folder
Made a few 'char*' 'const char*' to avoid compiler warnings
This commit is contained in:
erwin.coumans
2010-01-25 21:58:32 +00:00
parent b68f2710cd
commit a7a6ab8835
13 changed files with 76 additions and 187 deletions

View File

@@ -16,12 +16,13 @@ ${BULLET_PHYSICS_SOURCE_DIR}/src
${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexDecomposition
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletWorldImporter
)
IF (USE_GLUT)
LINK_LIBRARIES(
OpenGLSupport BulletFileLoader BulletDynamics BulletCollision LinearMath ConvexDecomposition ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
OpenGLSupport BulletWorldImporter BulletDynamics BulletCollision LinearMath BulletFileLoader ConvexDecomposition ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ADD_EXECUTABLE(AppConvexDecompositionDemo
@@ -32,7 +33,7 @@ IF (USE_GLUT)
ELSE (USE_GLUT)
LINK_LIBRARIES(
OpenGLSupport BulletFileLoader BulletDynamics BulletCollision LinearMath ConvexDecomposition ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
OpenGLSupport BulletWorldImporter BulletDynamics BulletCollision LinearMath BulletFileLoader ConvexDecomposition ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ADD_EXECUTABLE(AppConvexDecompositionDemo
@@ -45,3 +46,11 @@ LINK_LIBRARIES(
ENDIF (USE_GLUT)
ADD_CUSTOM_COMMAND(
TARGET AppConvexDecompositionDemo
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/ConvexDecompositionDemo/testFile32Single.bullet ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR}
)