Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: all WorldEntities/PWodes now destroy all date they alocate.

this is done with a virtual destructor:
if PNode is deleted it calls for the delete of the virtual destructor, and deletes the data of it.

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
12//class 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  void destroy ();
24
25
26  OBJModel* model;                  //!< The model that should be loaded for this entity.
27 
28  //void setCollision (CollisionCluster* newhull);
29 
30  bool isFree ();
31 
32  //void addAbility(Ability* ability);
33  //void removeAbility(Ability* ability);
34 
35  virtual void postSpawn ();
36  virtual void tick (float time);
37  virtual void hit (WorldEntity* weapon, Vector loc);
38  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
39  virtual void command (Command* cmd);
40
41  void processDraw ();
42  virtual void draw ();
43  void setDrawable (bool bDraw);
44 
45  virtual void leftWorld ();
46 
47 private:
48  const bool bFree;                   //!< If the entity is free.
49  bool bCollide;                      //!< If it should be considered for the collisiontest.
50  bool bDraw;                         //!< If it should be visible.
51
52  //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity.
53};
54
55#endif /* _WORLD_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.