Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3446 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Mar 2, 2005, 11:12:55 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: light Comments/cleanup→ next step perfection :)

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

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

    r3444 r3446  
    4444/**
    4545   \brief standard deconstructor
    46    \todo this deconstructor is not jet implemented - do it
    47 
     46   
     47   first disables Lighting
     48   then deletes all the lights
     49   then deletes the rest of the allocated memory
     50   and in the end sets the singleton Reference to zero.
    4851*/
    4952Light::~Light ()
     
    8588  // set default values
    8689  this->currentLight->lightNumber = lightNumber;
    87   this->setPosition(Vector(0.0, 0.0, 0.0));
     90  this->setPosition(0.0, 0.0, 0.0);
    8891  this->setDiffuseColor(1.0, 1.0, 1.0);
    8992  this->setSpecularColor(1.0, 1.0, 1.0);
    90   //  lmodelAmbient[] = {.1, .1, .1, 1.0};
    9193}
    9294
     
    154156/**
    155157   \brief delete light.
    156    \param lightnumber the number of the light to delete
     158   \param lightNumber the number of the light to delete
    157159*/
    158160void Light::deleteLight(int lightNumber)
     
    188190}
    189191
     192/**
     193   \brief Sets a Position for the Light.
     194   \param x the x-coordinate
     195   \param y the y-coordinate
     196   \param z the z-coordinate
     197*/
    190198void Light::setPosition(GLfloat x, GLfloat y, GLfloat z)
    191199{
  • orxonox/trunk/src/light.h

    r3444 r3446  
    1414#include "glincl.h"
    1515
     16//! The maximum number of Lights this OpenGL-implementation supports
    1617#define NUMBEROFLIGHTS GL_MAX_LIGHTS
    1718
     19//! Enumerator for the attenuation-Type.
     20/**
     21   CONSTANT means GL_CONSTANT_ATTENUATION
     22   LINEAR means   GL_LINEAR_ATTENUATION
     23   QUADRATIC means GL_QUADRATIC_ATTENUATION
     24*/
    1825enum AttenuationType {CONSTANT, LINEAR, QUADRATIC};
    1926
     
    3340    int lightNumber;            //!< The number of this Light.
    3441    GLfloat lightPosition[4];   //!< The Position of this Light.
    35     GLfloat lmodelAmbient[4];   //!< The general Ambient Color.
    3642    GLfloat diffuseColor[4];    //!< The Diffuse Color this Light emmits.
    3743    GLfloat specularColor[4];   //!< The specular Color of this Light.
     
    4753
    4854  void init(int LightNumber); 
    49   LightValue** lights;
    50   LightValue* currentLight;
     55  LightValue** lights;           //!< An array of Lenght NUMBEROFLIGHTS, that holds pointers to all LightValues.
     56  LightValue* currentLight;      //!< The current Light, we are working with.
    5157 
    5258 public:
     
    6975  // get Attributes
    7076  Vector getPosition(void);
    71   //! \returns the Position of Light \param lightNumber lightnumber
     77  /**
     78     \returns the Position of Light
     79     \param lightNumber lightnumber
     80  */
    7281  inline Vector getPosition(int lightNumber)
    7382    {
Note: See TracChangeset for help on using the changeset viewer.