Box Class Reference

An axis-aligned box (RPP). More...

#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.


Detailed Description

An axis-aligned box (RPP).

Definition at line 18 of file Box.h.


Constructor & Destructor Documentation

Box Material material,
const Point &  lo,
const Point &  hi
 

Definition at line 17 of file Box.cc.

~Box  )  [virtual]
 

Definition at line 24 of file Box.cc.


Member Function Documentation

void getBounds BoundingBox bbox  )  const [virtual]
 

Implements Object.

Definition at line 146 of file Box.cc.

References BoundingBox::extend().

void intersect HitRecord hit,
const RenderContext context,
const Ray ray
const [virtual]
 

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().

void normal Vector normal,
const RenderContext context,
const Point &  hitpos,
const Ray ray,
const HitRecord hit
const [virtual]
 

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.


The documentation for this class was generated from the following files:
Generated on Tue Jan 29 21:34:55 2008 for specter by  doxygen 1.4.6