Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2006, 10:51:08 PM (18 years ago)
Author:
bensch
Message:

orxonox/branches/new_class_id: new_class ID working, adapdet many classes, and reinvented some of the ClassID stuff

Location:
branches/new_class_id/src/world_entities/environments
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/world_entities/environments/building.cc

    r9406 r9709  
    2323
    2424
    25 
    26 CREATE_FACTORY(Building, CL_BUILDING);
     25#include "class_id.h"
     26NewObjectListDefinitionID(Building, CL_BUILDING);
     27CREATE_FACTORY(Building);
    2728
    2829/**
     
    3132Building::Building(const TiXmlElement* root)
    3233{
    33   this->setClassID(CL_BUILDING, "Building");
     34  this->registerObject(this, Building::_objectList);
    3435  this->toList(OM_ENVIRON_NOTICK);
    3536
  • branches/new_class_id/src/world_entities/environments/building.h

    r7041 r9709  
    1515class Building : public WorldEntity
    1616{
    17  public:
     17  NewObjectListDeclaration(Building);
     18  public:
    1819  Building(const TiXmlElement* root);
    1920
  • branches/new_class_id/src/world_entities/environments/mapped_water.cc

    r9406 r9709  
    2525#include "script_class.h"
    2626
    27 CREATE_FACTORY(MappedWater, CL_MAPPED_WATER);
     27#include "class_id.h"
     28NewObjectListDefinitionID(MappedWater, CL_MAPPED_WATER);
     29CREATE_FACTORY(MappedWater);
    2830
    2931SHELL_COMMAND(gui, MappedWater, toggleGui);
    3032SHELL_COMMAND(output, MappedWater, saveParams);
    3133
    32 CREATE_SCRIPTABLE_CLASS(MappedWater, CL_MAPPED_WATER,
     34CREATE_SCRIPTABLE_CLASS(MappedWater, MappedWater::classID(),
    3335                        addMethod("waterUV", ExecutorLua2<MappedWater, float, float>(&MappedWater::fadeWaterUV))
    3436                      ->addMethod("waterFlow", ExecutorLua2<MappedWater, float, float>(&MappedWater::fadeWaterFlow))
     
    4749MappedWater::MappedWater(const TiXmlElement* root)
    4850{
    49   this->setClassID(CL_MAPPED_WATER, "MappedWater");
     51  this->registerObject(this, MappedWater::_objectList);
    5052  this->toList(OM_ENVIRON);
    5153
  • branches/new_class_id/src/world_entities/environments/mapped_water.h

    r9021 r9709  
    3535class MappedWater : public WorldEntity
    3636{
     37  NewObjectListDeclaration(MappedWater);
    3738public:
    3839  MappedWater(const TiXmlElement* root = NULL);
  • branches/new_class_id/src/world_entities/environments/model_entity.cc

    r9656 r9709  
    2323
    2424
    25 
    26 CREATE_FACTORY(ModelEntity, CL_MODEL_ENTITY);
     25#include "class_id.h"
     26NewObjectListDefinitionID(ModelEntity, CL_MODEL_ENTITY);
     27CREATE_FACTORY(ModelEntity);
    2728
    2829/**
     
    3132ModelEntity::ModelEntity(const TiXmlElement* root)
    3233{
    33   this->setClassID(CL_MODEL_ENTITY, "ModelEntity");
     34  this->registerObject(this, ModelEntity::_objectList);
    3435  this->toList(OM_ENVIRON);
    3536
  • branches/new_class_id/src/world_entities/environments/model_entity.h

    r7048 r9709  
    1515class ModelEntity : public WorldEntity
    1616{
     17  NewObjectListDeclaration(ModelEntity);
    1718 public:
    1819  ModelEntity(const TiXmlElement* root);
  • branches/new_class_id/src/world_entities/environments/water.cc

    r9656 r9709  
    3333
    3434
    35 
    36 CREATE_FACTORY(Water, CL_WATER);
     35#include "class_id.h"
     36NewObjectListDefinitionID(Water, CL_WATER);
     37CREATE_FACTORY(Water);
    3738
    3839
    3940Water::Water(const TiXmlElement* root)
    4041{
    41   this->setClassID(CL_WATER, "Water");
     42  this->registerObject(this, Water::_objectList);
    4243  this->toList(OM_ENVIRON);
    4344
     
    217218void Water::tick(float dt)
    218219{
    219   ObjectManager::EntityList entityList = State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ);
     220  ObjectManager::EntityList entityList = State::getObjectManager()->getEntityList(OM_GROUP_01_PROJ);
    220221  ObjectManager::EntityList::iterator entity = entityList.begin();
    221222  while (entity != entityList.end())
  • branches/new_class_id/src/world_entities/environments/water.h

    r7954 r9709  
    2222class Water : public WorldEntity
    2323{
    24  public:
     24  NewObjectListDeclaration(Water);
     25  public:
    2526   Water(const TiXmlElement* root = NULL);
    2627   virtual ~Water();
     
    3839   void draw() const;
    3940   void tick(float dt);
    40    
     41
    4142   virtual void varChangeHandler( std::list<int> & id );
    4243
     
    5253    Material        waterMaterial;
    5354    Shader*         waterShader;
    54    
     55
    5556    float           height;          //!< The hight of the Water
    5657    int             height_handle;   //!< Handle to notify about changes of height
Note: See TracChangeset for help on using the changeset viewer.