Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3306 was 3302, checked in by patrick, 20 years ago

orxonox/branches/parenting: implemented parenting and added to framework. sill got some problems with how to pass events through the new entity list (now part of the parenting-framework). changed to a more accurate way of coordinat-ing, the openGL coord-orientation. therefore the world is realy strange because it flies into the wrong direction.

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;
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  //PN Location* getLocation ();
25  //PN 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  void processDraw ();
41  virtual void draw ();
42  void setDrawable (bool bDraw);
43  //PN virtual void getLookat (Location* locbuf);
44 
45  virtual void leftWorld ();
46 
47 private:
48  const bool bFree;     
49  bool bCollide;
50  bool bDraw;
51 
52  WorldEntity* owner;
53  CollisionCluster* collisioncluster;
54  //PN Placement place;
55  //PN Location loc;
56 
57  void init( Location* spawnloc, WorldEntity* spawnowner);
58  void init( Placement* spawnplc, WorldEntity* spawnowner);
59};
60
61#endif /* _WORLD_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.