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
5 namespace Ray
6{
8 class PointLight : public Light
9 {
10 protected:
12 Util::Point3D _location;
13
15 double _constAtten;
16
18 double _linearAtten;
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
GLSLProgram
Definition GLSLProgram.h:33
Ray::Light
Definition light.h:9
Ray::Material
Definition scene.h:249
Ray::PointLight
Definition pointLight.h:9
Ray::PointLight::getDiffuse
Util::Point3D getDiffuse(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition pointLight.todo.cpp:22
Ray::PointLight::_location
Util::Point3D _location
Definition pointLight.h:12
Ray::PointLight::getAmbient
Util::Point3D getAmbient(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition pointLight.todo.cpp:13
Ray::PointLight::transparency
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
Ray::PointLight::isInShadow
bool isInShadow(const class RayShapeIntersectionInfo &iInfo, const class Shape &shape, unsigned int tIdx) const
Definition pointLight.todo.cpp:40
Ray::PointLight::_quadAtten
double _quadAtten
Definition pointLight.h:21
Ray::PointLight::_linearAtten
double _linearAtten
Definition pointLight.h:18
Ray::PointLight::getSpecular
Util::Point3D getSpecular(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition pointLight.todo.cpp:31
Ray::PointLight::name
std::string name(void) const
Definition pointLight.h:34
Ray::PointLight::_constAtten
double _constAtten
Definition pointLight.h:15
Ray::PointLight::_write
void _write(std::ostream &stream) const
Definition pointLight.cpp:21
Ray::PointLight::Directive
static std::string Directive(void)
Definition pointLight.h:25
Ray::PointLight::drawOpenGL
void drawOpenGL(int index, GLSLProgram *glslProgram) const
Definition pointLight.todo.cpp:58
Ray::PointLight::_read
void _read(std::istream &stream)
Definition pointLight.cpp:15
Ray::RayShapeIntersectionInfo
Definition scene.h:223
Ray::Shape
Definition shape.h:90
light.h
Ray
Definition box.h:7
Util::Point3D
Point< 3 > Point3D
Definition geometry.h:526
Util::Ray3D
Ray< 3 > Ray3D
Definition geometry.h:562