Changeset 4838 in orxonox.OLD for orxonox/trunk/src/proto/proto_world_entity.cc
- Timestamp:
- Jul 12, 2005, 12:09:04 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/proto/proto_world_entity.cc
r4483 r4838 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 22 22 using namespace std; 23 23 24 /**25 \brief standard constructor26 27 */28 ProtoWorldEntity::ProtoWorldEntity ()29 {30 this->init();31 }32 24 33 25 /** 34 \briefconstructs and loads a ProtoWorldEntity from a XML-element35 \param root the XML-element to load from36 */26 * constructs and loads a ProtoWorldEntity from a XML-element 27 * @param root the XML-element to load from 28 */ 37 29 ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root) 38 30 { 39 31 this->init(); 40 this->loadParams(root); 32 if (root != NULL) 33 this->loadParams(root); 41 34 } 42 35 43 36 44 37 /** 45 \briefstandard deconstructor46 */47 ProtoWorldEntity::~ProtoWorldEntity () 38 * standard deconstructor 39 */ 40 ProtoWorldEntity::~ProtoWorldEntity () 48 41 { 49 42 … … 51 44 52 45 /** 53 \brief initializes the ProtoWorldEntity 54 */ 46 * initializes the ProtoWorldEntity 47 * @todo change this to what you wish 48 */ 55 49 void ProtoWorldEntity::init(void) 56 50 { 51 this->setClassID(CL_PROTO_WORLD_ENTITY, ) 57 52 ... 58 53 } 59 54 60 55 /** 61 \brief loads a ProtoWorldEntity from a XML-element 62 \param root the XML-element to load from 63 */ 56 * loads a ProtoWorldEntity from a XML-element 57 * @param root the XML-element to load from 58 * @todo make the class Loadable 59 */ 64 60 void ProtoWorldEntity::loadParams(const TiXmlElement* root) 65 61 { 62 // all the clases this Entity is directly derived from must be called in this way, to load all settings. 66 63 static_cast<WorldEntity*>(this)->loadParam(root); 67 64 … … 71 68 72 69 /** 73 \briefadvances the ProtoWorldEntity about time seconds74 \param time the Time to step75 */70 * advances the ProtoWorldEntity about time seconds 71 * @param time the Time to step 72 */ 76 73 ProtoWorldEntity::tick(float time) 77 74 { … … 80 77 81 78 /** 82 \briefdraws this worldEntity83 */79 * draws this worldEntity 80 */ 84 81 void ProtoWorldEntity::draw () 85 { 82 { 86 83 glMatrixMode(GL_MODELVIEW); 87 84 glPushMatrix(); 88 85 float matrix[4][4]; 89 86 90 87 /* translate */ 91 glTranslatef (this->getAbsCoor ().x, 92 this->getAbsCoor ().y, 93 88 glTranslatef (this->getAbsCoor ().x, 89 this->getAbsCoor ().y, 90 this->getAbsCoor ().z); 94 91 /* rotate */ 95 92 this->getAbsDir().matrix(matrix);
Note: See TracChangeset
for help on using the changeset viewer.