Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4261 was 4261, checked in by bensch, 19 years ago

orxonox/trunk: merged the levelLoader-branche back into the trunk, because it seems to be stable.
merged with command:
svn merge -r 4230:HEAD levelLoader ../trunk
no conflicts of any interesst

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