00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef VRS_OPENGL_MAPPEDVERTEXATTRIBUTESHAPERAYINTERSECTORGL_H
00021 #define VRS_OPENGL_MAPPEDVERTEXATTRIBUTESHAPERAYINTERSECTORGL_H
00022
00023 #include <vrs/rayintersector.h>
00024
00025 namespace VRS {
00026
00027 class BaseVertexAttributeBufferObjectGL;
00028
00040 class VRS_CORE_API MappedVertexAttributeShapeRayIntersectorGL : public RayIntersector {
00041
00042 public:
00043 virtual ID target() const;
00045
00046 virtual bool intersect(
00047 Engine* engine,
00048 const Matrix& mv, const Matrix& ori, const Matrix& pr,
00049 const Shape* S, const Ray&, RayTracingTechnique* tracer
00050 );
00052
00053 VRS_TYPEINFO(MappedVertexAttributeShapeRayIntersectorGL, RayIntersector);
00054
00055 private:
00056 template<typename INT_TYPE>
00057 bool intersectIndexedShape(
00058 SO<const BaseVertexAttributeBufferObjectGL> indexBuffer,
00059 const Vector3f* vertices,
00060 const Matrix& instanceTransform,
00061 const Matrix& mv, const Matrix& ori, const Matrix& pr,
00062 const Shape* S, const Ray&, RayTracingTechnique* tracer,
00063 unsigned int instanceInfo,
00064 const SO<Iterator<UINT32> >& ids
00065 );
00066 };
00067
00068 }
00069
00070 #endif // VRS_OPENGL_MAPPEDVERTEXATTRIBUTESHAPERAYINTERSECTORGL_H