Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4318 in orxonox.OLD for orxonox/trunk/src/lib


Ignore:
Timestamp:
May 27, 2005, 12:53:34 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: now changed the orxonox baseobject to object id representation. this is much faster, but needs some care, when defining new classes

Location:
orxonox/trunk/src/lib
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/helper_parent.cc

    r3544 r4318  
    3030HelperParent::HelperParent ()
    3131{
    32    this->setClassName ("HelperParent");
     32   this->setClassID(CL_HELPER_PARENT);
    3333}
    3434
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r4245 r4318  
    3434  this->minFPS = 9999;
    3535  this->maxFPS = 0;
    36   this->setClassName ("GraphicsEngine");
     36  this->setClassID(CL_GRAPHICS_ENGINE);
    3737
    3838  this->fullscreen = false;
  • orxonox/trunk/src/lib/graphics/light.cc

    r3809 r4318  
    3434Light::Light(int lightNumber)
    3535{
    36   this->setClassName("Light");
     36  this->setClassID(CL_LIGHT);
    3737  char tmpName[7];
    3838  sprintf(tmpName, "Light%d", lightNumber);
     
    205205LightManager::LightManager ()
    206206{
    207   this->setClassName ("LightManager");
     207  this->setClassID(CL_LIGHT_MANAGER);
    208208
    209209  glEnable (GL_LIGHTING);
  • orxonox/trunk/src/lib/graphics/particles/particle_emitter.cc

    r4176 r4318  
    3030                  float velocity)
    3131{
    32    this->setClassName ("ParticleEmitter");
     32   this->setClassID(CL_PARTICLE_EMITTER);
    3333   this->direction = direction;
    3434   this->setSpread(angle);
  • orxonox/trunk/src/lib/graphics/particles/particle_engine.cc

    r4176 r4318  
    3030ParticleEngine::ParticleEngine ()
    3131{
    32    this->setClassName ("ParticleEngine");
     32   this->setClassID(CL_PARTICLE_ENGINE);
    3333
    3434   this->systemList = new tList<ParticleSystem>;
  • orxonox/trunk/src/lib/graphics/particles/particle_system.cc

    r4176 r4318  
    3434ParticleSystem::ParticleSystem (unsigned int maxCount, PARTICLE_TYPE type)
    3535{
    36    this->setClassName ("ParticleSystem");
     36   this->setClassID(CL_PARTICLE_SYSTEM);
    3737   this->material = NULL;
    3838   this->name = NULL;
  • orxonox/trunk/src/lib/graphics/text_engine.cc

    r3911 r4318  
    5151Text::Text(Font* font, int type)
    5252{
    53   this->setClassName("Text");
     53  this->setClassID(CL_TEXT);
    5454
    5555  // initialize this Text
     
    802802TextEngine::TextEngine ()
    803803{
    804    this->setClassName ("TextEngine");
     804   this->setClassID(CL_TEXT_ENGINE);
    805805   this->enableFonts();
    806806
  • orxonox/trunk/src/lib/lang/base_object.cc

    r4261 r4318  
    4242}
    4343
    44 void BaseObject::setClassName (const char* className)
     44
     45void BaseObject::setClassID (int id)
    4546{
    46   this->className = className;
     47  this->id = id;
    4748}
     49
     50
    4851
    4952bool BaseObject::isA (char* className)
  • orxonox/trunk/src/lib/lang/base_object.h

    r4261 r4318  
    99
    1010#include "stdincl.h"
    11 
     11#include "class_list.h"
    1212
    1313class BaseObject {
     
    1717  virtual ~BaseObject ();
    1818
    19   void setClassName (const char* className);
    20   inline const char* getClassName(void) const { return this->className;};
     19  //void setClassName (const char* className);
     20  void setClassID(int id);
     21
     22  inline const char* getClassName(void) const { return "";};
     23  inline int getClassID(void) const { return this->id; }
    2124  bool isA (char* className);
    2225
     
    2629 private:
    2730  const char* className;
     31  int id;
    2832  bool finalized;
    2933};
Note: See TracChangeset for help on using the changeset viewer.