Changeset 2442 for code/branches/physics_merge/src/orxonox/tools
- Timestamp:
- Dec 14, 2008, 4:16:52 PM (16 years ago)
- Location:
- code/branches/physics_merge
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics_merge
- Property svn:mergeinfo changed
-
code/branches/physics_merge/src/orxonox/tools/BillboardSet.cc
r2171 r2442 34 34 35 35 #include <OgreSceneManager.h> 36 #include <OgreBillboardSet.h> 36 37 #include <OgreBillboard.h> 37 38 -
code/branches/physics_merge/src/orxonox/tools/BillboardSet.h
r2087 r2442 33 33 34 34 #include <string> 35 #include <Ogre BillboardSet.h>35 #include <OgrePrerequisites.h> 36 36 37 37 #include "util/Math.h" -
code/branches/physics_merge/src/orxonox/tools/BulletConversions.h
r2440 r2442 37 37 #include "LinearMath/btVector3.h" 38 38 39 // Vector3 to btVector3 40 template <> 41 struct ConverterExplicit<orxonox::Vector3, btVector3> 39 namespace orxonox 42 40 { 43 static bool convert(btVector3* output, const orxonox::Vector3& input) 41 // Vector3 to btVector3 42 template <> 43 struct ConverterExplicit<orxonox::Vector3, btVector3> 44 44 { 45 output->setX(input.x); 46 output->setY(input.y); 47 output->setZ(input.z); 48 return true; 49 } 50 }; 45 static bool convert(btVector3* output, const orxonox::Vector3& input) 46 { 47 output->setX(input.x); 48 output->setY(input.y); 49 output->setZ(input.z); 50 return true; 51 } 52 }; 51 53 52 // btVector3 to Vector3 53 template <> 54 struct ConverterExplicit<btVector3, orxonox::Vector3> 55 { 56 static bool convert(orxonox::Vector3* output, const btVector3& input) 54 // btVector3 to Vector3 55 template <> 56 struct ConverterExplicit<btVector3, orxonox::Vector3> 57 57 { 58 output->x = input.x(); 59 output->y = input.y(); 60 output->z = input.z(); 61 return true; 62 } 63 }; 58 static bool convert(orxonox::Vector3* output, const btVector3& input) 59 { 60 output->x = input.x(); 61 output->y = input.y(); 62 output->z = input.z(); 63 return true; 64 } 65 }; 64 66 65 // Quaternion to btQuaternion 66 template <> 67 struct ConverterExplicit<orxonox::Quaternion, btQuaternion> 68 { 69 static bool convert(btQuaternion* output, const orxonox::Quaternion& input) 67 // Quaternion to btQuaternion 68 template <> 69 struct ConverterExplicit<orxonox::Quaternion, btQuaternion> 70 70 { 71 output->setW(input.w); 72 output->setX(input.x); 73 output->setY(input.y); 74 output->setZ(input.z); 75 return true; 76 } 77 }; 71 static bool convert(btQuaternion* output, const orxonox::Quaternion& input) 72 { 73 output->setW(input.w); 74 output->setX(input.x); 75 output->setY(input.y); 76 output->setZ(input.z); 77 return true; 78 } 79 }; 78 80 79 // btQuaternion to Vector3 80 template <> 81 struct ConverterExplicit<btQuaternion, orxonox::Quaternion> 82 { 83 static bool convert(orxonox::Quaternion* output, const btQuaternion& input) 81 // btQuaternion to Vector3 82 template <> 83 struct ConverterExplicit<btQuaternion, orxonox::Quaternion> 84 84 { 85 output->w = input.w(); 86 output->x = input.x(); 87 output->y = input.y(); 88 output->z = input.z(); 89 return true; 90 } 91 }; 85 static bool convert(orxonox::Quaternion* output, const btQuaternion& input) 86 { 87 output->w = input.w(); 88 output->x = input.x(); 89 output->y = input.y(); 90 output->z = input.z(); 91 return true; 92 } 93 }; 94 } 92 95 93 96 #endif /* _BulletConversions_H__ */ -
code/branches/physics_merge/src/orxonox/tools/Mesh.cc
r2171 r2442 31 31 32 32 #include <sstream> 33 #include <OgreEntity.h> 33 34 #include <OgreSceneManager.h> 34 35 #include <cassert> -
code/branches/physics_merge/src/orxonox/tools/Mesh.h
r2087 r2442 33 33 34 34 #include <string> 35 #include <Ogre Entity.h>35 #include <OgrePrerequisites.h> 36 36 37 37 namespace orxonox -
code/branches/physics_merge/src/orxonox/tools/ParticleInterface.cc
r2171 r2442 57 57 58 58 this->scenemanager_ = scenemanager; 59 this->sceneNode_ = 0;60 59 this->particleSystem_ = 0; 61 60 … … 87 86 { 88 87 this->particleSystem_->removeAllEmitters(); 89 this->detachFromSceneNode();90 88 this->scenemanager_->destroyParticleSystem(this->particleSystem_); 91 }92 }93 94 void ParticleInterface::addToSceneNode(Ogre::SceneNode* sceneNode)95 {96 if (this->sceneNode_)97 this->detachFromSceneNode();98 99 if (this->particleSystem_)100 {101 this->sceneNode_ = sceneNode;102 this->sceneNode_->attachObject(this->particleSystem_);103 }104 }105 106 void ParticleInterface::detachFromSceneNode()107 {108 if (this->sceneNode_)109 {110 if (this->particleSystem_)111 this->sceneNode_->detachObject(this->particleSystem_);112 this->sceneNode_ = 0;113 89 } 114 90 } -
code/branches/physics_merge/src/orxonox/tools/ParticleInterface.h
r2087 r2442 33 33 34 34 #include <string> 35 #include <OgreP articleEmitter.h>35 #include <OgrePrerequisites.h> 36 36 37 37 #include "core/OrxonoxClass.h" … … 53 53 inline Ogre::ParticleSystem* getParticleSystem() const 54 54 { return this->particleSystem_; } 55 56 void addToSceneNode(Ogre::SceneNode* sceneNode);57 void detachFromSceneNode();58 55 59 56 Ogre::ParticleEmitter* createNewEmitter(); … … 96 93 static unsigned int counter_s; 97 94 98 Ogre::SceneNode* sceneNode_;99 95 Ogre::ParticleSystem* particleSystem_; 100 96 bool bVisible_;
Note: See TracChangeset
for help on using the changeset viewer.