Assignments Assignments

box.h
Go to the documentation of this file.
1#ifndef BOX_INCLUDED
2#define BOX_INCLUDED
3#include <Util/geometry.h>
4#include "shape.h"
5
6 namespace Ray
7{
9 class Box : public Shape
10 {
12 int _materialIndex;
13
15 const class Material *_material;
16 public:
18 Util::Point3D center;
19
21 Util::Point3D length;
22
24 static std::string Directive( void ){ return "shape_box"; }
25
27 Box( void );
28
30 // Shape methods //
32 private:
33 void _write( std::ostream &stream ) const;
34 void _read( std::istream &stream );
35 public:
36 std::string name( void ) const { return "box"; }
37 void init( const class LocalSceneData& data );
38 void initOpenGL( void );
39 void updateBoundingBox( void );
40 bool processFirstIntersection( const Util::Ray3D &ray , const Util::BoundingBox1D &range , const RayIntersectionFilter &rFilter , const RayIntersectionKernel &rKernel , ShapeProcessingInfo spInfo , unsigned int tIdx ) const;
41 int processAllIntersections( const Util::Ray3D &ray , const Util::BoundingBox1D &range , const RayIntersectionFilter &rFilter , const RayIntersectionKernel &rKernel , ShapeProcessingInfo spInfo , unsigned int tIdx ) const;
42 bool isInside( Util::Point3D p ) const;
43 void drawOpenGL( GLSLProgram *glslProgram ) const;
44 };
45}
46#endif // BOX_INCLUDED
47
GLSLProgram
Definition GLSLProgram.h:33
Ray::Box::length
Util::Point3D length
Definition box.h:21
Ray::Box::Directive
static std::string Directive(void)
Definition box.h:24
Ray::Box::isInside
bool isInside(Util::Point3D p) const
Definition box.todo.cpp:69
Ray::Box::Box
Box(void)
Definition box.cpp:13
Ray::Box::updateBoundingBox
void updateBoundingBox(void)
Definition box.todo.cpp:27
Ray::Box::name
std::string name(void) const
Definition box.h:36
Ray::Box::init
void init(const class LocalSceneData &data)
Definition box.todo.cpp:13
Ray::Box::_materialIndex
int _materialIndex
Definition box.h:12
Ray::Box::_write
void _write(std::ostream &stream) const
Definition box.cpp:20
Ray::Box::center
Util::Point3D center
Definition box.h:18
Ray::Box::_read
void _read(std::istream &stream)
Definition box.cpp:15
Ray::Box::processFirstIntersection
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition box.todo.cpp:46
Ray::Box::initOpenGL
void initOpenGL(void)
Definition box.todo.cpp:35
Ray::Box::drawOpenGL
void drawOpenGL(GLSLProgram *glslProgram) const
Definition box.todo.cpp:78
Ray::Box::_material
const class Material * _material
Definition box.h:15
Ray::Box::processAllIntersections
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition box.todo.cpp:58
Ray::LocalSceneData
Definition scene.h:62
Ray::Material
Definition scene.h:249
Ray::Shape
Definition shape.h:90
Ray::Shape::RayIntersectionFilter
std::function< bool(double) > RayIntersectionFilter
Definition shape.h:164
Ray::Shape::RayIntersectionKernel
std::function< bool(const ShapeProcessingInfo &, const class RayShapeIntersectionInfo &) > RayIntersectionKernel
Definition shape.h:165
geometry.h
data
JSAMPIMAGE data
Definition jpeglib.h:945
Ray
Definition box.h:7
Util::Point3D
Point< 3 > Point3D
Definition geometry.h:526
Util::BoundingBox1D
BoundingBox< 1 > BoundingBox1D
Definition geometry.h:568
Util::Ray3D
Ray< 3 > Ray3D
Definition geometry.h:562
shape.h