4#include <unordered_map>
56 static std::string
Directive(
void ){
return "static_affine"; }
68 void _write( std::ostream &stream )
const;
69 void _read( std::istream &stream );
71 std::string
name(
void )
const {
return "static affine"; }
98 static std::string
Directive(
void ){
return "dynamic_affine"; }
104 void _write( std::ostream &stream )
const;
105 void _read( std::istream &stream );
107 std::string
name(
void )
const {
return "dynamic affine"; }
130 static std::string
Directive(
void ){
return "shape_difference"; }
136 void _write( std::ostream &stream )
const;
137 void _read( std::istream &stream );
139 std::string
name(
void )
const {
return "difference"; }
177 static std::unordered_map< std::string , Util::BaseFactory< Shape > * >
ShapeFactories;
189 void _write( std::ostream &stream )
const;
190 void _read( std::istream &stream );
192 std::string
name(
void )
const {
return "shape list"; }
231 static std::string
Directive(
void ){
return "shape_triangles"; }
240 void _write( std::ostream &stream )
const;
241 void _read( std::istream &stream );
243 std::string
name(
void )
const {
return "triangles"; }
259 static std::string
Directive(
void ){
return "shape_union"; }
265 void _write( std::ostream &stream )
const;
266 void _read( std::istream &stream );
268 std::string
name(
void )
const {
return "union"; }
287 static std::string
Directive(
void ){
return "shape_intersection"; }
293 void _write( std::ostream &stream )
const;
294 void _read( std::istream &stream );
296 std::string
name(
void )
const {
return "intersection"; }
Definition: GLSLProgram.h:33
Definition: shapeList.h:12
Shape * _shape
Definition: shapeList.h:15
virtual Util::Matrix4D getMatrix(void) const =0
virtual bool isInside(Util::Point3D p) const
Definition: shapeList.todo.cpp:120
virtual Util::Matrix4D getInverseMatrix(void) const =0
void processOverlapping(const Filter &filter, const Kernel &kernel, ShapeProcessingInfo tInfo) const
Definition: shapeList.cpp:17
void initOpenGL(void)
Definition: shapeList.cpp:15
AffineShape(void)
Definition: shapeList.cpp:13
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.cpp:43
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.cpp:32
virtual void drawOpenGL(GLSLProgram *glslProgram) const
Definition: shapeList.todo.cpp:138
virtual Util::Matrix3D getNormalMatrix(void) const =0
void updateBoundingBox(void)
Definition: shapeList.todo.cpp:129
Definition: shapeList.h:121
Difference(Shape *shape0=NULL, Shape *shape1=NULL)
Definition: shapeList.cpp:124
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:20
Shape * _shape1
Definition: shapeList.h:123
void initOpenGL(void)
Definition: shapeList.cpp:166
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: shapeList.cpp:171
size_t primitiveNum(void) const
void _read(std::istream &stream)
Definition: shapeList.cpp:136
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:29
bool isInside(Util::Point3D p) const
Definition: shapeList.todo.cpp:37
void updateBoundingBox(void)
Definition: shapeList.todo.cpp:12
Shape * _shape0
Definition: shapeList.h:123
static std::string Directive(void)
Definition: shapeList.h:130
void _write(std::ostream &stream) const
Definition: shapeList.cpp:126
void init(const class LocalSceneData &data)
Definition: shapeList.cpp:160
std::string name(void) const
Definition: shapeList.h:139
Definition: shapeList.h:86
std::string name(void) const
Definition: shapeList.h:107
Util::Matrix4D getMatrix(void) const
Definition: shapeList.cpp:115
void _write(std::ostream &stream) const
Definition: shapeList.cpp:91
std::string _paramName
Definition: shapeList.h:88
Util::Matrix4D getInverseMatrix(void) const
Definition: shapeList.cpp:117
const Util::Matrix4D * _matrix
Definition: shapeList.h:91
DynamicAffineShape(void)
Definition: shapeList.cpp:89
static std::string Directive(void)
Definition: shapeList.h:98
void init(const class LocalSceneData &data)
Definition: shapeList.cpp:107
Util::Matrix3D getNormalMatrix(void) const
Definition: shapeList.cpp:119
void _read(std::istream &stream)
Definition: shapeList.cpp:100
Definition: shapeList.h:281
void initOpenGL(void)
Definition: shapeList.cpp:335
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:269
bool isInside(Util::Point3D p) const
Definition: shapeList.todo.cpp:296
ShapeList _shapeList
Definition: shapeList.h:283
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:260
void updateBoundingBox(void)
Definition: shapeList.todo.cpp:288
void init(const class LocalSceneData &data)
Definition: shapeList.todo.cpp:277
void _read(std::istream &stream)
Definition: shapeList.cpp:323
static std::string Directive(void)
Definition: shapeList.h:287
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: shapeList.cpp:330
void _write(std::ostream &stream) const
Definition: shapeList.cpp:314
std::string name(void) const
Definition: shapeList.h:296
Definition: shapeList.h:152
static bool Compare(const ShapeBoundingBoxHit &v1, const ShapeBoundingBoxHit &v2)
Definition: shapeList.cpp:179
double t
Definition: shapeList.h:155
const Shape * shape
Definition: shapeList.h:158
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
static std::string _DirectiveHeader(void)
Definition: shapeList.h:173
static std::unordered_map< std::string, Util::BaseFactory< Shape > * > ShapeFactories
Definition: shapeList.h:177
void addTrianglesOpenGL(std::vector< class TriangleIndex > &triangles)
Definition: shapeList.cpp:219
std::string name(void) const
Definition: shapeList.h:192
static std::string Directive(void)
Definition: shapeList.h:180
void updateBoundingBox(void)
Definition: shapeList.todo.cpp:86
void _read(std::istream &stream)
Definition: shapeList.cpp:186
void processOverlapping(const Filter &filter, const Kernel &kernel, ShapeProcessingInfo tInfo) const
Definition: shapeList.cpp:224
void init(const class LocalSceneData &data)
Definition: shapeList.todo.cpp:73
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:49
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:58
bool isInside(Util::Point3D p) const
Definition: shapeList.todo.cpp:64
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: shapeList.todo.cpp:105
void initOpenGL(void)
Definition: shapeList.todo.cpp:94
void _write(std::ostream &stream) const
Definition: shapeList.cpp:208
std::vector< Shape * > shapes
Definition: shapeList.h:183
Definition: shapeList.h:45
Util::Matrix3D _normalTransform
Definition: shapeList.h:53
std::string name(void) const
Definition: shapeList.h:71
Util::Matrix3D getNormalMatrix(void) const
Definition: shapeList.cpp:84
Util::Matrix4D _inverseTransform
Definition: shapeList.h:50
Util::Matrix4D getMatrix(void) const
Definition: shapeList.cpp:80
void _write(std::ostream &stream) const
Definition: shapeList.cpp:62
StaticAffineShape(void)
Definition: shapeList.cpp:58
Util::Matrix4D getInverseMatrix(void) const
Definition: shapeList.cpp:82
Util::Matrix4D _localTransform
Definition: shapeList.h:47
void init(const class LocalSceneData &data)
Definition: shapeList.todo.cpp:153
void _read(std::istream &stream)
Definition: shapeList.cpp:71
static std::string Directive(void)
Definition: shapeList.h:56
void initOpenGL(void)
Definition: shapeList.cpp:78
void set(Util::Matrix4D m)
Definition: shapeList.cpp:60
Definition: shapeList.h:206
void _write(std::ostream &stream) const
Definition: shapeList.cpp:245
const class Vertex * _vertices
Definition: shapeList.h:222
TriangleList(void)
Definition: shapeList.cpp:243
int _materialIndex
Definition: shapeList.h:225
GLuint _vertexBufferID
Definition: shapeList.h:210
unsigned int _vNum
Definition: shapeList.h:219
std::string name(void) const
Definition: shapeList.h:243
void initOpenGL(void)
Definition: shapeList.todo.cpp:196
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.cpp:268
void _read(std::istream &stream)
Definition: shapeList.cpp:254
static std::string Directive(void)
Definition: shapeList.h:231
const class Material * _material
Definition: shapeList.h:228
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.cpp:274
void processOverlapping(const Filter &filter, const Kernel &kernel, ShapeProcessingInfo tInfo) const
Definition: shapeList.cpp:262
GLuint _elementBufferID
Definition: shapeList.h:213
void init(const class LocalSceneData &data)
Definition: shapeList.todo.cpp:179
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: shapeList.todo.cpp:168
unsigned int _tNum
Definition: shapeList.h:216
Definition: shapeList.h:254
void _read(std::istream &stream)
Definition: shapeList.cpp:293
void initOpenGL(void)
Definition: shapeList.cpp:305
std::string name(void) const
Definition: shapeList.h:268
bool isInside(Util::Point3D p) const
Definition: shapeList.todo.cpp:248
void _write(std::ostream &stream) const
Definition: shapeList.cpp:284
void updateBoundingBox(void)
Definition: shapeList.todo.cpp:240
ShapeList _shapeList
Definition: shapeList.h:256
int processAllIntersections(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:221
void init(const class LocalSceneData &data)
Definition: shapeList.todo.cpp:229
bool processFirstIntersection(const Util::Ray3D &ray, const Util::BoundingBox1D &range, const RayIntersectionFilter &rFilter, const RayIntersectionKernel &rKernel, ShapeProcessingInfo spInfo, unsigned int tIdx) const
Definition: shapeList.todo.cpp:212
static std::string Directive(void)
Definition: shapeList.h:259
void drawOpenGL(GLSLProgram *glslProgram) const
Definition: shapeList.cpp:300
Definition: geometry.h:345
Definition: geometry.h:168
Definition: geometry.h:299