Assignments
Assignments
spotLight.h
Go to the documentation of this file.
1#ifndef SPOT_LIGHT_INCLUDED
2#define SPOT_LIGHT_INCLUDED
3#include "light.h"
4
5namespace Ray
6{
13 class SpotLight : public Light
14 {
17
20
23
26
28 double _quadAtten;
29
32
35
36 public:
38 static std::string Directive( void ){ return "light_spot"; }
39
41 // Light methods //
43 private:
44 void _write( std::ostream &stream ) const;
45 void _read( std::istream &stream );
46 public:
47 std::string name( void ) const { return "spot light"; }
48 Util::Point3D getAmbient ( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
49 Util::Point3D getDiffuse ( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
50 Util::Point3D getSpecular( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
51 bool isInShadow( const class RayShapeIntersectionInfo& iInfo , const Shape &shape , unsigned int tIdx ) const;
52 Util::Point3D transparency( const class RayShapeIntersectionInfo &iInfo , const class Shape &shape , Util::Point3D cLimit , unsigned int samples , unsigned int tIdx ) const;
53 void drawOpenGL( int index , GLSLProgram * glslProgram ) const;
54 };
55}
56#endif // SPOT_LIGHT_INCLUDED
57
58
Definition: GLSLProgram.h:33
Definition: light.h:9
Definition: scene.h:249
Definition: scene.h:223
Definition: shape.h:89
Definition: spotLight.h:14
double _cutOffAngle
Definition: spotLight.h:31
double _linearAtten
Definition: spotLight.h:25
void _read(std::istream &stream)
Definition: spotLight.cpp:16
double _constAtten
Definition: spotLight.h:22
Util::Point3D getDiffuse(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition: spotLight.todo.cpp:21
double _dropOffRate
Definition: spotLight.h:34
Util::Point3D getSpecular(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition: spotLight.todo.cpp:30
Util::Point3D _location
Definition: spotLight.h:16
void _write(std::ostream &stream) const
Definition: spotLight.cpp:23
static std::string Directive(void)
Definition: spotLight.h:38
void drawOpenGL(int index, GLSLProgram *glslProgram) const
Definition: spotLight.todo.cpp:57
Util::Point3D transparency(const class RayShapeIntersectionInfo &iInfo, const class Shape &shape, Util::Point3D cLimit, unsigned int samples, unsigned int tIdx) const
Definition: spotLight.todo.cpp:48
bool isInShadow(const class RayShapeIntersectionInfo &iInfo, const Shape &shape, unsigned int tIdx) const
Definition: spotLight.todo.cpp:39
Util::Point3D _direction
Definition: spotLight.h:19
std::string name(void) const
Definition: spotLight.h:47
double _quadAtten
Definition: spotLight.h:28
Util::Point3D getAmbient(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition: spotLight.todo.cpp:12
Definition: geometry.h:299
Definition: box.h:7