source:
orxonox.OLD/orxonox/trunk/src/world_entity.h
@
3451
| Last change on this file since 3451 was 3449, checked in by bensch, 21 years ago | |
|---|---|
| File size: 1.4 KB | |
| Rev | Line | |
|---|---|---|
| [2077] | 1 | /*! |
| 2 | \file world_entity.h | |
| [2190] | 3 | \brief Definition of the basic WorldEntity |
| 4 | */ | |
| [2036] | 5 | |
| [3224] | 6 | #ifndef _WORLD_ENTITY_H |
| 7 | #define _WORLD_ENTITY_H | |
| [2036] | 8 | |
| [2190] | 9 | #include "stdincl.h" |
| [3365] | 10 | #include "p_node.h" |
| [2036] | 11 | |
| [2190] | 12 | class CollisionCluster; |
| [3396] | 13 | class OBJModel; |
| [2036] | 14 | |
| [2190] | 15 | //! Basic class from which all interactive stuff in the world is derived from |
| [3365] | 16 | class WorldEntity : public PNode |
| [2190] | 17 | { |
| [2551] | 18 | friend class World; |
| [3365] | 19 | |
| [2036] | 20 | public: |
| [2190] | 21 | WorldEntity (bool isFree = false); |
| [3221] | 22 | virtual ~WorldEntity (); |
| [3365] | 23 | |
| [3449] | 24 | OBJModel* model; //!< The model that should be loaded for this entity. |
| [2551] | 25 | |
| [3229] | 26 | void setCollision (CollisionCluster* newhull); |
| [2551] | 27 | |
| 28 | bool isFree (); | |
| 29 | ||
| [2190] | 30 | //void addAbility(Ability* ability); |
| 31 | //void removeAbility(Ability* ability); | |
| [2551] | 32 | |
| [3229] | 33 | virtual void postSpawn (); |
| [2190] | 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); | |
| [2551] | 38 | virtual void command (Command* cmd); |
| [3365] | 39 | |
| 40 | void processDraw (); | |
| [2190] | 41 | virtual void draw (); |
| [3365] | 42 | void setDrawable (bool bDraw); |
| [2551] | 43 | |
| [3229] | 44 | virtual void leftWorld (); |
| [2551] | 45 | |
| [2036] | 46 | private: |
| [3449] | 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. | |
| [3365] | 50 | |
| [3449] | 51 | CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity. |
| [2036] | 52 | }; |
| 53 | ||
| [3224] | 54 | #endif /* _WORLD_ENTITY_H */ |
Note: See TracBrowser
for help on using the repository browser.










