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