C++ / OpenCL Raytracer
|
#include <sphere.h>
Public Member Functions | |
Sphere (Vector3D cen, double r, 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 |
Public Attributes | |
Vector3D | m_vCenter |
Vector3D center of Sphere Object. | |
double | m_dRadius |
Radius of Sphere Object. | |
Material * | m_pmCurMat |
Pointer to Material that the Sphere should render. | |
Sphere 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.