Assignments
Assignments
|
#include <scene.h>
Public Member Functions | |
Util::Point3D | getColor (Util::Ray3D ray, int rDepth, Util::Point3D cLimit, unsigned int lightSamples, unsigned int tIdx) |
Image::Image32 | rayTrace (int width, int height, int rLimit, double cLimit, unsigned int lightSamples, bool showProgress) |
void | initOpenGL (void) |
void | drawOpenGL (void) const |
bool | processFirstIntersection (const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const |
int | processAllIntersections (const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const |
![]() | |
void | init (void) |
template<typename ParameterType > | |
void | setKeyFrameEvaluator (void) |
void | setCurrentTime (double t, int curveFit) |
std::string | name (void) const |
void | init (const LocalSceneData &sceneData) |
void | initOpenGL (void) |
void | updateBoundingBox (void) |
bool | processFirstIntersection (const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const |
int | processAllIntersections (const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const |
void | processOverlapping (const Filter &filter, const Kernel &kernel, ShapeProcessingInfo tInfo) const |
bool | isInside (Util::Point3D p) const |
void | drawOpenGL (GLSLProgram *glslProgram) const |
![]() | |
virtual | ~Shape (void) |
ShapeBoundingBox | boundingBox (void) const |
virtual void | init (const class LocalSceneData &data)=0 |
virtual void | addTrianglesOpenGL (std::vector< class TriangleIndex > &triangles) |
size_t | primitiveNum (void) const |
Static Public Member Functions | |
static Util::Point3D | Reflect (Util::Point3D v, Util::Point3D n) |
static bool | Refract (Util::Point3D v, Util::Point3D n, double ir, Util::Point3D &refract) |
![]() | |
static void | WriteInset (std::ostream &stream) |
Static Public Attributes | |
static std::string | BaseDir = "." + std::string( 1 , Util::FileSeparator ) |
![]() | |
static unsigned int | OpenGLTessellationComplexity |
static unsigned int | WriteInsetSize = 0 |
Private Attributes | |
GlobalSceneData | _globalData |
Additional Inherited Members | |
![]() | |
typedef std::function< ShapeProcessingInfo::ProcessingType(const ShapeProcessingInfo &, const Shape &) > | Filter |
typedef std::function< void(const ShapeProcessingInfo &, const Shape &) > | Kernel |
typedef std::function< bool(double) > | RayIntersectionFilter |
typedef std::function< bool(const ShapeProcessingInfo &, const class RayShapeIntersectionInfo &) > | RayIntersectionKernel |
![]() | |
ShapeBoundingBox | _bBox |
size_t | _primitiveNum |
This class stores all of the information read out from a .ray file.
void Scene::drawOpenGL | ( | void | ) | const |
This method calls the necessary OpenGL commands to render the primitive.
Point3D Scene::getColor | ( | Util::Ray3D | ray, |
int | rDepth, | ||
Util::Point3D | cLimit, | ||
unsigned int | lightSamples, | ||
unsigned int | tIdx ) |
This is the function responsible for the recursive ray-tracing returning the color obtained by shooting a ray into the scene and recursing until either the recursion depth has been reached or the contribution from subsequent bounces is guaranteed to be less than the cut-off.
|
virtual |
This method should be called (once) after an OpenGL context has been created
Implements Ray::Shape.
|
virtual |
This method processes all shapes which intersect the ray within the prescribed range and passing the rFilter test, invoking the rKernel kernel with the intersection information. The processing terminates early if the kernel returns false. The function returns the number of valid intersections.
Implements Ray::Shape.
|
virtual |
This method ray-traces the primitive
Implements Ray::Shape.
Image32 Scene::rayTrace | ( | int | width, |
int | height, | ||
int | rLimit, | ||
double | cLimit, | ||
unsigned int | lightSamples, | ||
bool | showProgress ) |
This method ray-traces the scene and returns the computed image
|
static |
This function reflects the vector v about the normal n.
|
static |
This function will refract the vector about the normal using the provided indices of refraction. The refracted vector is written into refract and a value of true is returned if the refraction succeeded (i.e. the necessary arcsin could be computed).
|
private |
The global data
|
static |
The base directory