Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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.h

    r2068 r2080  
    99class Ability;
    1010
    11 class WorldEntity {
     11class WorldEntity
     12{       
     13        friend class World;
    1214
    1315 public:
    14   WorldEntity ();
     16  WorldEntity (bool isFree);
    1517  ~WorldEntity ();
    1618
     19        Location* get_location ();
     20        Placement* get_placement ();
     21        void set_collision (CollisionCluster* newhull);
     22       
     23  //void addAbility(Ability* ability);
     24  //void removeAbility(Ability* ability);
    1725
    18   void setPosition(Vector* position);
    19   Vector* getPosition();
    20   void setOrientation(Vector* orientation);
    21   Vector* getOrientation();
    22   void setSpawnPoint(Vector* place);
    23   void setSpeed(float speed);
    24   float getSpeed();
    25   void setHealth(float health);
    26   float getHealth();
    27 
    28   void addAbility(Ability* ability);
    29   void removeAbility(Ability* ability);
    30 
     26        virtual void post_spawn ();
    3127  virtual void tick (float time);
    32   virtual void draw ();
    33   virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
    3428  virtual void hit (WorldEntity* weapon, Vector loc);
    3529  virtual void destroy ();
    36   virtual void command (Command* cmd);
     30  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
     31        virtual void command (Command* cmd);
     32 
     33  virtual void draw ();
    3734  virtual void get_lookat (Location* locbuf);
    3835
    39   virtual void entityPreEnter();
    40   virtual void entityPostEnter();
    41   virtual void entityPreQuit();
    42   virtual void entityPostQuit();
     36        virtual void left_world ();
    4337
     38 private:
    4439  bool bCollide;
    4540  bool bDraw;
    46 
    47  private:
     41  bool bFree;           // Whether entity movement is bound to the track
     42  
    4843        WorldEntity* owner;
    4944        CollisionCluster* collisioncluster;
    5045        Placement place;
    5146        Location loc;
    52   /* List of abilities */
    53   float health;
    54   float speed;
    55   /* entity can be in the air or at ground: */
    56   int airGround;
    5747
    58  
    59 
     48        void init( Location* spawnloc, WorldEntity* spawnowner);
     49        void init( Placement* spawnplc, WorldEntity* spawnowner);
    6050};
    6151
Note: See TracChangeset for help on using the changeset viewer.