Changeset 3302 in orxonox.OLD for orxonox/branches/parenting/src
- Timestamp:
- Dec 27, 2004, 9:31:52 PM (20 years ago)
- Location:
- orxonox/branches/parenting/src
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/Makefile.am
r3276 r3302 29 29 list.cc \ 30 30 p_node.cc \ 31 null_parent.cc 31 null_parent.cc \ 32 base_object.cc 32 33 33 34 noinst_HEADERS = ability.h \ … … 64 65 campaign.h \ 65 66 p_node.h \ 66 null_parent.h 67 null_parent.h \ 68 base_object.h 67 69 68 70 -
orxonox/branches/parenting/src/Makefile.in
r3276 r3302 61 61 environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \ 62 62 material.$(OBJEXT) list.$(OBJEXT) p_node.$(OBJEXT) \ 63 null_parent.$(OBJEXT) 63 null_parent.$(OBJEXT) base_object.$(OBJEXT) 64 64 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 65 65 orxonox_LDADD = $(LDADD) … … 68 68 am__depfiles_maybe = depfiles 69 69 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \ 70 @AMDEP_TRUE@ ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \ 70 @AMDEP_TRUE@ ./$(DEPDIR)/base_entity.Po \ 71 @AMDEP_TRUE@ ./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \ 71 72 @AMDEP_TRUE@ ./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \ 72 73 @AMDEP_TRUE@ ./$(DEPDIR)/command_node.Po \ … … 220 221 list.cc \ 221 222 p_node.cc \ 222 null_parent.cc 223 null_parent.cc \ 224 base_object.cc 223 225 224 226 noinst_HEADERS = ability.h \ … … 255 257 campaign.h \ 256 258 p_node.h \ 257 null_parent.h 259 null_parent.h \ 260 base_object.h 258 261 259 262 EXTRA_DIST = orxonox.conf … … 335 338 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ 336 339 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@ 340 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@ 337 341 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ 338 342 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@ -
orxonox/branches/parenting/src/camera.cc
r3236 r3302 45 45 this->actualPlace.r.y = 10.0; 46 46 this->actualPlace.r.z = -5.0; 47 48 this->setDrawable (false); 47 49 } 48 50 … … 83 85 case ELLIPTICAL: 84 86 { 87 /* 85 88 //r = actual_place.r 86 89 Orxonox *orx = Orxonox::getInstance(); … … 95 98 { 96 99 Vector *start = new Vector(0.0, 1.0, 0.0); 97 //r = /*actual_place.r*/ *start - plFocus.r;98 100 r = *(new Vector(0.0, 5.0, 0.0)); 99 101 … … 120 122 //printf("vector r = %f, %f, %f\n",r.x, r.y, r.z ); 121 123 rAbs = r.len(); 122 if(t < 30 .0) /* FIXME!!*/124 if(t < 30) 123 125 { 124 126 ka = rAbs / deltaTime*deltaTime; 125 127 } 126 /* this is the new length of the vector */ 127 //float len = ka * powf((deltaTime - t), 2); 128 129 /* calc the rotation */ 130 /* 131 Vector axis(0.0, 0.0, 1.0); 132 if(t < 30.0) 133 a0 = PI/4 - atanf(fabs(r.x) / fabs(r.y)); 134 printf("a0 = %f\n", a0); 135 float angle = a0/deltaTime * (deltaTime - t); 136 printf("angle is: %f\n", angle); 137 Quaternion q(angle, axis); 138 */ 139 //r = q.apply(r); 140 //r = r * (len/r.len()); 141 142 //res->quatSlerp(from, to, t/deltaTime, res); 128 143 129 res->quatSlerp(to, from, t/deltaTime, res); 144 130 145 131 Vector ursp(0.0, 0.0, 0.0); 146 desiredPlace.r = /*plFocus.r -*/ursp - res->apply(r);132 desiredPlace.r = ursp - res->apply(r); 147 133 148 134 printf("desired place is: %f, %f, %f\n", desiredPlace.r.x, desiredPlace.r.y, desiredPlace.r.z); 149 135 //plLastBPlace = *bound->get_placement(); 136 150 137 } 138 */ 151 139 } 152 140 break; 153 141 case SMOTH_FOLLOW: 154 142 { 143 /* 155 144 Placement *plBound = bound->getPlacement(); 156 145 Location lcBound; … … 160 149 Vector vDirection(0.0, 0.0, 1.0); 161 150 vDirection = plBound->w.apply(vDirection); 162 desiredPlace.r = (vDirection * ((lcBound.dist-10.0) /* / l*/)) + Vector(0,0,5.0);151 desiredPlace.r = (vDirection * ((lcBound.dist-10.0))) + Vector(0,0,5.0); 163 152 } 153 */ 164 154 break; 165 155 } … … 167 157 case STICKY: 168 158 { 159 /* 169 160 if(bound != null) 170 161 { … … 175 166 desiredPlace.r = plBound->r - vDirection*10 + eclipticOffset; 176 167 } 168 */ 177 169 break; 178 170 } … … 182 174 if( bound != NULL && world != NULL ) 183 175 { 184 bound->getLookat (&lookat); 185 world->calcCameraPos (&lookat, &desiredPlace); 176 //bound->getLookat (&lookat); 177 //bound->getAbsCoor () 178 //world->calcCameraPos (&lookat, &desiredPlace); 179 //FIXME: camera should be made via relative coordinates 180 Vector* cameraOffset = new Vector (-10, 0, 5); 181 this->setRelCoor (cameraOffset); 186 182 } 187 183 else 188 184 { 185 /* 189 186 desiredPlace.r = Vector (0,0,0); 190 187 desiredPlace.w = Quaternion (); 188 */ 191 189 } 192 190 break; … … 237 235 // rotation 238 236 float matrix[4][4]; 239 actualPlace.w.conjugate().matrix (matrix);237 //this->absDirection.conjugate().matrix (matrix); 240 238 /* orientation and */ 241 glMultMatrixf ((float*)matrix);239 //glMultMatrixf ((float*)matrix); 242 240 /* translation */ 243 glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z); 241 glTranslatef (this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z ); 242 //glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z); 244 243 //Placement *plBound = bound->get_placement(); 245 244 246 245 // ===== second camera control calculation option 247 /*248 gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z,249 plBound->r.x, plBound->r.y, plBound->r.z,250 251 */246 247 gluLookAt(this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z, 248 this->parent->getAbsCoor ().x, this->parent->getAbsCoor ().y, this->parent->getAbsCoor ().z, 249 0.0, 0.0, 1.0); 250 252 251 253 252 glMatrixMode (GL_MODELVIEW); -
orxonox/branches/parenting/src/camera.h
r3236 r3302 8 8 9 9 #include "stdincl.h" 10 #include "world_entity.h" 10 11 11 class WorldEntity; 12 12 13 class World; 13 14 … … 23 24 enum CAMERA_MODE {NORMAL, SMOTH_FOLLOW, STICKY, ELLIPTICAL}; 24 25 25 class Camera {26 class Camera : public WorldEntity { 26 27 private: 27 28 WorldEntity* bound; //!< the WorldEntity the Camera is bound to -
orxonox/branches/parenting/src/environment.cc
r3236 r3302 70 70 glLoadIdentity(); 71 71 float matrix[4][4]; 72 73 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 74 this->getAbsDir ().matrix (matrix); 72 75 73 glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z); 74 getPlacement()->w.matrix (matrix); 76 77 //glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z); 78 //getPlacement()->w.matrix (matrix); 75 79 glMultMatrixf ((float*)matrix); 76 80 -
orxonox/branches/parenting/src/null_parent.cc
r3276 r3302 60 60 worry, normaly... 61 61 */ 62 void NullParent::update ( longtimeStamp)62 void NullParent::update (float timeStamp) 63 63 { 64 64 this->absCoordinate = this->relCoordinate; -
orxonox/branches/parenting/src/null_parent.h
r3276 r3302 9 9 10 10 #include "stdincl.h" 11 #include " p_node.h"11 #include "world_entity.h" 12 12 13 13 14 class NullParent : public PNode{14 class NullParent : public WorldEntity { 15 15 16 16 public: … … 19 19 ~NullParent (); 20 20 21 virtual void update ( longtimeStamp);21 virtual void update (float timeStamp); 22 22 23 23 }; -
orxonox/branches/parenting/src/p_node.cc
r3277 r3302 180 180 this->bRelCoorChanged = true; 181 181 } 182 183 printf("PNode::shiftCoor() - relCoord: (%f, %f, %f)\n",184 this->relCoordinate.x,185 this->relCoordinate.y,186 this->relCoordinate.z);187 182 } 188 183 … … 342 337 worry, normaly... 343 338 */ 344 void PNode::update (long timeStamp) 345 { 346 339 void PNode::update (float timeStamp) 340 { 341 printf ("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 342 347 343 if( this->mode == MOVEMENT || this->mode == ALL) 348 344 { … … 399 395 400 396 397 /* 398 \brief tick 399 */ 400 void PNode::processTick (float dt) 401 { 402 this->tick (dt); 403 PNode* pn = this->children->enumerate(); 404 while( pn != NULL) 405 { 406 pn->processTick (dt); 407 pn = this->children->nextElement(); 408 } 409 } 410 411 412 void PNode::tick (float dt) 413 {} 414 415 401 416 void PNode::debug() 402 417 { … … 406 421 this->absCoordinate.z); 407 422 } 423 424 425 /* 426 \brief set the name of the node 427 428 for debug purposes realy usefull, not used to work properly 429 */ 430 void PNode::setName (char* newName) 431 { 432 this->objectName = newName; 433 } 434 435 436 /* 437 \brief gets the name of the node 438 */ 439 char* PNode::getName () 440 { 441 return this->objectName; 442 } -
orxonox/branches/parenting/src/p_node.h
r3277 r3302 29 29 #define DEFAULT_MODE ALL 30 30 31 class PNode {31 class PNode : public BaseObject { 32 32 33 33 public: … … 45 45 Vector getRelCoor (); 46 46 void setRelCoor (Vector* relCoord); 47 //void setRelCoor (Vector relCoord); 47 48 Vector getAbsCoor (); 48 49 void setAbsCoor (Vector* absCoord); 50 //void setAbsCoor (Vector absCoord); 49 51 void shiftCoor (Vector* shift); 52 //void shiftCoor (Vector shift); 50 53 51 54 Quaternion getRelDir (); … … 62 65 void parentDirChanged (); 63 66 void setMode (parentingMode mode); 64 virtual void update (long timeStamp); 67 68 virtual void update (float timeStamp); 69 void processTick (float dt); 70 virtual void tick (float dt); 71 72 void setName (char* newName); 73 char* getName (); 74 65 75 66 76 void debug (); 67 77 68 long timeStamp; //! this the timeStamp of when the abs{Coordinat, Direction} has been calculated 78 float timeStamp; //! this the timeStamp of when the abs{Coordinat, Direction} has been calculated 79 char* objectName; 69 80 bool bAbsCoorChanged; 70 81 bool bRelCoorChanged; -
orxonox/branches/parenting/src/player.cc
r3233 r3302 54 54 } 55 55 56 Player::~Player ()56 Player::~Player () 57 57 { 58 58 delete this->obj; 59 59 } 60 60 61 void Player::postSpawn ()61 void Player::postSpawn () 62 62 { 63 63 travelSpeed = 15.0; … … 69 69 } 70 70 71 void Player::tick (float time)71 void Player::tick (float time) 72 72 { 73 73 // movement 74 move (time);74 this->move (time); 75 75 } 76 76 77 void Player::hit (WorldEntity* weapon, Vector loc)77 void Player::hit (WorldEntity* weapon, Vector loc) 78 78 { 79 79 } 80 80 81 void Player::destroy ()81 void Player::destroy () 82 82 { 83 83 } 84 84 85 void Player::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)85 void Player::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) 86 86 { 87 87 } 88 88 89 void Player::command (Command* cmd)89 void Player::command (Command* cmd) 90 90 { 91 91 //printf("Player|recieved command [%s]\n", cmd->cmd); … … 97 97 } 98 98 99 void Player::draw ()99 void Player::draw () 100 100 { 101 101 glMatrixMode(GL_MODELVIEW); … … 103 103 float matrix[4][4]; 104 104 105 glTranslatef(getPlacement()->r.x, getPlacement()->r.y, getPlacement()->r.z); 106 getPlacement()->w.matrix (matrix); 105 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 106 //PN glTranslatef(getPlacement()->r.x, getPlacement()->r.y, getPlacement()->r.z); 107 //getPlacement()->w.matrix (matrix); 108 this->getAbsDir ().matrix (matrix); 107 109 glMultMatrixf((float*)matrix); 108 110 109 111 glMatrixMode(GL_MODELVIEW); 110 glRotatef(-90, 0,1,0);112 //glRotatef(-90, 0,1,0); 111 113 obj->draw(); 112 114 // glCallList(objectList); 113 114 115 116 115 } 117 116 117 118 /*PN 118 119 void Player::getLookat(Location* locbuf) 119 120 { … … 121 122 //locbuf->dist += 5.0; 122 123 } 124 */ 123 125 124 void Player::leftWorld ()126 void Player::leftWorld () 125 127 { 126 128 } 127 129 128 void Player::move (float time)130 void Player::move (float time) 129 131 { 130 132 Vector accel(0.0, 0.0, 0.0); 131 133 /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */ 132 Placement *pos = getPlacement(); 134 //Placement *pos = getPlacement(); 135 133 136 /* calculate the direction in which the craft is heading */ 134 Vector direction (0.0, 0.0, 1.0);135 direction = pos->w.apply(direction);136 Vector orthDirection (0.0, 0.0, 1.0);137 orthDirection = orthDirection.cross(direction);137 Vector direction (1.0, 0.0, 0.0); 138 //direction = this->absDirection.apply (direction); 139 Vector orthDirection (0.0, 0.0, 1.0); 140 //orthDirection = orthDirection.cross (direction); 138 141 139 142 if( bUp) { accel = accel+(direction*acceleration); } … … 144 147 if( bDescend) {/* FIXME */} /* \todo up and down player movement */ 145 148 146 Location* l = getLocation();149 //Location* l = getLocation(); 147 150 148 151 // r(t) = r(0) + v(0)*t + 1/2*a*t^2 … … 152 155 153 156 /* this the base-speed of the player: determines how fast and how the player follows the track*/ 154 l->dist = l->dist + travelSpeed * time; 155 157 //l->dist = l->dist + travelSpeed * time; 158 159 Vector* shift = new Vector (this->travelSpeed * time, 0, 0); 160 this->shiftCoor (shift); 161 156 162 /* this updates the player position on the track - user interaction */ 157 l->pos = l->pos + accel*time; 163 //l->pos = l->pos + accel*time; 164 Vector move = accel * time; 165 this->shiftCoor (&move); 158 166 } -
orxonox/branches/parenting/src/player.h
r3236 r3302 27 27 28 28 virtual void draw(); 29 virtual void getLookat(Location* locbuf);29 // virtual void getLookat(Location* locbuf); 30 30 31 31 virtual void leftWorld(); -
orxonox/branches/parenting/src/proto_class.cc
r3245 r3302 28 28 \todo this constructor is not jet implemented - do it 29 29 */ 30 ProtoClass::ProtoClass () {} 30 ProtoClass::ProtoClass () 31 { 32 this->setClassName ("ProtoClass"); 33 } 31 34 32 35 -
orxonox/branches/parenting/src/proto_class.h
r3246 r3302 12 12 /*class Test;*/ /* forward definition of class Test (without including it here!)*/ 13 13 14 class ProtoClass {14 class ProtoClass : public BaseObject { 15 15 16 16 public: -
orxonox/branches/parenting/src/stdincl.h
r3249 r3302 39 39 #include "orxonox.h" 40 40 #include "data_tank.h" 41 #include "base_object.h" 41 42 42 43 #endif /* _STDINCL_H */ -
orxonox/branches/parenting/src/story_entity.h
r3224 r3302 12 12 13 13 //! A class that represents something to play in orxonox. it is a container for worlds, movies, mission briefings, etc... 14 class StoryEntity {14 class StoryEntity : public BaseObject { 15 15 16 16 public: -
orxonox/branches/parenting/src/track.cc
r3232 r3302 29 29 this->end = NULL; 30 30 this->nextID = 0; 31 this->setClassName ("Track"); 31 32 } 32 33 … … 44 45 this->end = finish; 45 46 this->nextID = next; 47 this->setClassName ("Track"); 46 48 } 47 49 -
orxonox/branches/parenting/src/track.h
r3232 r3302 14 14 To create special levels with special camera movement, rules or whatever, derive from this base class. 15 15 */ 16 class Track 16 class Track : public BaseObject 17 17 { 18 18 private: -
orxonox/branches/parenting/src/world.cc
r3277 r3302 36 36 World::World (char* name) 37 37 { 38 this->setClassName ("World"); 38 39 this->worldName = name; 39 40 this->debugWorldNr = -1; … … 132 133 { 133 134 this->nullParent = new NullParent (); 135 this->nullParent->setName ("NullParent"); 134 136 135 137 // create some path nodes … … 153 155 // create a player 154 156 WorldEntity* myPlayer = new Player(); 157 myPlayer->setName ("player"); 155 158 this->spawn(myPlayer); 156 159 this->localPlayer = myPlayer; … … 162 165 // bind camera 163 166 this->localCamera = new Camera(this); 164 this->getCamera()->bind (myPlayer); 167 this->localCamera->setName ("camera"); 168 this->getCamera()->bind (myPlayer); 169 this->localPlayer->addChild (this->localCamera); 165 170 166 171 /* … … 449 454 WorldEntity* entity; 450 455 456 ((WorldEntity*)this->nullParent)->processDraw (); 457 458 /* 451 459 entity = this->entities->enumerate(); 452 460 while( entity != NULL ) … … 455 463 entity = this->entities->nextElement(); 456 464 } 457 465 */ 458 466 459 467 // draw debug coord system … … 473 481 void World::update () 474 482 { 483 /* 475 484 //List<WorldEntity> *l; 476 485 WorldEntity* entity; … … 491 500 t = loc->part; 492 501 493 /* check if entity has still a legal track-id */494 502 if( t >= tracklen ) 495 503 { … … 514 522 else 515 523 { 516 /* \todo: implement check whether this particular free entity517 is out of the game area518 \todo: call function to notify the entity that it left519 the game area520 */521 524 } 522 525 523 526 entity = entities->nextElement(); 524 527 } 525 528 */ 526 529 } 527 530 … … 536 539 float seconds = deltaT / 1000.0; 537 540 541 this->nullParent->update (seconds); 542 this->nullParent->processTick (seconds); 543 538 544 entity = entities->enumerate(); 539 545 while( entity != NULL) … … 656 662 void World::mainLoop() 657 663 { 658 this->lastFrame = SDL_GetTicks ();664 this->lastFrame = SDL_GetTicks (); 659 665 printf("World::mainLoop() - Entering main loop\n"); 660 666 while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */ 661 667 { 662 668 // Network 663 synchronize();669 this->synchronize (); 664 670 // Process input 665 handleInput();671 this->handleInput (); 666 672 if( this->bQuitCurrentGame || this->bQuitOrxonox) 667 673 { … … 670 676 } 671 677 // Process time 672 t imeSlice();678 this->timeSlice (); 673 679 // Process collision 674 collision();680 this->collision (); 675 681 // Draw 676 display();677 678 for( int i = 0; i < 10000000; i++) {}682 this->display (); 683 684 for( int i = 0; i < 10000000; i++) {} 679 685 } 680 686 printf("World::mainLoop() - Exiting the main loop\n"); … … 792 798 this->nullParent->addChild (entity); 793 799 800 /* 794 801 entities->add (entity); 795 802 zeroloc.dist = 0; … … 803 810 this->track[loc->part].mapCoords( loc, entity->getPlacement()); 804 811 } 812 */ 805 813 entity->postSpawn (); 806 814 } … … 817 825 this->nullParent->addChild (entity); 818 826 819 Location zeroLoc;827 //Location zeroLoc; 820 828 WorldEntity* owner; 821 829 this->entities->add (entity); 830 /* 822 831 if( loc == NULL) 823 832 { … … 828 837 loc = &zeroLoc; 829 838 } 830 entity->init (loc, owner); 839 */ 840 //entity->init (loc, owner); 841 /* 831 842 if (entity->bFree) 832 843 { 833 844 this->track[loc->part].mapCoords( loc, entity->getPlacement()); 834 845 } 846 */ 835 847 entity->postSpawn (); 836 848 //return entity; … … 848 860 this->nullParent->addChild (entity); 849 861 862 /* 850 863 Placement zeroPlc; 851 864 WorldEntity* owner; … … 856 869 plc = &zeroPlc; 857 870 } 871 */ 858 872 this->entities->add (entity); 859 entity->init (plc, owner);873 //entity->init (plc, owner); 860 874 entity->postSpawn (); 861 875 //return entity; -
orxonox/branches/parenting/src/world_entity.cc
r3245 r3302 36 36 WorldEntity::WorldEntity (bool isFree) : bFree(isFree) 37 37 { 38 this->setClassName ("WorldEntity"); 38 39 this->bDraw = true; 39 40 collisioncluster = NULL; … … 53 54 \return a pointer to location 54 55 */ 56 /*PN 55 57 Location* WorldEntity::getLocation () 56 58 { 57 59 return &loc; 58 60 } 61 */ 59 62 60 63 /** … … 62 65 \return a pointer to placement 63 66 */ 67 /*PN 64 68 Placement* WorldEntity::getPlacement () 65 69 { 66 70 return &place; 67 71 } 68 72 */ 69 73 /** 70 74 \brief query whether the WorldEntity in question is free … … 89 93 } 90 94 95 91 96 /** 92 97 \brief this method is called every frame … … 99 104 } 100 105 106 107 /** 108 \brief process draw function 109 */ 110 void WorldEntity::processDraw () 111 { 112 this->draw (); 113 PNode* pn = this->children->enumerate (); 114 while( pn != NULL) 115 { 116 ((WorldEntity*)pn)->processDraw (); 117 pn = this->children->nextElement(); 118 } 119 } 120 121 122 void WorldEntity::setDrawable (bool bDraw) 123 { 124 this->bDraw = bDraw; 125 } 126 127 101 128 /** 102 129 \brief the entity is drawn onto the screen with this function … … 105 132 */ 106 133 void WorldEntity::draw() 107 { 108 } 134 {} 109 135 110 136 /** … … 140 166 void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner) 141 167 { 142 loc = *spawnloc;143 owner = spawnowner;168 // loc = *spawnloc; 169 //owner = spawnowner; 144 170 } 145 171 … … 149 175 void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner) 150 176 { 151 place = *spawnplc;152 owner = spawnowner;177 //place = *spawnplc; 178 //owner = spawnowner; 153 179 } 154 180 … … 181 207 to look at the location you return with this. 182 208 */ 209 /*PN 183 210 void WorldEntity::getLookat (Location* locbuf) 184 211 { 185 212 } 213 */ 186 214 187 215 /** -
orxonox/branches/parenting/src/world_entity.h
r3277 r3302 22 22 23 23 //PNode* pNode; 24 Location* getLocation ();25 Placement* getPlacement ();24 //PN Location* getLocation (); 25 //PN Placement* getPlacement (); 26 26 void setCollision (CollisionCluster* newhull); 27 27 … … 37 37 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 38 38 virtual void command (Command* cmd); 39 39 40 void processDraw (); 40 41 virtual void draw (); 41 virtual void getLookat (Location* locbuf); 42 void setDrawable (bool bDraw); 43 //PN virtual void getLookat (Location* locbuf); 42 44 43 45 virtual void leftWorld (); … … 50 52 WorldEntity* owner; 51 53 CollisionCluster* collisioncluster; 52 Placement place;53 Location loc;54 //PN Placement place; 55 //PN Location loc; 54 56 55 57 void init( Location* spawnloc, WorldEntity* spawnowner);
Note: See TracChangeset
for help on using the changeset viewer.