mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
fix non-bullet build
This commit is contained in:
parent
2427fa68cd
commit
7c9419aa4e
5 changed files with 17 additions and 6 deletions
|
@ -234,7 +234,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
|||
|
||||
uint32_t EntityMotionState::getIncomingDirtyFlags() const {
|
||||
uint32_t dirtyFlags = _entity->getDirtyFlags();
|
||||
|
||||
#ifdef USE_BULLET_PHYSICS
|
||||
// we add DIRTY_MOTION_TYPE if the body's motion type disagrees with entity velocity settings
|
||||
int bodyFlags = _body->getCollisionFlags();
|
||||
bool isMoving = _entity->isMoving();
|
||||
|
@ -242,5 +242,6 @@ uint32_t EntityMotionState::getIncomingDirtyFlags() const {
|
|||
(bodyFlags & btCollisionObject::CF_KINEMATIC_OBJECT && !isMoving)) {
|
||||
dirtyFlags |= EntityItem::DIRTY_MOTION_TYPE;
|
||||
}
|
||||
#endif // USE_BULLET_PHYSICS
|
||||
return dirtyFlags;
|
||||
}
|
||||
|
|
|
@ -18,9 +18,11 @@
|
|||
|
||||
#ifndef USE_BULLET_PHYSICS
|
||||
// ObjectMotionState stubbery
|
||||
#include "KinematicController.h"
|
||||
class ObjectMotionState {
|
||||
public:
|
||||
// so that this stub implementation is not completely empty we give the class a data member
|
||||
KinematicController* _kinematicController;
|
||||
bool _stubData;
|
||||
};
|
||||
#endif // USE_BULLET_PHYSICS
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
//
|
||||
|
||||
#include "PhysicsEngine.h"
|
||||
#ifdef USE_BULLET_PHYSICS
|
||||
|
||||
#include "ShapeInfoUtil.h"
|
||||
#include "ThreadSafeDynamicsWorld.h"
|
||||
|
||||
static uint32_t _frameCount;
|
||||
|
||||
|
@ -22,6 +19,11 @@ uint32_t PhysicsEngine::getFrameCount() {
|
|||
return _frameCount;
|
||||
}
|
||||
|
||||
#ifdef USE_BULLET_PHYSICS
|
||||
|
||||
#include "ShapeInfoUtil.h"
|
||||
#include "ThreadSafeDynamicsWorld.h"
|
||||
|
||||
PhysicsEngine::PhysicsEngine(const glm::vec3& offset)
|
||||
: _collisionConfig(NULL),
|
||||
_collisionDispatcher(NULL),
|
||||
|
|
|
@ -12,9 +12,12 @@
|
|||
#ifndef hifi_PhysicsEngine_h
|
||||
#define hifi_PhysicsEngine_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
const float PHYSICS_ENGINE_FIXED_SUBSTEP = 1.0f / 60.0f;
|
||||
|
||||
#ifdef USE_BULLET_PHYSICS
|
||||
|
||||
#include <stdint.h>
|
||||
#include <QSet>
|
||||
#include <btBulletDynamicsCommon.h>
|
||||
|
||||
|
@ -27,7 +30,6 @@
|
|||
#include "ThreadSafeDynamicsWorld.h"
|
||||
|
||||
const float HALF_SIMULATION_EXTENT = 512.0f; // meters
|
||||
const float PHYSICS_ENGINE_FIXED_SUBSTEP = 1.0f / 60.0f;
|
||||
|
||||
class ObjectMotionState;
|
||||
|
||||
|
@ -97,6 +99,8 @@ private:
|
|||
#else // USE_BULLET_PHYSICS
|
||||
// PhysicsEngine stubbery until Bullet is required
|
||||
class PhysicsEngine {
|
||||
public:
|
||||
static uint32_t getFrameCount();
|
||||
};
|
||||
#endif // USE_BULLET_PHYSICS
|
||||
#endif // hifi_PhysicsEngine_h
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#include <assert.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include <EntityItem.h>
|
||||
|
||||
#include "KinematicController.h"
|
||||
|
||||
class SimpleEntityKinematicController : public KinematicController {
|
||||
|
|
Loading…
Reference in a new issue