5 #ifndef SPICA_SPHERE_H_
6 #define SPICA_SPHERE_H_
8 #include "core/vector3d.h"
11 #include "core/shape.h"
28 bool intersect(
const Ray& ray,
double* tHit,
30 bool intersect(
const Ray& ray)
const override;
34 const Point2d& rands)
const override;
38 Bounds3d objectBound()
const override;
40 double area()
const override;
42 std::vector<Triangle> triangulate()
const override;
44 inline Point3d center()
const {
return center_; }
45 inline double radius()
const {
return radius_; }
48 Point3d center_ = { 0.0, 0.0, 0.0 };
55 #endif // SPICA_SPHERE_H_
Sphere class.
Definition: sphere.h:18
Definition: interaction.h:68
Ray class.
Definition: ray.h:24
Definition: interaction.h:23
Abstract shape class.
Definition: shape.h:39