|
raytracer
Parallel Ray Tracer written from scratch (no graphics API).
|
#include <object.h>

Public Member Functions | |
| virtual | ~Object ()=default |
| Object (std::unique_ptr< const Material > _mat) | |
| const Material * | get_material () const |
| virtual double | ray_intersection (const Ray &r) const =0 |
| virtual common::Vec3 | get_normal (const common::Vec3 &point) const =0 |
| virtual ObjectType | get_type () const =0 |
A shape in the scene that rays can hit, made of a single material.
|
virtualdefault |
|
inlineexplicit |
Creates an object with the given material.
| _mat | The material of the object, owned by the object. |

|
inlinenodiscard |
Returns a non-owning pointer to the material of the object.
|
nodiscardpure virtual |
Returns the normal to the surface of the object at a given point.
| point | A point on the surface of the object. |
Implemented in raytracer::raytracer::Floor, and raytracer::raytracer::Sphere.
|
nodiscardpure virtual |
Returns the type of the object, used to identify the concrete class.
Implemented in raytracer::raytracer::Floor, and raytracer::raytracer::Sphere.
|
nodiscardpure virtual |
Computes the distance along a ray at which it first hits the object.
| r | The ray to intersect with the object. |
Implemented in raytracer::raytracer::Floor, and raytracer::raytracer::Sphere.