Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/parenting/src/world_entity.h @ 3291

Last change on this file since 3291 was 3277, checked in by patrick, 20 years ago

orxonox/branches/parenting: worldentity is now derived from parentnode, pNode added into the world class, not yet used activly.. this will be a mess…

File size: 1.3 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;
13
14//! Basic class from which all interactive stuff in the world is derived from
15class WorldEntity : public PNode
16{       
17  friend class World;
18
19 public:
20  WorldEntity (bool isFree = false);
21  virtual ~WorldEntity ();
22 
23  //PNode* pNode;
24  Location* getLocation ();
25  Placement* getPlacement ();
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  virtual void draw ();
41  virtual void getLookat (Location* locbuf);
42 
43  virtual void leftWorld ();
44 
45 private:
46  const bool bFree;     
47  bool bCollide;
48  bool bDraw;
49 
50  WorldEntity* owner;
51  CollisionCluster* collisioncluster;
52  Placement place;
53  Location loc;
54 
55  void init( Location* spawnloc, WorldEntity* spawnowner);
56  void init( Placement* spawnplc, WorldEntity* spawnowner);
57};
58
59#endif /* _WORLD_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.