Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3444 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Mar 2, 2005, 8:53:56 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: Light faster getPosition algorythm

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/light.cc

    r3443 r3444  
    309309    }
    310310  else
    311     return Vector(this->currentLight->lightPosition[0], this->currentLight->lightPosition[1], this->currentLight->lightPosition[2]);
    312 }
     311    return getPosition(currentLight->lightNumber);
     312}
     313
     314
    313315
    314316
  • orxonox/trunk/src/light.h

    r3442 r3444  
    6969  // get Attributes
    7070  Vector getPosition(void);
     71  //! \returns the Position of Light \param lightNumber lightnumber
     72  inline Vector getPosition(int lightNumber)
     73    {
     74      if (!this->lights[lightNumber])
     75        return Vector(.0,.0,.0);
     76      return Vector(this->lights[lightNumber]->lightPosition[0],
     77                    this->lights[lightNumber]->lightPosition[1],
     78                    this->lights[lightNumber]->lightPosition[2]);
     79    }
    7180
    7281  void debug(void);
  • orxonox/trunk/src/world.cc

    r3443 r3444  
    178178  light->setPosition(20.0, 10.0, 20.0);
    179179  light->setDiffuseColor(1,1,1);
    180   light->addLight(1);
    181   light->setPosition(20, 10, -20);
    182   light->setDiffuseColor(0,0,0);
     180  //  light->addLight(1);
     181  //  light->setPosition(20, 10, -20);
     182  //  light->setDiffuseColor(0,0,0);
    183183  light->debug();
    184184
Note: See TracChangeset for help on using the changeset viewer.