Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/world_entity.h @ 3881

Last change on this file since 3881 was 3799, checked in by patrick, 19 years ago

orxonox/trunk: using G_LIKELY() as Atilla suggested, seems only to work on linux, so its in ifdef

File size: 1.6 KB
RevLine 
[2077]1/*!
2    \file world_entity.h
[2190]3    \brief Definition of the basic WorldEntity
4*/
[2036]5
[3224]6#ifndef _WORLD_ENTITY_H
7#define _WORLD_ENTITY_H
[2036]8
[3365]9#include "p_node.h"
[3608]10#include "comincl.h"
[3658]11#include "resource_manager.h"
[2036]12
[3658]13
[3474]14//class CollisionCluster;
[3583]15class CharacterAttributes;
[3655]16class Model;
[2036]17
[3583]18
[2190]19//! Basic class from which all interactive stuff in the world is derived from
[3365]20class WorldEntity : public PNode
[2190]21{       
[2551]22  friend class World;
[3365]23
[2036]24 public:
[2190]25  WorldEntity (bool isFree = false);
[3221]26  virtual ~WorldEntity ();
[3365]27
[3531]28
[3474]29  //void setCollision (CollisionCluster* newhull);
[2551]30 
[2190]31  //void addAbility(Ability* ability);
32  //void removeAbility(Ability* ability);
[3583]33  void setDrawable (bool bDraw); 
34  bool isFree ();
35  void setCharacterAttributes(CharacterAttributes* charAttr);
36  CharacterAttributes* getCharacterAttributes();
37
[3229]38  virtual void postSpawn ();
[3583]39  virtual void leftWorld ();
40
[3578]41  virtual void hit (WorldEntity* weapon, Vector* loc);
[2190]42  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
[2551]43  virtual void command (Command* cmd);
[3365]44
45  void processDraw ();
[2190]46  virtual void draw ();
[3583]47  virtual void tick (float time);
[2551]48 
[3583]49 protected:
[3655]50  Model* model;                  //!< The model that should be loaded for this entity.
[3583]51  CharacterAttributes* charAttr;      //!< the character attributes of a world_entity
[2551]52 
[2036]53 private:
[3449]54  const bool bFree;                   //!< If the entity is free.
55  bool bCollide;                      //!< If it should be considered for the collisiontest.
56  bool bDraw;                         //!< If it should be visible.
[3365]57
[3583]58
59
[3474]60  //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity.
[2036]61};
62
[3224]63#endif /* _WORLD_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.