fix some compile problems

This commit is contained in:
Andrew Meadows 2015-04-30 13:56:37 -07:00
parent 195dd1420c
commit 9f8b266a03
5 changed files with 11 additions and 8 deletions

View file

@ -1109,7 +1109,7 @@ void EntityItem::updatePosition(const glm::vec3& value) {
auto distance = glm::distance(_position, value);
_dirtyFlags |= EntityItem::DIRTY_POSITION;
if (distance > MIN_POSITION_DELTA) {
dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
_dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
}
_position = value;
}
@ -1132,7 +1132,7 @@ void EntityItem::updateRotation(const glm::quat& rotation) {
auto alignmentDot = glm::abs(glm::dot(_rotation, rotation));
_dirtyFlags |= EntityItem::DIRTY_ROTATION;
if (alignmentDot < MIN_ALIGNMENT_DOT) {
dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
_dirtyFlags |= EntityItem::DIRTY_PHYSICS_ACTIVATION;
}
_rotation = rotation;
}

View file

@ -53,7 +53,7 @@ class EntityItem {
public:
enum EntityDirtyFlags {
DIRTY_POSITION = 0x0001,
DIRTY_ROTATOION = 0x0002;
DIRTY_ROTATION = 0x0002,
DIRTY_LINEAR_VELOCITY = 0x0004,
DIRTY_ANGULAR_VELOCITY = 0x0008,
DIRTY_MASS = 0x0010,

View file

@ -26,13 +26,16 @@ typedef QSet<EntityItem*> SetOfEntities;
// so it can sort EntityItem or relay its state to the PhysicsEngine.
const int DIRTY_SIMULATION_FLAGS =
EntityItem::DIRTY_POSITION |
EntityItem::DIRTY_VELOCITY |
EntityItem::DIRTY_ROTATION |
EntityItem::DIRTY_LINEAR_VELOCITY |
EntityItem::DIRTY_ANGULAR_VELOCITY |
EntityItem::DIRTY_MASS |
EntityItem::DIRTY_COLLISION_GROUP |
EntityItem::DIRTY_MOTION_TYPE |
EntityItem::DIRTY_SHAPE |
EntityItem::DIRTY_LIFETIME |
EntityItem::DIRTY_UPDATEABLE;
EntityItem::DIRTY_UPDATEABLE |
EntityItem::DIRTY_MATERIAL;
class EntitySimulation : public QObject {
Q_OBJECT

View file

@ -79,7 +79,7 @@ void SimpleEntitySimulation::deleteEntityInternal(EntityItem* entity) {
}
}
const int SIMPLE_SIMULATION_DIRTY_FLAGS = EntityItem::DIRTY_VELOCITY | EntityItem::DIRTY_MOTION_TYPE;
const int SIMPLE_SIMULATION_DIRTY_FLAGS = EntityItem::DIRTY_VELOCITIES | EntityItem::DIRTY_MOTION_TYPE;
void SimpleEntitySimulation::changeEntityInternal(EntityItem* entity) {
int dirtyFlags = entity->getDirtyFlags();

View file

@ -35,14 +35,14 @@ enum MotionStateType {
// The update flags trigger two varieties of updates: "hard" which require the body to be pulled
// and re-added to the physics engine and "easy" which just updates the body properties.
const uint32_t HARD_DIRTY_PHYSICS_FLAGS = (uint32_t)(EntityItem::DIRTY_MOTION_TYPE | EntityItem::DIRTY_SHAPE);
const uint32_t EASY_DIRTY_PHYSICS_FLAGS = (uint32_t)(EntityItem::DIRTY_POSITION | EntityItem::DIRTY_VELOCITY |
const uint32_t EASY_DIRTY_PHYSICS_FLAGS = (uint32_t)(EntityItem::DIRTY_TRANSFORM | EntityItem::DIRTY_VELOCITIES |
EntityItem::DIRTY_MASS | EntityItem::DIRTY_COLLISION_GROUP | EntityItem::DIRTY_MATERIAL);
// These are the set of incoming flags that the PhysicsEngine needs to hear about:
const uint32_t DIRTY_PHYSICS_FLAGS = HARD_DIRTY_PHYSICS_FLAGS | EASY_DIRTY_PHYSICS_FLAGS;
// These are the outgoing flags that the PhysicsEngine can affect:
const uint32_t OUTGOING_DIRTY_PHYSICS_FLAGS = EntityItem::DIRTY_POSITION | EntityItem::DIRTY_VELOCITY;
const uint32_t OUTGOING_DIRTY_PHYSICS_FLAGS = EntityItem::DIRTY_TRANSFORM | EntityItem::DIRTY_VELOCITIES;
class OctreeEditPacketSender;