Changeset 4570 in orxonox.OLD for orxonox/trunk/src/world_entities/world_entity.cc
- Timestamp:
- Jun 10, 2005, 12:42:35 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/world_entity.cc
r4436 r4570 1 1 2 2 3 /* 3 /* 4 4 orxonox - the future of 3D-vertical-scrollers 5 5 … … 89 89 \brief set the WorldEntity's collision hull 90 90 \param newhull: a pointer to a completely assembled CollisionCluster 91 91 92 92 Any previously assigned collision hull will be deleted on reassignment 93 93 */ … … 102 102 103 103 104 /** 105 \brief process draw function 104 /** 105 \brief process draw function 106 106 */ 107 107 void WorldEntity::processDraw () … … 143 143 /** 144 144 \brief this is called immediately after the Entity has been constructed and initialized 145 145 146 146 Put any initialisation code that requires knowledge of location (placement if the Entity is free) and owner of the entity here. 147 147 DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted. … … 154 154 /** 155 155 \brief this method is called by the world if the WorldEntity leaves valid gamespace 156 156 157 157 For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a 158 158 place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy). … … 166 166 \brief this method is called every frame 167 167 \param time: the time in seconds that has passed since the last tick 168 168 169 169 Handle all stuff that should update with time inside this method (movement, animation, etc.) 170 170 */ 171 void WorldEntity::tick(float time) 171 void WorldEntity::tick(float time) 172 172 { 173 173 } … … 176 176 /** 177 177 \brief the entity is drawn onto the screen with this function 178 178 179 179 This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn. 180 180 */ 181 void WorldEntity::draw() 181 void WorldEntity::draw() 182 182 { 183 183 glMatrixMode(GL_MODELVIEW); 184 184 glPushMatrix(); 185 185 float matrix[4][4]; 186 186 187 187 /* translate */ 188 glTranslatef (this->getAbsCoor ().x, 189 this->getAbsCoor ().y, 190 188 glTranslatef (this->getAbsCoor ().x, 189 this->getAbsCoor ().y, 190 this->getAbsCoor ().z); 191 191 /* rotate */ 192 192 this->getAbsDir ().matrix (matrix); … … 202 202 \brief this handles incoming command messages 203 203 \param cmd: a pointer to the incoming Command structure 204 204 205 205 Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used 206 206 to send commands from one WorldEntity to another.
Note: See TracChangeset
for help on using the changeset viewer.