#include <raytracing.hpp>
Public Member Functions | |
Cylinder (Vector3f center=Vector3f{0.0f, 0.0f, 0.0f}, Vector3f axis=Vector3f{0.0f, 0.0f, 1.0f}, float radius=1.0f) | |
Constructor. | |
const Vector3f & | center (void) const |
Return center point. | |
bool | set_center (Vector3f center) |
Update center point. | |
const Vector3f & | axis (void) const |
Return axis. | |
bool | set_axis (Vector3f axis) |
Update axis. | |
float | radius (void) const |
Return radius vector. | |
bool | set_radius (float radius) |
Update radius. | |
bool | intersect (const Ray &ray, Intersection &intersection) |
Perform intersection between a ray and the current object. |
Constructor.
center | Center of cylinder |
axis | Axis of the cylinder (normal vetor) |
radius | Radius of cylinder |
bool raytracing::Cylinder::intersect | ( | const Ray & | ray, |
Intersection & | intersection | ||
) | [virtual] |
Perform intersection between a ray and the current object.
ray | Ray to intersect with (input) |
intersection | Intersection point (output) |
Implements raytracing::Object.