namechange EntityMotionState to CustomMotionState

This commit is contained in:
Andrew Meadows 2014-11-06 10:59:04 -08:00
parent 01b76af9d0
commit 94b6d89b4e
4 changed files with 21 additions and 21 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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
}

View file

@ -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<PositionHashKey, VoxelObject> _voxels;
btHashMap<UUIDHashKey, EntityMotionState*> _entities;
btHashMap<UUIDHashKey, CustomMotionState*> _entities;
};