Changeset 472
- Timestamp:
- Dec 12, 2007, 3:11:44 PM (17 years ago)
- Location:
- code/branches/objecthierarchy
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/bin/resources.cfg
r135 r472 8 8 FileSystem=../Media 9 9 FileSystem=../Media/fonts 10 # FileSystem=../Media/materials/programs11 # FileSystem=../Media/materials/scripts12 # FileSystem=../Media/materials/textures13 # FileSystem=../Media/models14 # FileSystem=../Media/overlays15 # FileSystem=../Media/particle10 # FileSystem=../Media/materials/programs 11 # FileSystem=../Media/materials/scripts 12 # FileSystem=../Media/materials/textures 13 # FileSystem=../Media/models 14 # FileSystem=../Media/overlays 15 # FileSystem=../Media/particle 16 16 FileSystem=../Media/gui 17 # FileSystem=../Media/DeferredShadingMedia18 # Zip=../Media/packs/cubemap.zip19 # Zip=../Media/packs/cubemapsJS.zip20 # Zip=../Media/packs/dragon.zip21 # Zip=../Media/packs/fresneldemo.zip22 # Zip=../Media/packs/ogretestmap.zip17 # FileSystem=../Media/DeferredShadingMedia 18 # Zip=../Media/packs/cubemap.zip 19 # Zip=../Media/packs/cubemapsJS.zip 20 # Zip=../Media/packs/dragon.zip 21 # Zip=../Media/packs/fresneldemo.zip 22 # Zip=../Media/packs/ogretestmap.zip 23 23 Zip=../Media/packs/skybox.zip -
code/branches/objecthierarchy/src/orxonox/core/CoreIncludes.h
r460 r472 33 33 typedef Ogre::ColourValue ColourValue; 34 34 typedef Ogre::Radian Radian; 35 typedef Ogre::Degree Degree; 35 36 typedef Ogre::Real Real; 36 37 typedef Ogre::Quaternion Quaternion; -
code/branches/objecthierarchy/src/orxonox/objects/WorldEntity.cc
r461 r472 28 28 } 29 29 30 this->bStatic_ = false;30 this->bStatic_ = true; 31 31 this->velocity_ = Vector3(0, 0, 0); 32 this->acceleration_ = Vector3(0, 0, 0); 33 this->rotationAxis_ = Vector3(0, 1, 0); 34 this->rotationRate_ = 0; 35 this->momentum_ = 0; 32 36 } 33 37 … … 40 44 if (!this->bStatic_) 41 45 { 46 this->velocity_ += (dt * this->acceleration_); 42 47 this->translate(dt * this->velocity_); 48 49 this->rotationRate_ += (dt * this->momentum_); 50 this->rotate(this->rotationAxis_, dt * this->rotationRate_); 43 51 } 44 52 } -
code/branches/objecthierarchy/src/orxonox/objects/WorldEntity.h
r460 r472 60 60 { this->node_->detachAllObjects(); } 61 61 62 inline void setVelocity(const Vector3& velocity) 63 { this->velocity_ = velocity; } 64 inline void setVelocity(Real x, Real y, Real z) 65 { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; } 66 inline const Vector3& getVelocity() const 67 { return this->velocity_; } 68 69 inline void setAcceleration(const Vector3& acceleration) 70 { this->acceleration_ = acceleration; } 71 inline void setAcceleration(Real x, Real y, Real z) 72 { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; } 73 inline const Vector3& getAcceleration() const 74 { return this->acceleration_; } 75 76 inline void setRotationAxis(const Vector3& axis) 77 { this->rotationAxis_ = axis; } 78 inline void setRotationAxis(Real x, Real y, Real z) 79 { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; } 80 inline const Vector3& getRotationAxis() const 81 { return this->rotationAxis_; } 82 83 inline void setRotationRate(const Radian& angle) 84 { this->rotationRate_ = angle; } 85 inline void setRotationRate(const Degree& angle) 86 { this->rotationRate_ = angle; } 87 inline const Radian& getRotationRate() const 88 { return this->rotationRate_; } 89 90 inline void setMomentum(const Radian& angle) 91 { this->momentum_ = angle; } 92 inline void setMomentum(const Degree& angle) 93 { this->momentum_ = angle; } 94 inline const Radian& getMomentum() const 95 { return this->momentum_; } 96 97 62 98 static Ogre::SceneManager* sceneManager_s; 63 99 static int num_s; … … 69 105 bool bStatic_; 70 106 Vector3 velocity_; 107 Vector3 acceleration_; 108 Vector3 rotationAxis_; 109 Radian rotationRate_; 110 Radian momentum_; 71 111 }; 72 112 }
Note: See TracChangeset
for help on using the changeset viewer.