|
C++ / OpenCL Raytracer
|
#include <box.h>
Public Member Functions | |
| Box (Vector3D bound1, Vector3D bound2, Material *pm) | |
| virtual bool | Hit (const Ray &r, HitRecord &rec, double tMin, double tMax) const |
| int | clType () const |
| Vector3D | clCenter () const |
| double | clRadius () const |
| Vector3D | clBound1 () const |
| Vector3D | clBound2 () const |
| virtual cl_double8 | CurMat () const |
| virtual Vector3D | NormalCalc (const Vector3D inter) const |
Public Attributes | |
| Material * | m_pmCurMat |
| Pointer to Material that the box should render. | |
| Vector3D | m_vBounds [2] |
| Array of Vector3D bounds for box. | |
| Vector3D | m_vCenter = Vector3D((m_vBounds[0].x() + m_vBounds[1].x()) / 2, (m_vBounds[0].y() + m_vBounds[1].y()) / 2, (m_vBounds[0].z() + m_vBounds[1].z()) / 2) |
| Vector3D center of Box Object. | |
Box creation and intersection functions
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Return boolean value if box is hit by specified ray.
Example:
Box::Hit(ray, hitrec, 0.001, DBL_MAX);
Implements Object.