fix build to work when cmake does not fiind Bullet

This commit is contained in:
Andrew Meadows 2014-11-11 12:24:29 -08:00
parent 0d0f98f669
commit 7c53c7a495
4 changed files with 19 additions and 0 deletions

View file

@ -9,6 +9,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifdef USE_BULLET_PHYSICS
#include <BulletUtil.h>
#include "EntityItem.h"
@ -70,3 +71,4 @@ void EntityMotionState::computeShapeInfo(ShapeInfo& info) {
info.setBox(bulletHalfExtents);
}
#endif // USE_BULLET_PHYSICS

View file

@ -12,6 +12,8 @@
#ifndef hifi_BulletUtil_h
#define hifi_BulletUtil_h
#ifdef USE_BULLET_PHYSICS
#include <btBulletDynamicsCommon.h>
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
@ -37,4 +39,5 @@ inline void glmToBullet(const glm::quat& g, btQuaternion& b) {
b = btQuaternion(g.x, g.y, g.z, g.w);
}
#endif // USE_BULLET_PHYSICS
#endif // hifi_BulletUtil_h

View file

@ -10,6 +10,7 @@
//
#include "PhysicsWorld.h"
#ifdef USE_BULLET_PHYSICS
PhysicsWorld::~PhysicsWorld() {
}
@ -131,3 +132,5 @@ bool PhysicsWorld::updateEntityMassProperties(CustomMotionState* motionState, fl
assert(motionState);
return false;
}
#endif // USE_BULLET_PHYSICS

View file

@ -16,6 +16,7 @@
#include "BulletUtilTests.h"
#ifdef USE_BULLET_PHYSICS
void BulletUtilTests::fromBulletToGLM() {
btVector3 bV(1.23f, 4.56f, 7.89f);
glm::vec3 gV;
@ -105,3 +106,13 @@ void BulletUtilTests::runAllTests() {
fromGLMToBullet();
}
#else // USE_BULLET_PHYSICS
void BulletUtilTests::fromBulletToGLM() {
}
void BulletUtilTests::fromGLMToBullet() {
}
void BulletUtilTests::runAllTests() {
}
#endif // USE_BULLET_PHYSICS