Changeset 3521 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- Mar 12, 2005, 8:45:59 PM (20 years ago)
- Location:
- orxonox/trunk/src/story_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3507 r3521 22 22 #include "camera.h" 23 23 #include "environment.h" 24 #include "primitive.h" 24 25 #include "p_node.h" 25 26 #include "null_parent.h" … … 232 233 this->glmis->step(); 233 234 235 236 WorldEntity* env = new Environment(); 237 env->setName ("env"); 238 this->spawn(env); 239 this->trackManager->setBindSlave(env); 240 234 241 Vector* es = new Vector (50, 2, 0); 235 242 Quaternion* qs = new Quaternion (); 236 WorldEntity* env = new Environment(); 237 env->setName ("env"); 238 this->spawn(env, es, qs); 239 243 WorldEntity* pr = new Primitive(PSPHERE); 244 pr->setName("primitive"); 245 this->spawn(pr, this->localPlayer, es, qs, ROTATION); 246 247 240 248 /*monitor progress*/ 241 249 this->glmis->step(); 242 243 trackManager->setBindSlave(env);244 250 245 251 break; … … 896 902 897 903 904 /** 905 \brief add and spawn a new entity to this world 906 \param entity to be added 907 \param entity to be added to (PNode) 908 \param At what relative coordinates to add this entity. 909 \param In which relative direction should it look. 910 */ 911 void World::spawn(WorldEntity* entity, PNode* parentNode, 912 Vector* relCoor, Quaternion* relDir, 913 parentingMode mode) 914 { 915 916 if( parentNode != NULL && entity->parent == NULL) 917 { 918 parentNode->addChild (entity); 919 920 entity->setRelCoor (relCoor); 921 entity->setRelDir (relDir); 922 923 this->entities->add (entity); 924 925 entity->postSpawn (); 926 } 927 } 928 929 898 930 899 931 /** -
orxonox/trunk/src/story_entities/world.h
r3475 r3521 9 9 #include "stdincl.h" 10 10 #include "story_entity.h" 11 11 #include "p_node.h" 12 12 13 13 class TrackManager; … … 19 19 class Light; 20 20 class FontSet; 21 21 22 22 23 //! The game world … … 51 52 void spawn (WorldEntity* entity); 52 53 void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir); 53 54 void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir, 55 parentingMode mode); 54 56 55 57
Note: See TracChangeset
for help on using the changeset viewer.