- Timestamp:
- Nov 11, 2008, 10:30:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/WorldEntity.h
r2087 r2178 33 33 34 34 #define OGRE_FORCE_ANGLE_TYPES 35 #include <OgreSceneNode.h> 35 36 36 #include <OgreSceneNode.h> 37 #include "LinearMath/btMotionState.h" 38 #include "BulletDynamics/Dynamics/btRigidBody.h" 37 39 38 40 #include "network/Synchronisable.h" … … 42 44 namespace orxonox 43 45 { 44 class _OrxonoxExport WorldEntity : public BaseObject, public network::Synchronisable 46 class _OrxonoxExport WorldEntity : public BaseObject, public network::Synchronisable, public btMotionState 45 47 { 46 48 public: … … 125 127 { this->node_->scale(scale, scale, scale); } 126 128 129 void setcollisionRadius(float radius); 130 float getcollisionRadius(); 131 132 bool hasPhysics() { return this->physicalBody_; } 133 bool isKinematic() { return this->physicalBody_ && this->physicalBody_->isKinematicObject(); } 134 bool isDynamic() { return this->physicalBody_ && !this->physicalBody_->isStaticOrKinematicObject(); } 135 127 136 void attach(WorldEntity* object); 128 137 void detach(WorldEntity* object); … … 139 148 140 149 protected: 150 //virtual btCollisionShape* getCollisionShape() = 0; 151 152 void createPhysicalBody(); 153 virtual void attachPhysicalObject(WorldEntity* object) { } 154 141 155 Ogre::SceneNode* node_; 156 bool bAddedToPhysicalWorld_; 157 btRigidBody* physicalBody_; 142 158 143 159 private: … … 155 171 { this->roll(angle); } 156 172 173 // Bullet btMotionState related 174 virtual void setWorldTransform(const btTransform& worldTrans) 175 { 176 } 177 178 // Bullet btMotionState related 179 virtual void getWorldTransform(btTransform& worldTrans) const 180 { 181 } 182 157 183 WorldEntity* parent_; 158 184 unsigned int parentID_;
Note: See TracChangeset
for help on using the changeset viewer.