Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/light.h @ 3436

Last change on this file since 3436 was 3436, checked in by bensch, 19 years ago

orxonox/trunk: added new Class light, that handles lights (needed for Bump-mapping).
Because Light is very important in 3D, I have created this Class

File size: 1.1 KB
Line 
1/*!
2    \file light.h
3    \brief Handles Lights.
4
5    A Light is one of the more important things in a 3D-environment,
6    without it one sees nothing :)
7    It is here for diffuse-, specular- and Bump-Mappings.
8*/
9
10#ifndef _LIGHT_H
11#define _LIGHT_H
12
13#include "world_entity.h"
14#include "glincl.h"
15
16// FORWARD DEFINITIONS //
17class Vector;
18
19//! A class that handles Lights
20/**
21   A Light is a source that emits light rays (photons)
22*/
23class Light : public WorldEntity
24{
25 
26
27 public:
28  Light(void);
29  Light(Vector position);
30  ~Light(void);
31
32  // set Attributes
33  void setPosition(Vector position);
34  void setDiffuseColor(GLfloat r, GLfloat g, GLfloat b);
35  void setSpecularColor(GLfloat r, GLfloat g, GLfloat b);
36 
37  // get Attributes
38  Vector getPosition(void);
39 private:
40  GLfloat lightPosition[4];   //!< The Position of this Light
41  GLfloat lmodelAmbient[4];   //!< The general Ambient Color
42  GLfloat diffuseColor[4];    //!< The Diffuse Color this Light emmits
43  GLfloat specularColor[4];   //!< The specular Color of this Light
44
45  void init();
46};
47
48#endif /* _LIGHT_H */
Note: See TracBrowser for help on using the repository browser.