mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 03:58:15 +02:00
make things compile
This commit is contained in:
parent
31ca5b9eef
commit
b023fe582a
12 changed files with 43 additions and 89 deletions
|
@ -70,6 +70,7 @@
|
||||||
#include <NetworkingConstants.h>
|
#include <NetworkingConstants.h>
|
||||||
#include <OctalCode.h>
|
#include <OctalCode.h>
|
||||||
#include <OctreeSceneStats.h>
|
#include <OctreeSceneStats.h>
|
||||||
|
#include <ObjectMotionState.h>
|
||||||
#include <PacketHeaders.h>
|
#include <PacketHeaders.h>
|
||||||
#include <PathUtils.h>
|
#include <PathUtils.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
|
@ -2069,11 +2070,11 @@ void Application::init() {
|
||||||
|
|
||||||
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
||||||
|
|
||||||
connect(&_physicsEngine, &EntitySimulation::entityCollisionWithEntity,
|
connect(&_entitySimulation, &EntitySimulation::entityCollisionWithEntity,
|
||||||
entityScriptingInterface.data(), &EntityScriptingInterface::entityCollisionWithEntity);
|
entityScriptingInterface.data(), &EntityScriptingInterface::entityCollisionWithEntity);
|
||||||
|
|
||||||
// connect the _entityCollisionSystem to our EntityTreeRenderer since that's what handles running entity scripts
|
// connect the _entityCollisionSystem to our EntityTreeRenderer since that's what handles running entity scripts
|
||||||
connect(&_physicsEngine, &EntitySimulation::entityCollisionWithEntity,
|
connect(&_entitySimulation, &EntitySimulation::entityCollisionWithEntity,
|
||||||
&_entities, &EntityTreeRenderer::entityCollisionWithEntity);
|
&_entities, &EntityTreeRenderer::entityCollisionWithEntity);
|
||||||
|
|
||||||
// connect the _entities (EntityTreeRenderer) to our script engine's EntityScriptingInterface for firing
|
// connect the _entities (EntityTreeRenderer) to our script engine's EntityScriptingInterface for firing
|
||||||
|
@ -2355,7 +2356,7 @@ void Application::update(float deltaTime) {
|
||||||
PerformanceTimer perfTimer("physics");
|
PerformanceTimer perfTimer("physics");
|
||||||
_myAvatar->relayDriveKeysToCharacterController();
|
_myAvatar->relayDriveKeysToCharacterController();
|
||||||
|
|
||||||
_physicsEngine.deleteObjects(_entitySimulation.getObjectsToRemove());
|
_physicsEngine.deleteObjects(_entitySimulation.getObjectsToDelete());
|
||||||
_physicsEngine.addObjects(_entitySimulation.getObjectsToAdd());
|
_physicsEngine.addObjects(_entitySimulation.getObjectsToAdd());
|
||||||
_physicsEngine.changeObjects(_entitySimulation.getObjectsToChange());
|
_physicsEngine.changeObjects(_entitySimulation.getObjectsToChange());
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ void EntitySimulation::expireMortalEntities(const quint64& now) {
|
||||||
itemItr = _mortalEntities.erase(itemItr);
|
itemItr = _mortalEntities.erase(itemItr);
|
||||||
_entitiesToUpdate.remove(entity);
|
_entitiesToUpdate.remove(entity);
|
||||||
_entitiesToSort.remove(entity);
|
_entitiesToSort.remove(entity);
|
||||||
deleteEntityInternal(entity);
|
removeEntityInternal(entity);
|
||||||
} else {
|
} else {
|
||||||
if (expiry < _nextExpiry) {
|
if (expiry < _nextExpiry) {
|
||||||
// remeber the smallest _nextExpiry so we know when to start the next search
|
// remeber the smallest _nextExpiry so we know when to start the next search
|
||||||
|
@ -116,7 +116,7 @@ void EntitySimulation::sortEntitiesThatMoved() {
|
||||||
_entitiesToDelete.insert(entity);
|
_entitiesToDelete.insert(entity);
|
||||||
_mortalEntities.remove(entity);
|
_mortalEntities.remove(entity);
|
||||||
_entitiesToUpdate.remove(entity);
|
_entitiesToUpdate.remove(entity);
|
||||||
deleteEntityInternal(entity);
|
removeEntityInternal(entity);
|
||||||
itemItr = _entitiesToSort.erase(itemItr);
|
itemItr = _entitiesToSort.erase(itemItr);
|
||||||
} else {
|
} else {
|
||||||
moveOperator.addEntityToMoveList(entity, newCube);
|
moveOperator.addEntityToMoveList(entity, newCube);
|
||||||
|
@ -160,36 +160,7 @@ void EntitySimulation::removeEntity(EntityItem* entity) {
|
||||||
_entitiesToUpdate.remove(entity);
|
_entitiesToUpdate.remove(entity);
|
||||||
_mortalEntities.remove(entity);
|
_mortalEntities.remove(entity);
|
||||||
_entitiesToSort.remove(entity);
|
_entitiesToSort.remove(entity);
|
||||||
if (entity->_element) {
|
removeEntityInternal(entity);
|
||||||
// some EntityTreeElement still references this entity, but it's being removed from this simulation
|
|
||||||
_entitiesToDelete.remove(entity);
|
|
||||||
removeEntityInternal(entity);
|
|
||||||
} else {
|
|
||||||
// we're the last to reference this entity, so we really need to delete it
|
|
||||||
deleteEntityInternal(entity);
|
|
||||||
}
|
|
||||||
} else if (!entity->_element) {
|
|
||||||
// nothing else is referencing this entity, so we delete it now
|
|
||||||
delete entity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EntitySimulation::deleteEntity(EntityItem* entity) {
|
|
||||||
assert(entity);
|
|
||||||
if (entity->_simulation == this) {
|
|
||||||
_entitiesToUpdate.remove(entity);
|
|
||||||
_mortalEntities.remove(entity);
|
|
||||||
_entitiesToSort.remove(entity);
|
|
||||||
deleteEntityInternal(entity);
|
|
||||||
} else {
|
|
||||||
if (entity->_element) {
|
|
||||||
// some EntityTreeElement still references this entity, so we put it on the list
|
|
||||||
// which will be harvested by the tree later
|
|
||||||
_entitiesToDelete.insert(entity);
|
|
||||||
} else {
|
|
||||||
// nothing else is referencing this entity, so we delete it now
|
|
||||||
delete entity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +180,8 @@ void EntitySimulation::changeEntity(EntityItem* entity) {
|
||||||
_entitiesToDelete.insert(entity);
|
_entitiesToDelete.insert(entity);
|
||||||
_mortalEntities.remove(entity);
|
_mortalEntities.remove(entity);
|
||||||
_entitiesToUpdate.remove(entity);
|
_entitiesToUpdate.remove(entity);
|
||||||
deleteEntityInternal(entity);
|
_entitiesToSort.remove(entity);
|
||||||
|
removeEntityInternal(entity);
|
||||||
wasRemoved = true;
|
wasRemoved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include "EntityItem.h"
|
#include "EntityItem.h"
|
||||||
#include "EntityTree.h"
|
#include "EntityTree.h"
|
||||||
|
|
||||||
typedef QSet<EntityItem*> SetOfEntities;
|
|
||||||
|
|
||||||
// the EntitySimulation needs to know when these things change on an entity,
|
// the EntitySimulation needs to know when these things change on an entity,
|
||||||
// so it can sort EntityItem or relay its state to the PhysicsEngine.
|
// so it can sort EntityItem or relay its state to the PhysicsEngine.
|
||||||
const int DIRTY_SIMULATION_FLAGS =
|
const int DIRTY_SIMULATION_FLAGS =
|
||||||
|
@ -51,6 +49,9 @@ public:
|
||||||
|
|
||||||
void updateEntities();
|
void updateEntities();
|
||||||
|
|
||||||
|
friend EntityTree;
|
||||||
|
|
||||||
|
protected: // these only called by the EntityTree?
|
||||||
/// \param entity pointer to EntityItem to be added
|
/// \param entity pointer to EntityItem to be added
|
||||||
/// \sideeffect sets relevant backpointers in entity, but maybe later when appropriate data structures are locked
|
/// \sideeffect sets relevant backpointers in entity, but maybe later when appropriate data structures are locked
|
||||||
void addEntity(EntityItem* entity);
|
void addEntity(EntityItem* entity);
|
||||||
|
@ -60,17 +61,14 @@ public:
|
||||||
/// \sideeffect nulls relevant backpointers in entity
|
/// \sideeffect nulls relevant backpointers in entity
|
||||||
void removeEntity(EntityItem* entity);
|
void removeEntity(EntityItem* entity);
|
||||||
|
|
||||||
/// \param pointer to EntityItem to be removed from simulation, and deleted if possible
|
|
||||||
/// \brief actual removal/delete may happen later when appropriate data structures are locked
|
|
||||||
/// \sideeffect nulls relevant backpointers in entity
|
|
||||||
void deleteEntity(EntityItem* entity);
|
|
||||||
|
|
||||||
/// \param entity pointer to EntityItem to that may have changed in a way that would affect its simulation
|
/// \param entity pointer to EntityItem to that may have changed in a way that would affect its simulation
|
||||||
/// call this whenever an entity was changed from some EXTERNAL event (NOT by the EntitySimulation itself)
|
/// call this whenever an entity was changed from some EXTERNAL event (NOT by the EntitySimulation itself)
|
||||||
void changeEntity(EntityItem* entity);
|
void changeEntity(EntityItem* entity);
|
||||||
|
|
||||||
void clearEntities();
|
void clearEntities();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
EntityTree* getEntityTree() { return _entityTree; }
|
EntityTree* getEntityTree() { return _entityTree; }
|
||||||
|
|
||||||
void getEntitiesToDelete(SetOfEntities& entitiesToDelete);
|
void getEntitiesToDelete(SetOfEntities& entitiesToDelete);
|
||||||
|
@ -84,20 +82,11 @@ protected:
|
||||||
|
|
||||||
// These pure virtual methods are protected because they are not to be called will-nilly. The base class
|
// These pure virtual methods are protected because they are not to be called will-nilly. The base class
|
||||||
// calls them in the right places.
|
// calls them in the right places.
|
||||||
|
|
||||||
// NOTE: updateEntitiesInternal() should clear all dirty flags on each changed entity as side effect
|
|
||||||
virtual void updateEntitiesInternal(const quint64& now) = 0;
|
virtual void updateEntitiesInternal(const quint64& now) = 0;
|
||||||
|
|
||||||
virtual void addEntityInternal(EntityItem* entity) = 0;
|
virtual void addEntityInternal(EntityItem* entity) = 0;
|
||||||
|
|
||||||
virtual void removeEntityInternal(EntityItem* entity) = 0;
|
virtual void removeEntityInternal(EntityItem* entity) = 0;
|
||||||
|
|
||||||
virtual void deleteEntityInternal(EntityItem* entity) = 0;
|
|
||||||
|
|
||||||
virtual void changeEntityInternal(EntityItem* entity) = 0;
|
virtual void changeEntityInternal(EntityItem* entity) = 0;
|
||||||
|
|
||||||
virtual void sortEntitiesThatMovedInternal() {}
|
virtual void sortEntitiesThatMovedInternal() {}
|
||||||
|
|
||||||
virtual void clearEntitiesInternal() = 0;
|
virtual void clearEntitiesInternal() = 0;
|
||||||
|
|
||||||
void expireMortalEntities(const quint64& now);
|
void expireMortalEntities(const quint64& now);
|
||||||
|
|
|
@ -68,17 +68,6 @@ void SimpleEntitySimulation::removeEntityInternal(EntityItem* entity) {
|
||||||
clearEntitySimulation(entity);
|
clearEntitySimulation(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleEntitySimulation::deleteEntityInternal(EntityItem* entity) {
|
|
||||||
_movingEntities.remove(entity);
|
|
||||||
_movableButStoppedEntities.remove(entity);
|
|
||||||
_hasSimulationOwnerEntities.remove(entity);
|
|
||||||
clearEntitySimulation(entity);
|
|
||||||
if (!entity->getElement()) {
|
|
||||||
// we held the last reference to this entity, so delete it
|
|
||||||
delete entity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const int SIMPLE_SIMULATION_DIRTY_FLAGS = EntityItem::DIRTY_VELOCITIES | EntityItem::DIRTY_MOTION_TYPE;
|
const int SIMPLE_SIMULATION_DIRTY_FLAGS = EntityItem::DIRTY_VELOCITIES | EntityItem::DIRTY_MOTION_TYPE;
|
||||||
|
|
||||||
void SimpleEntitySimulation::changeEntityInternal(EntityItem* entity) {
|
void SimpleEntitySimulation::changeEntityInternal(EntityItem* entity) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ protected:
|
||||||
virtual void updateEntitiesInternal(const quint64& now);
|
virtual void updateEntitiesInternal(const quint64& now);
|
||||||
virtual void addEntityInternal(EntityItem* entity);
|
virtual void addEntityInternal(EntityItem* entity);
|
||||||
virtual void removeEntityInternal(EntityItem* entity);
|
virtual void removeEntityInternal(EntityItem* entity);
|
||||||
virtual void deleteEntityInternal(EntityItem* entity);
|
|
||||||
virtual void changeEntityInternal(EntityItem* entity);
|
virtual void changeEntityInternal(EntityItem* entity);
|
||||||
virtual void clearEntitiesInternal();
|
virtual void clearEntitiesInternal();
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,10 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntityMotionState::computeObjectShapeInfo(ShapeInfo& shapeInfo) {
|
||||||
|
_entity->computeShapeInfo(shapeInfo);
|
||||||
|
}
|
||||||
|
|
||||||
// RELIABLE_SEND_HACK: until we have truly reliable resends of non-moving updates
|
// RELIABLE_SEND_HACK: until we have truly reliable resends of non-moving updates
|
||||||
// we alwasy resend packets for objects that have stopped moving up to some max limit.
|
// we alwasy resend packets for objects that have stopped moving up to some max limit.
|
||||||
const int MAX_NUM_NON_MOVING_UPDATES = 5;
|
const int MAX_NUM_NON_MOVING_UPDATES = 5;
|
||||||
|
|
|
@ -67,6 +67,11 @@ ObjectMotionState::ObjectMotionState(btCollisionShape* shape) :
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ObjectMotionState::~ObjectMotionState() {
|
||||||
|
assert(!_body);
|
||||||
|
assert(!_shape);
|
||||||
|
}
|
||||||
|
|
||||||
void ObjectMotionState::setBodyLinearVelocity(const glm::vec3& velocity) const {
|
void ObjectMotionState::setBodyLinearVelocity(const glm::vec3& velocity) const {
|
||||||
_body->setLinearVelocity(glmToBullet(velocity));
|
_body->setLinearVelocity(glmToBullet(velocity));
|
||||||
}
|
}
|
||||||
|
@ -190,8 +195,8 @@ void ObjectMotionState::updateBodyMaterialProperties() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectMotionState::updateBodyVelocities() {
|
void ObjectMotionState::updateBodyVelocities() {
|
||||||
setBodyVelocity(getObjectLinearVelocity());
|
setBodyLinearVelocity(getObjectLinearVelocity());
|
||||||
setBodyAngularVelocity(getObjectAngularVelocity();
|
setBodyAngularVelocity(getObjectAngularVelocity());
|
||||||
setBodyGravity(getObjectGravity();
|
setBodyGravity(getObjectGravity());
|
||||||
_body->setActivationState(ACTIVE_TAG);
|
_body->setActivationState(ACTIVE_TAG);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ public:
|
||||||
virtual void clearIncomingDirtyFlags(uint32_t flags) = 0;
|
virtual void clearIncomingDirtyFlags(uint32_t flags) = 0;
|
||||||
|
|
||||||
virtual MotionType computeObjectMotionType() const = 0;
|
virtual MotionType computeObjectMotionType() const = 0;
|
||||||
virtual void computeObjectShapeInfo(ShapeInfo& shapeInfo);
|
virtual void computeObjectShapeInfo(ShapeInfo& shapeInfo) = 0;
|
||||||
|
|
||||||
|
|
||||||
btCollisionShape* getShape() const { return _shape; }
|
btCollisionShape* getShape() const { return _shape; }
|
||||||
|
|
|
@ -55,22 +55,12 @@ void PhysicalEntitySimulation::addEntityInternal(EntityItem* entity) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicalEntitySimulation::removeEntityInternal(EntityItem* entity) {
|
void PhysicalEntitySimulation::removeEntityInternal(EntityItem* entity) {
|
||||||
assert(entity);
|
if (entity->getPhysicsInfo()) {
|
||||||
void* physicsInfo = entity->getPhysicsInfo();
|
|
||||||
if (physicsInfo) {
|
|
||||||
_pendingRemoves.insert(entity);
|
_pendingRemoves.insert(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicalEntitySimulation::deleteEntityInternal(EntityItem* entity) {
|
void PhysicalEntitySimulation::changeEntityInternal(EntityItem* entity) {
|
||||||
assert(entity);
|
|
||||||
void* physicsInfo = entity->getPhysicsInfo();
|
|
||||||
if (physicsInfo) {
|
|
||||||
_pendingRemoves.insert(entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhysicalEntitySimulation::entityChangedInternal(EntityItem* entity) {
|
|
||||||
// queue incoming changes: from external sources (script, EntityServer, etc) to physics engine
|
// queue incoming changes: from external sources (script, EntityServer, etc) to physics engine
|
||||||
assert(entity);
|
assert(entity);
|
||||||
void* physicsInfo = entity->getPhysicsInfo();
|
void* physicsInfo = entity->getPhysicsInfo();
|
||||||
|
|
|
@ -33,15 +33,16 @@ public:
|
||||||
|
|
||||||
void init(EntityTree* tree, PhysicsEngine* engine, ShapeManager* shapeManager, EntityEditPacketSender* packetSender);
|
void init(EntityTree* tree, PhysicsEngine* engine, ShapeManager* shapeManager, EntityEditPacketSender* packetSender);
|
||||||
|
|
||||||
|
protected: // only called by EntitySimulation
|
||||||
// overrides for EntitySimulation
|
// overrides for EntitySimulation
|
||||||
void updateEntitiesInternal(const quint64& now);
|
void updateEntitiesInternal(const quint64& now);
|
||||||
void addEntityInternal(EntityItem* entity);
|
void addEntityInternal(EntityItem* entity);
|
||||||
void removeEntityInternal(EntityItem* entity);
|
void removeEntityInternal(EntityItem* entity);
|
||||||
void deleteEntityInternal(EntityItem* entity);
|
void changeEntityInternal(EntityItem* entity);
|
||||||
void entityChangedInternal(EntityItem* entity);
|
|
||||||
void sortEntitiesThatMovedInternal();
|
void sortEntitiesThatMovedInternal();
|
||||||
void clearEntitiesInternal();
|
void clearEntitiesInternal();
|
||||||
|
|
||||||
|
public:
|
||||||
VectorOfMotionStates& getObjectsToDelete();
|
VectorOfMotionStates& getObjectsToDelete();
|
||||||
VectorOfMotionStates& getObjectsToAdd();
|
VectorOfMotionStates& getObjectsToAdd();
|
||||||
VectorOfMotionStates& getObjectsToChange();
|
VectorOfMotionStates& getObjectsToChange();
|
||||||
|
|
|
@ -113,7 +113,8 @@ void PhysicsEngine::addObject(ObjectMotionState* motionState) {
|
||||||
case MOTION_TYPE_STATIC:
|
case MOTION_TYPE_STATIC:
|
||||||
default: {
|
default: {
|
||||||
if (!body) {
|
if (!body) {
|
||||||
body = new btRigidBody(mass, motionState, shape, inertia);
|
assert(motionState->getShape());
|
||||||
|
body = new btRigidBody(mass, motionState, motionState->getShape(), inertia);
|
||||||
} else {
|
} else {
|
||||||
body->setMassProps(mass, inertia);
|
body->setMassProps(mass, inertia);
|
||||||
}
|
}
|
||||||
|
@ -144,6 +145,7 @@ void PhysicsEngine::deleteObjects(VectorOfMotionStates& objects) {
|
||||||
removeObject(object);
|
removeObject(object);
|
||||||
|
|
||||||
// NOTE: setRigidBody() modifies body->m_userPointer so we should clear the MotionState's body BEFORE deleting it.
|
// NOTE: setRigidBody() modifies body->m_userPointer so we should clear the MotionState's body BEFORE deleting it.
|
||||||
|
btRigidBody* body = object->getRigidBody();
|
||||||
object->setRigidBody(nullptr);
|
object->setRigidBody(nullptr);
|
||||||
delete body;
|
delete body;
|
||||||
object->releaseShape();
|
object->releaseShape();
|
||||||
|
@ -151,9 +153,10 @@ void PhysicsEngine::deleteObjects(VectorOfMotionStates& objects) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as above, but takes a Set instead of a Vector. Only called during teardown.
|
// Same as above, but takes a Set instead of a Vector and ommits some cleanup operations. Only called during teardown.
|
||||||
void PhysicsEngine::deleteObjects(SetOfMotionStates& objects) {
|
void PhysicsEngine::deleteObjects(SetOfMotionStates& objects) {
|
||||||
for (auto object : objects) {
|
for (auto object : objects) {
|
||||||
|
btRigidBody* body = object->getRigidBody();
|
||||||
_dynamicsWorld->removeRigidBody(body);
|
_dynamicsWorld->removeRigidBody(body);
|
||||||
|
|
||||||
// NOTE: setRigidBody() modifies body->m_userPointer so we should clear the MotionState's body BEFORE deleting it.
|
// NOTE: setRigidBody() modifies body->m_userPointer so we should clear the MotionState's body BEFORE deleting it.
|
||||||
|
@ -181,6 +184,11 @@ void PhysicsEngine::changeObjects(VectorOfMotionStates& objects) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PhysicsEngine::reinsertObject(ObjectMotionState* object) {
|
||||||
|
removeObject(object);
|
||||||
|
addObject(object);
|
||||||
|
}
|
||||||
|
|
||||||
void PhysicsEngine::removeContacts(ObjectMotionState* motionState) {
|
void PhysicsEngine::removeContacts(ObjectMotionState* motionState) {
|
||||||
// trigger events for new/existing/old contacts
|
// trigger events for new/existing/old contacts
|
||||||
ContactMap::iterator contactItr = _contactMap.begin();
|
ContactMap::iterator contactItr = _contactMap.begin();
|
||||||
|
@ -373,11 +381,6 @@ void PhysicsEngine::dumpStatsIfNecessary() {
|
||||||
// CF_DISABLE_VISUALIZE_OBJECT = 32, //disable debug drawing
|
// CF_DISABLE_VISUALIZE_OBJECT = 32, //disable debug drawing
|
||||||
// CF_DISABLE_SPU_COLLISION_PROCESSING = 64//disable parallel/SPU processing
|
// CF_DISABLE_SPU_COLLISION_PROCESSING = 64//disable parallel/SPU processing
|
||||||
|
|
||||||
void PhysicsEngine::reinsertObject(ObjectMotionState* object) {
|
|
||||||
removeObject(object);
|
|
||||||
addObject(object);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhysicsEngine::bump(ObjectMotionState* object) {
|
void PhysicsEngine::bump(ObjectMotionState* object) {
|
||||||
assert(object);
|
assert(object);
|
||||||
/* TODO: Andrew to implement this
|
/* TODO: Andrew to implement this
|
||||||
|
|
|
@ -58,6 +58,7 @@ public:
|
||||||
void deleteObjects(SetOfMotionStates& objects); // only called during teardown
|
void deleteObjects(SetOfMotionStates& objects); // only called during teardown
|
||||||
void addObjects(VectorOfMotionStates& objects);
|
void addObjects(VectorOfMotionStates& objects);
|
||||||
void changeObjects(VectorOfMotionStates& objects);
|
void changeObjects(VectorOfMotionStates& objects);
|
||||||
|
void reinsertObject(ObjectMotionState* object);
|
||||||
|
|
||||||
void stepSimulation();
|
void stepSimulation();
|
||||||
void computeCollisionEvents();
|
void computeCollisionEvents();
|
||||||
|
|
Loading…
Reference in a new issue