Assignments
Assignments
pointLight.h
Go to the documentation of this file.
1#ifndef POINT_LIGHT_INCLUDED
2#define POINT_LIGHT_INCLUDED
3#include "light.h"
4
5namespace Ray
6{
8 class PointLight : public Light
9 {
10 protected:
13
16
19
21 double _quadAtten;
22
23 public:
25 static std::string Directive( void ){ return "light_point"; }
26
28 // Light methods //
30 private:
31 void _write( std::ostream &stream ) const;
32 void _read( std::istream &stream );
33 public:
34 std::string name( void ) const { return "point light"; }
35 Util::Point3D getAmbient ( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
36 Util::Point3D getDiffuse ( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
37 Util::Point3D getSpecular( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
38 bool isInShadow( const class RayShapeIntersectionInfo& iInfo , const class Shape &shape , unsigned int tIdx ) const;
39 Util::Point3D transparency( const class RayShapeIntersectionInfo &iInfo , const class Shape &shape , Util::Point3D cLimit , unsigned int samples , unsigned int tIdx ) const;
40 void drawOpenGL( int index , GLSLProgram *glslProgram ) const;
41 };
42}
43#endif // POINT_LIGHT_INCLUDED
44
45
Definition: GLSLProgram.h:33
Definition: light.h:9
Definition: scene.h:249
Definition: pointLight.h:9
Util::Point3D getDiffuse(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition: pointLight.todo.cpp:22
Util::Point3D _location
Definition: pointLight.h:12
Util::Point3D getAmbient(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition: pointLight.todo.cpp:13
Util::Point3D transparency(const class RayShapeIntersectionInfo &iInfo, const class Shape &shape, Util::Point3D cLimit, unsigned int samples, unsigned int tIdx) const
Definition: pointLight.todo.cpp:49
bool isInShadow(const class RayShapeIntersectionInfo &iInfo, const class Shape &shape, unsigned int tIdx) const
Definition: pointLight.todo.cpp:40
double _quadAtten
Definition: pointLight.h:21
double _linearAtten
Definition: pointLight.h:18
Util::Point3D getSpecular(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition: pointLight.todo.cpp:31
std::string name(void) const
Definition: pointLight.h:34
double _constAtten
Definition: pointLight.h:15
void _write(std::ostream &stream) const
Definition: pointLight.cpp:21
static std::string Directive(void)
Definition: pointLight.h:25
void drawOpenGL(int index, GLSLProgram *glslProgram) const
Definition: pointLight.todo.cpp:58
void _read(std::istream &stream)
Definition: pointLight.cpp:15
Definition: scene.h:223
Definition: shape.h:89
Definition: geometry.h:299
Definition: box.h:7