Changeset 2080 in orxonox.OLD for orxonox/branches/chris/src/world_entity.cc
- Timestamp:
- Jul 6, 2004, 10:29:05 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/world_entity.cc
r2068 r2080 37 37 This is some sort of standard interface to all WorldEntities... 38 38 */ 39 WorldEntity::WorldEntity ( )39 WorldEntity::WorldEntity (bool isFree = false) : bFree(isFree) 40 40 { 41 health = 100;42 speed = 0;41 collisioncluster = NULL; 42 owner = NULL; 43 43 } 44 45 44 46 45 WorldEntity::~WorldEntity () {} 47 46 48 /** 49 \brief sets the position of this entity 50 \param position: Vector, pointing (from 0,0,0) to the new position 51 */ 52 void WorldEntity::setPosition(Vector* position) {} 47 Location* WorldEntity::getLocation () 48 { 49 return &loc; 50 } 53 51 54 /** 55 \brief gets the postion of this entity 56 \return a Vector, pointing (from 0,0,0) to the new position 57 */ 58 Vector* getPosition() {} 52 Placement* WorldEntity::getPlacement () 53 { 54 return &place; 55 } 59 56 60 /** 61 \brief sets orientation of this entity 62 \param orientation: vector specifying in which direction the entity looks 63 */ 64 void WorldEntity::setOrientation(Vector* orientation) {} 65 66 /** 67 \brief gets orientation of this entity 68 \return vector specifying in which direction the entity looks 69 */ 70 Vector* WorldEntity::getOrientation() {} 57 void WorldEntity::set_collision (CollisionCluster* newhull) 58 { 59 if( newhull == NULL) return; 60 if( collisioncluster != NULL) delete collisioncluster; 61 collisioncluster = newhull; 62 } 71 63 72 64 /** … … 149 141 void WorldEntity::destroy() {} 150 142 151 /** 152 \brief this function is automatically called before the entity enters the world 153 */ 154 void WorldEntity::entityPreEnter() {} 143 void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner) 144 { 145 loc = *spawnloc; 146 owner = spawnowner; 147 } 155 148 156 /** 157 \brief this function is automatically called after the entity enters the world 158 159 */ 160 void WorldEntity::entityPostEnter() {} 161 162 /** 163 \brief this function is automatically called before the entity quits the world 164 165 */ 166 void WorldEntity::entityPreQuit() {} 167 168 /** 169 \brief this function is automatically called after the entity quits the world 170 */ 171 void WorldEntity::entityPostQuit() {} 149 void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner) 150 { 151 plc = *spawnplc; 152 owner = spawnowner; 153 }
Note: See TracChangeset
for help on using the changeset viewer.