Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3327 was 3309, checked in by patrick, 19 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
RevLine 
[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"
[3277]10#include "p_node.h"
[2036]11
[2190]12class CollisionCluster;
[3309]13class Object;
[2036]14
[2190]15//! Basic class from which all interactive stuff in the world is derived from
[3277]16class WorldEntity : public PNode
[2190]17{       
[2551]18  friend class World;
[3277]19
[2036]20 public:
[2190]21  WorldEntity (bool isFree = false);
[3221]22  virtual ~WorldEntity ();
[3309]23
24  Object* model;
[2551]25 
[3277]26  //PNode* pNode;
[3302]27  //PN Location* getLocation ();
28  //PN Placement* getPlacement ();
[3229]29  void setCollision (CollisionCluster* newhull);
[2551]30 
31  bool isFree ();
32 
[2190]33  //void addAbility(Ability* ability);
34  //void removeAbility(Ability* ability);
[2551]35 
[3229]36  virtual void postSpawn ();
[2190]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);
[2551]41  virtual void command (Command* cmd);
[3302]42
43  void processDraw ();
[2190]44  virtual void draw ();
[3302]45  void setDrawable (bool bDraw);
46  //PN virtual void getLookat (Location* locbuf);
[2551]47 
[3229]48  virtual void leftWorld ();
[2551]49 
[2036]50 private:
[2190]51  const bool bFree;     
52  bool bCollide;
53  bool bDraw;
[3309]54
55  //PN WorldEntity* owner;
[2551]56  CollisionCluster* collisioncluster;
[3302]57  //PN Placement place;
58  //PN Location loc;
[2551]59 
60  void init( Location* spawnloc, WorldEntity* spawnowner);
61  void init( Placement* spawnplc, WorldEntity* spawnowner);
[2036]62};
63
[3224]64#endif /* _WORLD_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.