Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Light.h

00001 /*
00002   File: Light.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef LIGHT_H
00007 #define LIGHT_H
00008 
00009 #include<DynamicObject.h>
00010 
00011 #include<ObjectFile.h>
00012 #include<Color4.h>
00013 #include<Vertex3.h>
00014 
00017 class Light : public DynamicObject
00018 {
00019     DYNAMIC_OBJECT;
00020 public:
00021     Light(Vertex3 p = Vertex3(0.0, 0.0, 1.0));
00022 
00023     const Vertex3 &getPosition() {
00024         return position;
00025     }
00026     const Color4 getAmbient() {
00027         return ambient;
00028     }
00029     const Color4 getDiffuse() {
00030         return diffuse;
00031     }
00032     const Color4 getSpecular() {
00033         return specular;
00034     }
00035     virtual real illuminationFactor(const Vertex3 &v);
00036 
00037     // Inherited from DynamicObject
00038     void parseSymbol(Token &t, ObjectFile &file);
00039     void writeParams(ostream &stream);
00040     
00041 protected:
00042     // Inherited from DynamicObject
00043     void createSymbols();
00044 
00045     Vertex3 position;
00046     Color4 ambient;
00047     Color4 diffuse;
00048     Color4 specular;
00049     Vertex3 attenuation;
00050     Vertex3 direction;
00051     real density;
00052     real cutoff;        // cosine of cutoff angle
00053 
00054 private:
00055     typedef DynamicObject super;
00056 };
00057 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.