Assignments Assignments

fileInstance.h
Go to the documentation of this file.
1#ifndef RAY_FILE_INSTANCE_INCLUDED
2#define RAY_FILE_INSTANCE_INCLUDED
3#include <Util/geometry.h>
4#include "shape.h"
5#include "scene.h"
6
7 namespace Ray
8{
10 class FileInstance : public Shape
11 {
13 int _fileIndex;
14
16 const File *_file;
17 public:
19 static std::string Directive( void ){ return "ray_file_instance"; }
20
22 FileInstance( void );
23
25 // Shape methods //
27 private:
28 void _write( std::ostream &stream ) const;
29 void _read( std::istream &stream );
30 public:
31 std::string name( void ) const { return "file instance"; }
32 void init( const class LocalSceneData &data );
33 void initOpenGL( void );
34 void updateBoundingBox( void );
35 bool processFirstIntersection( const Util::Ray3D &ray , const Util::BoundingBox1D &range , const RayIntersectionFilter &rFilter , const RayIntersectionKernel &rKernel , ShapeProcessingInfo spInfo , unsigned int tIdx ) const;
36 int processAllIntersections( const Util::Ray3D &ray , const Util::BoundingBox1D &range , const RayIntersectionFilter &rFilter , const RayIntersectionKernel &rKernel , ShapeProcessingInfo spInfo , unsigned int tIdx ) const;
37 void processOverlapping( const Filter &filter , const Kernel &kernel , ShapeProcessingInfo spInfo ) const;
38 bool isInside( Util::Point3D p ) const;
39 void drawOpenGL( GLSLProgram * glslProgram ) const;
40 };
41}
42#endif // RAY_FILE_INSTANCE_INCLUDED
43
GLSLProgram
Definition GLSLProgram.h:33
Ray::File
Definition scene.h:186
Ray::FileInstance::processFirstIntersection
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition fileInstance.cpp:37
Ray::FileInstance::processAllIntersections
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition fileInstance.cpp:42
Ray::FileInstance::isInside
bool isInside(Util::Point3D p) const
Definition fileInstance.cpp:49
Ray::FileInstance::updateBoundingBox
void updateBoundingBox(void)
Definition fileInstance.cpp:33
Ray::FileInstance::Directive
static std::string Directive(void)
Definition fileInstance.h:19
Ray::FileInstance::drawOpenGL
void drawOpenGL(GLSLProgram *glslProgram) const
Definition fileInstance.cpp:51
Ray::FileInstance::_fileIndex
int _fileIndex
Definition fileInstance.h:13
Ray::FileInstance::initOpenGL
void initOpenGL(void)
Definition fileInstance.cpp:35
Ray::FileInstance::_file
const File * _file
Definition fileInstance.h:16
Ray::FileInstance::_write
void _write(std::ostream &stream) const
Definition fileInstance.cpp:13
Ray::FileInstance::init
void init(const class LocalSceneData &data)
Definition fileInstance.cpp:24
Ray::FileInstance::FileInstance
FileInstance(void)
Definition fileInstance.cpp:11
Ray::FileInstance::processOverlapping
void processOverlapping(const Filter &filter, const Kernel &kernel, ShapeProcessingInfo spInfo) const
Definition fileInstance.cpp:47
Ray::FileInstance::_read
void _read(std::istream &stream)
Definition fileInstance.cpp:19
Ray::FileInstance::name
std::string name(void) const
Definition fileInstance.h:31
Ray::LocalSceneData
Definition scene.h:62
Ray::Shape
Definition shape.h:90
Ray::Shape::Kernel
std::function< void(const ShapeProcessingInfo &, const Shape &) > Kernel
Definition shape.h:163
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
Ray::Shape::Filter
std::function< ShapeProcessingInfo::ProcessingType(const ShapeProcessingInfo &, const Shape &) > Filter
Definition shape.h:162
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
scene.h
shape.h