Changeset 10067 in orxonox.OLD for branches/heathaze
- Timestamp:
- Dec 13, 2006, 3:39:43 PM (18 years ago)
- Location:
- branches/heathaze/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/heathaze/src/proto/proto_world_entity.cc
r9406 r10067 16 16 #include "proto_world_entity.h" 17 17 18 18 ObjectListDefinition(ProtoWorldEntity); 19 19 20 20 … … 25 25 ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root) 26 26 { 27 this->registerObject(this, ProtoWorldEntity::_objectList); 27 28 this->init(); 28 29 if (root != NULL) … … 46 47 void ProtoWorldEntity::init() 47 48 { 48 this->setClassID(CL_PROTO_WORLD_ENTITY, "ProtoWorldEntity"); 49 50 /** 51 * @todo: Write CL_PROTO_WORLD_ENTITY INTO THE src/defs/class_id.h (your own definition) 52 */ 53 49 54 50 } 55 51 -
branches/heathaze/src/proto/proto_world_entity.h
r6512 r10067 12 12 class ProtoWorldEntity : public WorldEntity 13 13 { 14 15 ObjectListDeclaration(ProtoWorldEntity); 14 16 15 17 public: -
branches/heathaze/src/world_entities/Makefile.am
r9869 r10067 31 31 effects/explosion.cc \ 32 32 effects/billboard.cc \ 33 effects/heat_haze.cc\ 33 34 \ 34 35 \ … … 61 62 effects/explosion.h \ 62 63 effects/billboard.h \ 64 effects/heat_haze.cc\ 63 65 \ 64 66 \ -
branches/heathaze/src/world_entities/effects/heat_haze.cc
r9954 r10067 12 12 main-programmer: Silvan Nellen 13 13 */ 14 15 #include "heat_haze.h" 16 17 18 ObjectListDefinition(HeatHaze); 19 20 /** 21 * constructs and loads a HeatHaze from a XML-element 22 * @param root the XML-element to load from 23 */ 24 HeatHaze::HeatHaze(const TiXmlElement* root) 25 { 26 this->registerObject(this, HeatHaze::_objectList); 27 this->init(); 28 if (root != NULL) 29 this->loadParams(root); 30 } 31 32 33 /** 34 * standard deconstructor 35 */ 36 HeatHaze::~HeatHaze () 37 { 38 39 } 40 41 42 /** 43 * initializes the HeatHaze 44 * @todo change this to what you wish 45 */ 46 void HeatHaze::init() 47 { 48 49 } 50 51 52 /** 53 * loads a HeatHaze from a XML-element 54 * @param root the XML-element to load from 55 * @todo make the class Loadable 56 */ 57 void HeatHaze::loadParams(const TiXmlElement* root) 58 { 59 // all the clases this Entity is directly derived from must be called in this way, to load all settings. 60 WorldEntity::loadParam(root); 61 62 63 /** 64 * @todo: make the class Loadable 65 */ 66 } 67 68 69 /** 70 * advances the HeatHaze about time seconds 71 * @param time the Time to step 72 */ 73 void HeatHaze::tick(float time) 74 { 75 76 } 77 78 /** 79 * draws this worldEntity 80 */ 81 void HeatHaze::draw () const 82 { 83 /*glMatrixMode(GL_MODELVIEW); 84 glPushMatrix(); 85 float matrix[4][4]; 86 87 // translate 88 glTranslatef (this->getAbsCoor ().x, 89 this->getAbsCoor ().y, 90 this->getAbsCoor ().z); 91 // rotate 92 this->getAbsDir().matrix(matrix); 93 glMultMatrixf((float*)matrix); 94 95 if (model) 96 model->draw(); 97 glPopMatrix(); 98 */ 99 } 100 101 102 /** 103 * 104 * 105 */ 106 void HeatHaze::collidesWith (WorldEntity* entity, const Vector& location) 107 { 108 109 } -
branches/heathaze/src/world_entities/effects/heat_haze.h
r9954 r10067 3 3 * A class to generate a heat haze effect 4 4 */ 5 6 #ifndef _HEAT_HAZE_H 7 #define _HEAT_HAZE_H 8 9 #include "world_entity.h" 10 11 //! A Class to generate a heat haze effect 12 13 class HeatHaze : public WorldEntity 14 { 15 ObjectListDeclaration(HeatHaze); 16 public: 17 HeatHaze(const TiXmlElement* root = NULL); 18 virtual ~HeatHaze(); 19 20 virtual void loadParams(const TiXmlElement* root); 21 void init(); 22 23 virtual void postSpawn (); 24 virtual void leftWorld (); 25 26 27 virtual void draw() const; 28 virtual void tick(float time); 29 virtual void collidesWith (WorldEntity* entity, const Vector& location); 30 31 private: 32 33 }; 34 35 #endif /* _HEAT_HAZE_H */
Note: See TracChangeset
for help on using the changeset viewer.