Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10067 in orxonox.OLD for branches/heathaze


Ignore:
Timestamp:
Dec 13, 2006, 3:39:43 PM (18 years ago)
Author:
snellen
Message:

adapted the proto_world_entity.* to the classlistframework, start implementation of heathaze

Location:
branches/heathaze/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/heathaze/src/proto/proto_world_entity.cc

    r9406 r10067  
    1616#include "proto_world_entity.h"
    1717
    18 
     18ObjectListDefinition(ProtoWorldEntity);
    1919
    2020
     
    2525ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root)
    2626{
     27  this->registerObject(this, ProtoWorldEntity::_objectList);
    2728  this->init();
    2829  if (root != NULL)
     
    4647void ProtoWorldEntity::init()
    4748{
    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 
    5450}
    5551
  • branches/heathaze/src/proto/proto_world_entity.h

    r6512 r10067  
    1212class ProtoWorldEntity : public WorldEntity
    1313{
     14
     15 ObjectListDeclaration(ProtoWorldEntity);
    1416
    1517 public:
  • branches/heathaze/src/world_entities/Makefile.am

    r9869 r10067  
    3131                effects/explosion.cc \
    3232                effects/billboard.cc \
     33                effects/heat_haze.cc\
    3334                \
    3435                \
     
    6162                effects/explosion.h \
    6263                effects/billboard.h \
     64                effects/heat_haze.cc\
    6365                \
    6466                \
  • branches/heathaze/src/world_entities/effects/heat_haze.cc

    r9954 r10067  
    1212   main-programmer: Silvan Nellen
    1313*/
     14
     15#include "heat_haze.h"
     16
     17
     18ObjectListDefinition(HeatHaze);
     19
     20/**
     21 * constructs and loads a HeatHaze from a XML-element
     22 * @param root the XML-element to load from
     23 */
     24HeatHaze::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 */
     36HeatHaze::~HeatHaze ()
     37{
     38
     39}
     40
     41
     42/**
     43 * initializes the HeatHaze
     44 * @todo change this to what you wish
     45 */
     46void 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 */
     57void 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 */
     73void HeatHaze::tick(float time)
     74{
     75
     76}
     77
     78/**
     79 * draws this worldEntity
     80 */
     81void 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 */
     106void HeatHaze::collidesWith (WorldEntity* entity, const Vector& location)
     107{
     108
     109}
  • branches/heathaze/src/world_entities/effects/heat_haze.h

    r9954 r10067  
    33 * A class to generate a heat haze effect
    44 */
     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
     13class 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.