3#include <unordered_map>
51 static std::unordered_map< std::string , Util::BaseFactory< Light > * >
LightFactories;
80 template<
typename ParameterType >
113 template<
typename ParameterType >
123 void _write( std::ostream &stream )
const;
124 void _read( std::istream &stream );
126 std::string
name(
void )
const {
return "scene geometry"; }
165 Image::Image32 rayTrace(
int width ,
int height ,
int rLimit ,
double cLimit ,
unsigned int lightSamples ,
bool showProgress );
Definition: GLSLProgram.h:33
friend std::istream & operator>>(std::istream &, File &)
std::string filename
Definition: scene.h:192
Definition: fileInstance.h:11
Shader * shader
Definition: scene.h:42
~GlobalSceneData(void)
Definition: scene.cpp:112
Camera camera
Definition: scene.h:36
std::vector< Light * > lights
Definition: scene.h:39
GlobalSceneData(void)
Definition: scene.cpp:110
static std::unordered_map< std::string, Util::BaseFactory< Light > * > LightFactories
Definition: scene.h:51
std::string filename
Definition: scene.h:358
KeyFrameMatrices keyFrameMatrices
Definition: scene.h:361
KeyFrameFile * keyFrameFile
Definition: scene.h:77
std::vector< Vertex > vertices
Definition: scene.h:65
std::vector< File > files
Definition: scene.h:74
LocalSceneData(void)
Definition: scene.cpp:167
void setCurrentTime(double t, int curveFit)
Definition: scene.cpp:171
std::vector< Material > materials
Definition: scene.h:68
std::vector< Texture > textures
Definition: scene.h:71
void setKeyFrameEvaluator(void)
Definition: scene.inl:7
~LocalSceneData(void)
Definition: scene.cpp:169
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: scene.todo.cpp:53
const Texture * tex
Definition: scene.h:282
double ir
Definition: scene.h:279
Util::Point3D ambient
Definition: scene.h:261
friend SceneGeometry
Definition: scene.h:250
double specularFallOff
Definition: scene.h:276
int _texIndex
Definition: scene.h:258
std::string foo
Definition: scene.h:285
friend std::ostream & operator<<(std::ostream &, const Material &)
Material(void)
Definition: scene.cpp:256
Util::Point3D diffuse
Definition: scene.h:264
friend Scene
Definition: scene.h:251
friend std::istream & operator>>(std::istream &, Material &)
Util::Point3D transparent
Definition: scene.h:273
Util::Point3D specular
Definition: scene.h:267
Util::Point3D emissive
Definition: scene.h:270
double t
Definition: scene.h:229
Util::Point3D normal
Definition: scene.h:235
RayShapeIntersectionInfo(void)
Definition: scene.cpp:79
bool operator<(const RayShapeIntersectionInfo &iInfo) const
Definition: scene.cpp:81
Util::Point3D position
Definition: scene.h:232
Util::Point2D texture
Definition: scene.h:238
void _write(std::ostream &stream) const
Definition: scene.cpp:431
LocalSceneData _localData
Definition: scene.h:103
void updateBoundingBox(void)
Definition: scene.cpp:407
void initOpenGL(void)
Definition: scene.cpp:414
void processOverlapping(const Filter &filter, const Kernel &kernel, ShapeProcessingInfo tInfo) const
Definition: scene.cpp:470
void setKeyFrameEvaluator(void)
Definition: scene.inl:16
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: scene.cpp:379
void setCurrentTime(double t, int curveFit)
Definition: scene.cpp:425
std::string name(void) const
Definition: scene.h:126
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: scene.cpp:374
ShapeList _shapeList
Definition: scene.h:106
void init(void)
Definition: scene.cpp:384
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: scene.cpp:370
bool isInside(Util::Point3D p) const
Definition: scene.cpp:372
void _read(std::istream &stream)
Definition: scene.cpp:437
static Util::Point3D Reflect(Util::Point3D v, Util::Point3D n)
Definition: scene.todo.cpp:11
void drawOpenGL(void) const
Definition: scene.cpp:505
GlobalSceneData _globalData
Definition: scene.h:146
static bool Refract(Util::Point3D v, Util::Point3D n, double ir, Util::Point3D &refract)
Definition: scene.todo.cpp:20
Image::Image32 rayTrace(int width, int height, int rLimit, double cLimit, unsigned int lightSamples, bool showProgress)
Definition: scene.cpp:520
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: scene.cpp:555
static std::string BaseDir
Definition: scene.h:150
void initOpenGL(void)
Definition: scene.cpp:477
friend std::ostream & operator<<(std::ostream &, const Scene &)
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: scene.cpp:560
Util::Point3D getColor(Util::Ray3D ray, int rDepth, Util::Point3D cLimit, unsigned int lightSamples, unsigned int tIdx)
Definition: scene.todo.cpp:29
friend std::istream & operator>>(std::istream &, Scene &)
GLSLProgram * glslProgram
Definition: scene.h:338
~Shader(void)
Definition: scene.cpp:302
std::string vertexShaderFilename
Definition: scene.h:332
std::string fragmentShaderFilename
Definition: scene.h:335
Shader(void)
Definition: scene.cpp:300
std::function< void(const ShapeProcessingInfo &, const Shape &) > Kernel
Definition: shape.h:162
std::function< bool(double) > RayIntersectionFilter
Definition: shape.h:163
std::function< ShapeProcessingInfo::ProcessingType(const ShapeProcessingInfo &, const Shape &) > Filter
Definition: shape.h:161
std::function< void(const ShapeProcessingInfo &, const class RayShapeIntersectionInfo &) > RayIntersectionKernel
Definition: shape.h:164
Definition: shapeList.h:168
friend std::istream & operator>>(std::istream &, Texture &)
void initOpenGL(void)
Definition: scene.todo.cpp:67
std::string _filename
Definition: scene.h:309
friend Scene
Definition: scene.h:303
Image::Image32 _image
Definition: scene.h:312
friend std::ostream & operator<<(std::ostream &, const Texture &)
GLuint _openGLHandle
Definition: scene.h:315
friend Material
Definition: scene.h:304
Util::Point3D position
Definition: scene.h:206
Util::Point2D texCoordinate
Definition: scene.h:212
Util::Point3D normal
Definition: scene.h:209
Definition: geometry.h:345
Definition: geometry.h:299
Shape * ReadShape(std::istream &stream, const std::unordered_map< std::string, BaseFactory< Shape > * > &shapeFactories)
Definition: scene.cpp:57
void UnreadDirective(istream &stream, const string &directive)
Definition: scene.cpp:49
string ReadDirective(istream &stream)
Definition: scene.cpp:20
std::istream & operator>>(std::istream &stream, Camera &camera)
Definition: camera.cpp:15
std::ostream & operator<<(std::ostream &stream, const Camera &camera)
Definition: camera.cpp:25