Last change
on this file since 3326 was
3309,
checked in by patrick, 20 years ago
|
orxonox/branches/parenting: added a second worldentity just to test the lists - working but not drawing since there is no model loaded. including second object (importer) results in SEGFAULT
|
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; |
---|
13 | class Object; |
---|
14 | |
---|
15 | //! Basic class from which all interactive stuff in the world is derived from |
---|
16 | class WorldEntity : public PNode |
---|
17 | { |
---|
18 | friend class World; |
---|
19 | |
---|
20 | public: |
---|
21 | WorldEntity (bool isFree = false); |
---|
22 | virtual ~WorldEntity (); |
---|
23 | |
---|
24 | Object* model; |
---|
25 | |
---|
26 | //PNode* pNode; |
---|
27 | //PN Location* getLocation (); |
---|
28 | //PN Placement* getPlacement (); |
---|
29 | void setCollision (CollisionCluster* newhull); |
---|
30 | |
---|
31 | bool isFree (); |
---|
32 | |
---|
33 | //void addAbility(Ability* ability); |
---|
34 | //void removeAbility(Ability* ability); |
---|
35 | |
---|
36 | virtual void postSpawn (); |
---|
37 | virtual void tick (float time); |
---|
38 | virtual void hit (WorldEntity* weapon, Vector loc); |
---|
39 | virtual void destroy (); |
---|
40 | virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); |
---|
41 | virtual void command (Command* cmd); |
---|
42 | |
---|
43 | void processDraw (); |
---|
44 | virtual void draw (); |
---|
45 | void setDrawable (bool bDraw); |
---|
46 | //PN virtual void getLookat (Location* locbuf); |
---|
47 | |
---|
48 | virtual void leftWorld (); |
---|
49 | |
---|
50 | private: |
---|
51 | const bool bFree; |
---|
52 | bool bCollide; |
---|
53 | bool bDraw; |
---|
54 | |
---|
55 | //PN WorldEntity* owner; |
---|
56 | CollisionCluster* collisioncluster; |
---|
57 | //PN Placement place; |
---|
58 | //PN Location loc; |
---|
59 | |
---|
60 | void init( Location* spawnloc, WorldEntity* spawnowner); |
---|
61 | void init( Placement* spawnplc, WorldEntity* spawnowner); |
---|
62 | }; |
---|
63 | |
---|
64 | #endif /* _WORLD_ENTITY_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.