#include <Box.h>
Inherits Primitive.
Public Member Functions | |
Box (Material *material, const Point &lo, const Point &hi) | |
virtual | ~Box () |
virtual void | getBounds (BoundingBox &bbox) const |
virtual void | intersect (HitRecord &hit, const RenderContext &context, const Ray &ray) const |
Intersect a ray with the axis aligned box. This is based upon a paper by Williams et. al. | |
virtual void | normal (Vector &normal, const RenderContext &context, const Point &hitpos, const Ray &ray, const HitRecord &hit) const |
Return normal for the hit location. Generally called after all ray-geometry intersection to get the normal for the hit point. |
Definition at line 18 of file Box.h.
|
|
|
|
|
Implements Object. Definition at line 146 of file Box.cc. References BoundingBox::extend(). |
|
Intersect a ray with the axis aligned box. This is based upon a paper by Williams et. al.
Implements Primitive. Definition at line 32 of file Box.cc. References Ray::direction(), HitRecord::hit(), Ray::inv_direction, Ray::is_neg, Primitive::matl, Ray::origin(), HitRecord::scratchdata, Vector::x(), Vector::y(), and Vector::z(). |
|
Return normal for the hit location. Generally called after all ray-geometry intersection to get the normal for the hit point.
Implements Primitive. Definition at line 137 of file Box.cc. References HitRecord::scratchdata. |