unravel physics-vs-entities lib dependencies part 1

This commit is contained in:
Andrew Meadows 2019-04-19 08:37:39 -07:00
parent 7dfa8a26a3
commit deee159892
8 changed files with 25 additions and 4 deletions

View file

@ -23,6 +23,7 @@
#include <OctreeElement.h> // for OctreeElement::AppendState #include <OctreeElement.h> // for OctreeElement::AppendState
#include <OctreePacketData.h> #include <OctreePacketData.h>
#include <PhysicsCollisionGroups.h> #include <PhysicsCollisionGroups.h>
#include <SimulationFlags.h>
#include <ShapeInfo.h> #include <ShapeInfo.h>
#include <Transform.h> #include <Transform.h>
#include <SpatiallyNestable.h> #include <SpatiallyNestable.h>
@ -33,11 +34,11 @@
#include "EntityPropertyFlags.h" #include "EntityPropertyFlags.h"
#include "EntityTypes.h" #include "EntityTypes.h"
#include "SimulationOwner.h" #include "SimulationOwner.h"
#include "SimulationFlags.h"
#include "EntityDynamicInterface.h" #include "EntityDynamicInterface.h"
#include "GrabPropertyGroup.h" #include "GrabPropertyGroup.h"
class EntitySimulation; class EntitySimulation;
using EntitySimulationPointer = std::shared_ptr<EntitySimulation>;
class EntityTreeElement; class EntityTreeElement;
class EntityTreeElementExtraEncodeData; class EntityTreeElementExtraEncodeData;
class EntityDynamicInterface; class EntityDynamicInterface;

View file

@ -89,6 +89,8 @@
// (14) When an entity's ownership priority drops to YIELD (=1, below VOLUNTEER) other participants may // (14) When an entity's ownership priority drops to YIELD (=1, below VOLUNTEER) other participants may
// bid for it immediately at VOLUNTEER. // bid for it immediately at VOLUNTEER.
// //
/* These declarations temporarily moved to SimulationFlags.h while we unravel some spaghetti dependencies.
* The intent is to move them back here once the dust settles.
const uint8_t YIELD_SIMULATION_PRIORITY = 1; const uint8_t YIELD_SIMULATION_PRIORITY = 1;
const uint8_t VOLUNTEER_SIMULATION_PRIORITY = YIELD_SIMULATION_PRIORITY + 1; const uint8_t VOLUNTEER_SIMULATION_PRIORITY = YIELD_SIMULATION_PRIORITY + 1;
const uint8_t RECRUIT_SIMULATION_PRIORITY = VOLUNTEER_SIMULATION_PRIORITY + 1; const uint8_t RECRUIT_SIMULATION_PRIORITY = VOLUNTEER_SIMULATION_PRIORITY + 1;
@ -101,6 +103,7 @@ const uint8_t SCRIPT_POKE_SIMULATION_PRIORITY = SCRIPT_GRAB_SIMULATION_PRIORITY
// which really just means: things that collide with it will be bid at a priority level one lower // which really just means: things that collide with it will be bid at a priority level one lower
const uint8_t PERSONAL_SIMULATION_PRIORITY = SCRIPT_GRAB_SIMULATION_PRIORITY; const uint8_t PERSONAL_SIMULATION_PRIORITY = SCRIPT_GRAB_SIMULATION_PRIORITY;
const uint8_t AVATAR_ENTITY_SIMULATION_PRIORITY = PERSONAL_SIMULATION_PRIORITY; const uint8_t AVATAR_ENTITY_SIMULATION_PRIORITY = PERSONAL_SIMULATION_PRIORITY;
*/
class SimulationOwner { class SimulationOwner {

View file

@ -12,6 +12,7 @@
#ifndef hifi_EntityMotionState_h #ifndef hifi_EntityMotionState_h
#define hifi_EntityMotionState_h #define hifi_EntityMotionState_h
#include <EntityItem.h>
#include <EntityTypes.h> #include <EntityTypes.h>
#include <AACube.h> #include <AACube.h>
#include <workload/Region.h> #include <workload/Region.h>

View file

@ -11,7 +11,8 @@
#include "ObjectActionTractor.h" #include "ObjectActionTractor.h"
#include "QVariantGLM.h" #include <EntityItem.h>
#include <QVariantGLM.h>
#include "PhysicsLogging.h" #include "PhysicsLogging.h"

View file

@ -13,7 +13,9 @@
#include <glm/gtc/quaternion.hpp> #include <glm/gtc/quaternion.hpp>
#include "QVariantGLM.h" #include <EntityItem.h>
#include <QVariantGLM.h>
#include "PhysicsLogging.h" #include "PhysicsLogging.h"
const uint16_t ObjectActionTravelOriented::actionVersion = 1; const uint16_t ObjectActionTravelOriented::actionVersion = 1;

View file

@ -17,7 +17,9 @@
#include <btBulletDynamicsCommon.h> #include <btBulletDynamicsCommon.h>
#include <EntityItemID.h>
#include <shared/ReadWriteLockable.h> #include <shared/ReadWriteLockable.h>
#include <SpatiallyNestable.h>
#include "ObjectMotionState.h" #include "ObjectMotionState.h"
#include "BulletUtil.h" #include "BulletUtil.h"

View file

@ -18,7 +18,7 @@
#include <QSet> #include <QSet>
#include <QVector> #include <QVector>
#include <EntityItem.h> #include <SimulationFlags.h>
#include "ContactInfo.h" #include "ContactInfo.h"
#include "ShapeManager.h" #include "ShapeManager.h"

View file

@ -12,6 +12,17 @@
#ifndef hifi_SimulationFlags_h #ifndef hifi_SimulationFlags_h
#define hifi_SimulationFlags_h #define hifi_SimulationFlags_h
const uint8_t YIELD_SIMULATION_PRIORITY = 1;
const uint8_t VOLUNTEER_SIMULATION_PRIORITY = YIELD_SIMULATION_PRIORITY + 1;
const uint8_t RECRUIT_SIMULATION_PRIORITY = VOLUNTEER_SIMULATION_PRIORITY + 1;
const uint8_t SCRIPT_GRAB_SIMULATION_PRIORITY = 128;
const uint8_t SCRIPT_POKE_SIMULATION_PRIORITY = SCRIPT_GRAB_SIMULATION_PRIORITY - 1;
const uint8_t PERSONAL_SIMULATION_PRIORITY = SCRIPT_GRAB_SIMULATION_PRIORITY;
const uint8_t AVATAR_ENTITY_SIMULATION_PRIORITY = PERSONAL_SIMULATION_PRIORITY;
namespace Simulation { namespace Simulation {
const uint32_t DIRTY_POSITION = 0x0001; const uint32_t DIRTY_POSITION = 0x0001;
const uint32_t DIRTY_ROTATION = 0x0002; const uint32_t DIRTY_ROTATION = 0x0002;