Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6512 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Jan 17, 2006, 10:01:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL

SuperClass::loadParams(root);

isntead of:
static_cast<SuperClass*>(this)→loadParams(root);

which was quite stupid anyways

Location:
trunk/src/lib/graphics
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/light.cc

    r5982 r6512  
    8686void Light::loadParams(const TiXmlElement* root)
    8787{
    88   static_cast<PNode*>(this)->loadParams(root);
     88  PNode::loadParams(root);
    8989
    9090  LoadParam(root, "diffuse-color", this, Light, setDiffuseColor)
  • trunk/src/lib/graphics/light.h

    r5405 r6512  
    2929  virtual ~Light();
    3030
    31   void loadParams(const TiXmlElement* root);
     31  virtual void loadParams(const TiXmlElement* root);
    3232
    3333  void setDiffuseColor(GLfloat r, GLfloat g, GLfloat b);
     
    9595  inline static LightManager* getInstance() { if (!singletonRef) singletonRef = new LightManager();  return singletonRef; };
    9696
    97   void loadParams(const TiXmlElement* root);
     97  virtual void loadParams(const TiXmlElement* root);
    9898  void loadLights(const TiXmlElement* root);
    9999
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r6307 r6512  
    131131void Element2D::loadParams(const TiXmlElement* root)
    132132{
     133  BaseObject::loadParams(root);
     134
    133135  // ELEMENT2D-native settings.
    134136  LoadParam(root, "alignment", this, Element2D, setAlignment)
  • trunk/src/lib/graphics/render2D/element_2d.h

    r6299 r6512  
    9191    virtual ~Element2D();
    9292
    93     void loadParams(const TiXmlElement* root);
     93    virtual void loadParams(const TiXmlElement* root);
    9494
    9595    // ACTIVATION //
Note: See TracChangeset for help on using the changeset viewer.