From 94b6d89b4ebf8cd084227daf8b143c3725f4246b Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 6 Nov 2014 10:59:04 -0800 Subject: [PATCH] namechange EntityMotionState to CustomMotionState --- libraries/physics/src/CustomMotionState.cpp | 20 ++++++++++---------- libraries/physics/src/CustomMotionState.h | 12 ++++++------ libraries/physics/src/PhysicsWorld.cpp | 6 +++--- libraries/physics/src/PhysicsWorld.h | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libraries/physics/src/CustomMotionState.cpp b/libraries/physics/src/CustomMotionState.cpp index 2eaab25a46..bd9d41011c 100644 --- a/libraries/physics/src/CustomMotionState.cpp +++ b/libraries/physics/src/CustomMotionState.cpp @@ -1,5 +1,5 @@ // -// EntityMotionState.cpp +// CustomMotionState.cpp // libraries/physcis/src // // Created by Andrew Meadows 2014.11.05 @@ -11,28 +11,28 @@ #ifdef USE_BULLET_PHYSICS -#include "EntityMotionState.h" +#include "CustomMotionState.h" -EntityMotionState::EntityMotionState() : _motionType(MOTION_TYPE_STATIC), +CustomMotionState::CustomMotionState() : _motionType(MOTION_TYPE_STATIC), _inertiaDiagLocal(1.0f, 1.0f, 1.0f), _mass(1.0f), _shape(NULL), _object(NULL) { } /* -void EntityMotionState::getWorldTransform (btTransform &worldTrans) const { +void CustomMotionState::getWorldTransform (btTransform &worldTrans) const { } -void EntityMotionState::setWorldTransform (const btTransform &worldTrans) { +void CustomMotionState::setWorldTransform (const btTransform &worldTrans) { } -void EntityMotionState::computeMassProperties() { +void CustomMotionState::computeMassProperties() { } -void EntityMotionState::getShapeInfo(ShapeInfo& info) { +void CustomMotionState::getShapeInfo(ShapeInfo& info) { } */ -bool EntityMotionState::makeStatic() { +bool CustomMotionState::makeStatic() { if (_motionType == MOTION_TYPE_STATIC) { return true; } @@ -43,7 +43,7 @@ bool EntityMotionState::makeStatic() { return false; } -bool EntityMotionState::makeDynamic() { +bool CustomMotionState::makeDynamic() { if (_motionType == MOTION_TYPE_DYNAMIC) { return true; } @@ -54,7 +54,7 @@ bool EntityMotionState::makeDynamic() { return false; } -bool EntityMotionState::makeKinematic() { +bool CustomMotionState::makeKinematic() { if (_motionType == MOTION_TYPE_KINEMATIC) { return true; } diff --git a/libraries/physics/src/CustomMotionState.h b/libraries/physics/src/CustomMotionState.h index b891f93ae3..282c4eaae0 100644 --- a/libraries/physics/src/CustomMotionState.h +++ b/libraries/physics/src/CustomMotionState.h @@ -1,5 +1,5 @@ // -// EntityMotionState.h +// CustomMotionState.h // libraries/physcis/src // // Created by Andrew Meadows 2014.11.05 @@ -9,8 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#ifndef hifi_EntityMotionState_h -#define hifi_EntityMotionState_h +#ifndef hifi_CustomMotionState_h +#define hifi_CustomMotionState_h #ifdef USE_BULLET_PHYSICS @@ -25,9 +25,9 @@ enum MotionType { MOTION_TYPE_KINEMATIC // keyframed motion }; -class EntityMotionState : public btMotionState { +class CustomMotionState : public btMotionState { public: - EntityMotionState(); + CustomMotionState(); //// these override methods of the btMotionState base class //virtual void getWorldTransform (btTransform &worldTrans) const; @@ -54,4 +54,4 @@ private: }; #endif // USE_BULLET_PHYSICS -#endif // hifi_EntityMotionState_h +#endif // hifi_CustomMotionState_h diff --git a/libraries/physics/src/PhysicsWorld.cpp b/libraries/physics/src/PhysicsWorld.cpp index 0d475f0a84..14387fba32 100644 --- a/libraries/physics/src/PhysicsWorld.cpp +++ b/libraries/physics/src/PhysicsWorld.cpp @@ -76,10 +76,10 @@ bool PhysicsWorld::removeVoxel(const glm::vec3& position, float scale) { return false; } -bool PhysicsWorld::addEntity(const QUuid& id, EntityMotionState* motionState) { +bool PhysicsWorld::addEntity(const QUuid& id, CustomMotionState* motionState) { assert(motionState); UUIDHashKey key(id); - EntityMotionState** statePtr = _entities.find(key); + CustomMotionState** statePtr = _entities.find(key); if (!statePtr) { // BOOKMARK: Andrew to implement this } else { @@ -90,7 +90,7 @@ bool PhysicsWorld::addEntity(const QUuid& id, EntityMotionState* motionState) { bool PhysicsWorld::removeEntity(const QUuid& id) { UUIDHashKey key(id); - EntityMotionState** statePtr = _entities.find(key); + CustomMotionState** statePtr = _entities.find(key); if (statePtr) { // BOOKMARK: Andrew to implement this } diff --git a/libraries/physics/src/PhysicsWorld.h b/libraries/physics/src/PhysicsWorld.h index cfb2d08613..d7ea0436ad 100644 --- a/libraries/physics/src/PhysicsWorld.h +++ b/libraries/physics/src/PhysicsWorld.h @@ -45,7 +45,7 @@ public: /// \return true if Entity added /// \param info information about collision shapes to create - bool addEntity(const QUuid& id, EntityMotionState* motionState); + bool addEntity(const QUuid& id, CustomMotionState* motionState); /// \return true if Entity removed /// \param id UUID of the entity @@ -62,7 +62,7 @@ protected: private: btHashMap _voxels; - btHashMap _entities; + btHashMap _entities; };