Changeset 609
- Timestamp:
- Dec 18, 2007, 12:32:09 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/Flocking.h
r596 r609 14 14 #endif 15 15 16 using namespace Ogre;17 16 18 17 class Element // An element that flocks … … 20 19 21 20 public: 22 Vector3 location; // locationvector of the element23 Vector3 speed; // speedvector of the element24 Vector3 acceleration; // accelerationvector of the element21 Ogre::Vector3 location; // locationvector of the element 22 Ogre::Vector3 speed; // speedvector of the element 23 Ogre::Vector3 acceleration; // accelerationvector of the element 25 24 bool movable; // movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation 26 25 static int const SEPERATIONDISTANCE = 300; //detectionradius of seperation … … 38 37 39 38 //constructor 40 Element( Vector3 location_, Vector3 speed_,Vector3 acceleration_, bool movable_) {39 Element(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) { 41 40 acceleration = acceleration_; 42 41 speed = speed_; … … 46 45 47 46 //function to chance values of an element 48 void setValues( Vector3 location_, Vector3 speed_,Vector3 acceleration_, bool movable_) {47 void setValues(Ogre::Vector3 location_, Ogre::Vector3 speed_, Ogre::Vector3 acceleration_, bool movable_) { 49 48 acceleration = acceleration_; 50 49 speed = speed_; … … 55 54 //calculates the distance between the element and an other point given by temp 56 55 float getDistance(Element temp) { 57 Vector3 distance = temp.location-location;56 Ogre::Vector3 distance = temp.location-location; 58 57 return distance.length(); 59 58 } … … 70 69 71 70 //separation-function (keep elements separated, avoid crashs) 72 Vector3 separation(Element arrayOfElements[]) { 71 Ogre::Vector3 separation(Element arrayOfElements[]) { 72 using namespace Ogre; 73 73 Vector3 steering = Vector3(0,0,0); //steeringvector 74 74 Vector3 inverseDistance = Vector3(0,0,0); //vector pointing away from possible collisions … … 95 95 96 96 //alignment-function (lead elements to the same heading) 97 Vector3 alignment(Element arrayOfElements[]) { 97 Ogre::Vector3 alignment(Element arrayOfElements[]) { 98 using namespace Ogre; 98 99 Vector3 steering = Vector3(0,0,0); //steeringvector 99 100 int numberOfNeighbour = 0; //number of observed neighbours … … 113 114 114 115 //cohseion-function (keep elements close to each other) 115 Vector3 cohesion(Element arrayOfElements[]) { 116 Ogre::Vector3 cohesion(Element arrayOfElements[]) { 117 using namespace Ogre; 116 118 Vector3 steering = Vector3(0,0,0); //steeringvector 117 119 int numberOfNeighbour = 0; //number of observed neighbours -
code/branches/FICN/src/orxonox/graphicsEngine.h
r462 r609 14 14 namespace orxonox { 15 15 16 using namespace Ogre;17 16 /** 18 17 * graphics engine manager class … … 27 26 bool load(); 28 27 void loadRessourceLocations(std::string path); 29 SceneManager* getSceneManager();28 Ogre::SceneManager* getSceneManager(); 30 29 void startRender(); 31 30 -
code/branches/FICN/src/orxonox/hud/HUD.h
r587 r609 7 7 //#include <CEGUIRenderer.h> 8 8 9 using namespace Ogre;10 9 11 10 namespace hud … … 17 16 private: 18 17 19 20 O verlayElement* targetWindowNameText_;21 O verlayElement* targetWindowStatusText_;22 O verlayElement* targetWindowDistanceText_;23 O verlayElement* targetWindowHitRatingText_;24 O verlayElement* energyLength_;25 O verlayElement* shieldLeftTop_;26 O verlayElement* shieldRightTop_;27 O verlayElement* shieldLeftBottom_;28 O verlayElement* shieldRightBottom_;29 O verlayElement* rocketNum1_;30 O verlayElement* rocketNum2_;31 O verlayElement* rocketNum3_;32 O verlayElement* rocketNum4_;33 O verlayElement* energyDistrPoint_;34 O verlayElement* primarChoice_;18 Ogre::OverlayElement* timeText_; 19 Ogre::OverlayElement* targetWindowNameText_; 20 Ogre::OverlayElement* targetWindowStatusText_; 21 Ogre::OverlayElement* targetWindowDistanceText_; 22 Ogre::OverlayElement* targetWindowHitRatingText_; 23 Ogre::OverlayElement* energyLength_; 24 Ogre::OverlayElement* shieldLeftTop_; 25 Ogre::OverlayElement* shieldRightTop_; 26 Ogre::OverlayElement* shieldLeftBottom_; 27 Ogre::OverlayElement* shieldRightBottom_; 28 Ogre::OverlayElement* rocketNum1_; 29 Ogre::OverlayElement* rocketNum2_; 30 Ogre::OverlayElement* rocketNum3_; 31 Ogre::OverlayElement* rocketNum4_; 32 Ogre::OverlayElement* energyDistrPoint_; 33 Ogre::OverlayElement* primarChoice_; 35 34 36 35 … … 41 40 int timeSec_; 42 41 43 String targetWindowName_;44 String targetWindowStatus_;42 Ogre::String targetWindowName_; 43 Ogre::String targetWindowStatus_; 45 44 int targetWindowDistance_; 46 45 int targetWindowHitRating_; … … 78 77 79 78 void setTime(int i, int j); 80 void setTargetWindowName( String i);81 void setTargetWindowStatus( String i);79 void setTargetWindowName(Ogre::String i); 80 void setTargetWindowStatus(Ogre::String i); 82 81 void setTargetWindowDistance(int i); 83 82 void setTargetWindowHitRating(int i); -
code/branches/FICN/src/orxonox/orxonox.cc
r608 r609 31 31 */ 32 32 33 #include "orxonox.h" 34 #include "graphicsEngine.h" 35 36 //#include <Ogre.h> 37 // 40% speed up: (instead of Ogre.h) 38 #include <OgreSceneNode.h> 39 #include <OgreSceneManager.h> 33 //****** OGRE ****** 34 #include <OgreString.h> 35 #include <OgreException.h> 40 36 #include <OgreRoot.h> 41 37 #include <OgreFrameListener.h> 38 #include <OgreRenderWindow.h> 39 #include <OgreTextureManager.h> 40 #include <OgreResourceGroupManager.h> 42 41 #include <OgreConfigFile.h> 43 #include <Ogre TextureManager.h>44 #include <Ogre Entity.h>45 #include <OgreRenderWindow.h> 46 42 #include <OgreOverlay.h> 43 #include <OgreOverlayManager.h> 44 45 //****** OIS ******* 47 46 #include <OIS/OIS.h> 48 //#include <CEGUI/CEGUI.h> 49 //#include <OgreCEGUIRenderer.h> 50 47 48 //****** STD ******* 51 49 #include <string> 52 50 #include <iostream> 53 51 54 #include "objects/Tickable.h" 55 #include "objects/Timer.h" 56 #include "core/ArgReader.h" 57 #include "core/Factory.h" 58 #include "core/Debug.h" 59 60 #include "../loader/LevelLoader.h" 61 #include "../audio/AudioManager.h" 62 63 #include "hud/HUD.h" 64 65 //network stuff 66 #include "../network/Server.h" 67 #include "../network/Client.h" 68 #include "../network/NetworkFrameListener.h" 69 52 // hack for the usleep/Sleep problem 70 53 #ifdef WIN32 71 54 #include <windows.h> … … 75 58 #endif 76 59 60 //***** ORXONOX **** 61 // loader and audio 62 #include "loader/LevelLoader.h" 63 #include "audio/AudioManager.h" 64 65 // network 66 #include "../network/Server.h" 67 #include "../network/Client.h" 68 #include "../network/NetworkFrameListener.h" 69 70 // objects 71 #include "objects/Tickable.h" 72 #include "objects/Timer.h" 73 #include "core/ArgReader.h" 74 #include "core/Factory.h" 75 #include "core/Debug.h" 76 #include "hud/HUD.h" 77 78 #include "graphicsEngine.h" 79 #include "orxonox.h" 80 81 77 82 namespace orxonox 78 83 { 79 84 using namespace Ogre; 80 85 81 // put this in seperate Class or solve the problem in another fashion86 // put this in a seperate Class or solve the problem in another fashion 82 87 class OrxListener : public FrameListener 83 88 { … … 331 336 archName = i->second; 332 337 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 333 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);338 ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName); 334 339 #else 335 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);340 ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName); 336 341 #endif 337 342 } … … 413 418 std::ostringstream windowHndStr; 414 419 OIS::ParamList pl; 415 Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();420 RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow(); 416 421 417 422 win->getCustomAttribute("WINDOW", &windowHnd); -
code/branches/FICN/src/orxonox/orxonox.h
r608 r609 8 8 #define ORXONOX_H 9 9 10 //#include <OgreSingleton.h>10 #include <OgrePrerequisites.h> 11 11 #include <OgreSceneManager.h> 12 12 #include <OIS/OIS.h> … … 39 39 void die(/* some error code */); 40 40 static Orxonox* getSingleton(); 41 inline SceneManager* getSceneManager() { return ogre_->getSceneManager(); };41 inline Ogre::SceneManager* getSceneManager() { return ogre_->getSceneManager(); }; 42 42 inline GraphicsEngine* getOgrePointer() { return ogre_; }; 43 43 inline audio::AudioManager* getAudioManagerPointer() { return auMan_; }; -
code/branches/FICN/src/orxonox/particle/ParticleInterface.h
r535 r609 8 8 // #include <CEGUIRenderer.h> 9 9 10 using namespace Ogre;11 10 12 11 namespace particle … … 16 15 { 17 16 public: 18 ParticleSystem *particleSystem_;17 Ogre::ParticleSystem *particleSystem_; 19 18 20 ParticleInterface( SceneManager *sceneManager, String name,String templateName );19 ParticleInterface( Ogre::SceneManager *sceneManager, Ogre::String name, Ogre::String templateName ); 21 20 ~ParticleInterface( void ); 22 void addToSceneNode( SceneNode* sceneNode );21 void addToSceneNode( Ogre::SceneNode* sceneNode ); 23 22 void dettachFromSceneNode( void ); 24 ParticleEmitter* getEmitter ( int emitterNr );23 Ogre::ParticleEmitter* getEmitter ( int emitterNr ); 25 24 void newEmitter ( void ); 26 void setPositionOfEmitter ( int emitterNr, Vector3 position );27 Vector3 getPositionOfEmitter ( int emitterNr );28 void setDirection ( Vector3 direction );29 Vector3 getDirection ( void );30 Real getVelocity();31 void setVelocity( Real v );25 void setPositionOfEmitter ( int emitterNr, Ogre::Vector3 position ); 26 Ogre::Vector3 getPositionOfEmitter ( int emitterNr ); 27 void setDirection ( Ogre::Vector3 direction ); 28 Ogre::Vector3 getDirection ( void ); 29 Ogre::Real getVelocity(); 30 void setVelocity( Ogre::Real v ); 32 31 int getRate(); 33 32 void setRate( int r ); 34 Real getDistance();35 void setDistance( Real d );36 ColourValue getColour( void );37 void setColour( ColourValue colour );33 Ogre::Real getDistance(); 34 void setDistance( Ogre::Real d ); 35 Ogre::ColourValue getColour( void ); 36 void setColour( Ogre::ColourValue colour ); 38 37 void switchEnable( void ); 39 38 40 39 private: 41 SceneNode *sceneNode_;42 SceneManager *sceneManager_;43 Real distance_;44 Real velocity_;40 Ogre::SceneNode *sceneNode_; 41 Ogre::SceneManager *sceneManager_; 42 Ogre::Real distance_; 43 Ogre::Real velocity_; 45 44 int rate_; 46 ColourValue colour_;45 Ogre::ColourValue colour_; 47 46 int numberOfEmitters_; 48 47
Note: See TracChangeset
for help on using the changeset viewer.