Changeset 5361 in orxonox.OLD
- Timestamp:
- Oct 11, 2005, 1:26:29 AM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/environment.cc
r5357 r5361 25 25 #include "objModel.h" 26 26 #include "obb_tree.h" 27 #include "factory.h" 27 28 28 29 using namespace std; 29 30 CREATE_FACTORY(Environment); 30 31 31 32 /** … … 34 35 Environment::Environment () : WorldEntity() 35 36 { 36 this-> setClassID(CL_ENVIRONMENT, "Environment");37 this->init(); 37 38 this->loadModel("models/ships/bolido.obj"); 38 39 … … 41 42 } 42 43 44 /** 45 * create an environment out of a XML-element 46 * @param root the XML-element to load the Environment from 47 */ 48 Environment::Environment(const TiXmlElement* root) 49 { 50 this->init(); 51 if (root != NULL) 52 this->loadParams(root); 53 } 43 54 44 55 /** … … 47 58 Environment::~Environment () 48 59 {} 60 61 /** 62 * initialize an Environment 63 */ 64 void Environment::init() 65 { 66 this->setClassID(CL_ENVIRONMENT, "Environment"); 67 } 68 69 /** 70 * loads the Settings of an Environment from an XML-element. 71 * @param root the XML-element to load the ELements properties from 72 */ 73 void Environment::loadParams(const TiXmlElement* root) 74 { 75 static_cast<WorldEntity*>(this)->loadParams(root); 76 } 49 77 50 78 -
trunk/src/world_entities/environment.h
r5047 r5361 20 20 public: 21 21 Environment (); 22 Environment (const TiXmlElement* root); 22 23 virtual ~Environment (); 24 25 void init(); 26 void loadParams(const TiXmlElement* root); 27 23 28 24 29
Note: See TracChangeset
for help on using the changeset viewer.