Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2080 in orxonox.OLD for orxonox/branches/chris/src/world_entity.cc


Ignore:
Timestamp:
Jul 6, 2004, 10:29:05 PM (21 years ago)
Author:
chris
Message:

orxonox/branches/chris: Implemented basic track and spawning functionality. Added a function to convert a Rotation into a glmatrix. Implemented operator* in Rotation. Refined World, made World friend class of world_entity. Implemented camera functionality (can now be bound to the worldentity it should focus on).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/src/world_entity.cc

    r2068 r2080  
    3737This is some sort of standard interface to all WorldEntities...
    3838*/
    39 WorldEntity::WorldEntity ()
     39WorldEntity::WorldEntity (bool isFree = false) : bFree(isFree)
    4040{
    41   health = 100;
    42   speed = 0;
     41        collisioncluster = NULL;
     42        owner = NULL;
    4343}
    44 
    4544
    4645WorldEntity::~WorldEntity () {}
    4746
    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) {}
     47Location* WorldEntity::getLocation ()
     48{
     49        return &loc;
     50}
    5351
    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() {}
     52Placement* WorldEntity::getPlacement ()
     53{
     54        return &place;
     55}
    5956
    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() {}
     57void WorldEntity::set_collision (CollisionCluster* newhull)
     58{
     59        if( newhull == NULL) return;
     60        if( collisioncluster != NULL) delete collisioncluster;
     61        collisioncluster = newhull;
     62}
    7163
    7264/**
     
    149141void WorldEntity::destroy() {}
    150142
    151 /**
    152    \brief this function is automatically called before the entity enters the world
    153 */
    154 void WorldEntity::entityPreEnter() {}
     143void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner)
     144{
     145        loc = *spawnloc;
     146        owner = spawnowner;
     147}
    155148
    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() {}
     149void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner)
     150{
     151        plc = *spawnplc;
     152        owner = spawnowner;
     153}
Note: See TracChangeset for help on using the changeset viewer.