Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: redesigning directory structure - created story_entities dir, moved important classes

File size: 1.4 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 "stdincl.h"
10#include "p_node.h"
11
12class CollisionCluster;
13class OBJModel;
14
15//! Basic class from which all interactive stuff in the world is derived from
16class WorldEntity : public PNode
17{       
18  friend class World;
19
20 public:
21  WorldEntity (bool isFree = false);
22  virtual ~WorldEntity ();
23
24  OBJModel* model;                  //!< The model that should be loaded for this entity.
25 
26  void setCollision (CollisionCluster* newhull);
27 
28  bool isFree ();
29 
30  //void addAbility(Ability* ability);
31  //void removeAbility(Ability* ability);
32 
33  virtual void postSpawn ();
34  virtual void tick (float time);
35  virtual void hit (WorldEntity* weapon, Vector loc);
36  virtual void destroy ();
37  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
38  virtual void command (Command* cmd);
39
40  void processDraw ();
41  virtual void draw ();
42  void setDrawable (bool bDraw);
43 
44  virtual void leftWorld ();
45 
46 private:
47  const bool bFree;                   //!< If the entity is free.
48  bool bCollide;                      //!< If it should be considered for the collisiontest.
49  bool bDraw;                         //!< If it should be visible.
50
51  CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity.
52};
53
54#endif /* _WORLD_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.