Ring Class Reference

Implements a disk or ring primitive. More...

#include <Ring.h>

Inherits Primitive.


Public Member Functions

 Ring (Material *material, const Point &center, const Vector &n, const double r1, const double r2=0.0)
virtual ~Ring ()
virtual void getBounds (BoundingBox &bbox) const
virtual void intersect (HitRecord &hit, const RenderContext &context, const Ray &ray) const
 Intersect ray with primitive.
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

Implements a disk or ring primitive.

Definition at line 19 of file Ring.h.


Constructor & Destructor Documentation

Ring Material material,
const Point &  center,
const Vector n,
const double  r1,
const double  r2 = 0.0
 

Definition at line 14 of file Ring.cc.

References Dot(), and Vector::normalize().

~Ring  )  [virtual]
 

Definition at line 24 of file Ring.cc.


Member Function Documentation

void getBounds BoundingBox bbox  )  const [virtual]
 

Implements Object.

Definition at line 53 of file Ring.cc.

References BoundingBox::extend().

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

Intersect ray with primitive.

Implements Primitive.

Definition at line 28 of file Ring.cc.

References Ray::direction(), Dot(), HitRecord::hit(), Vector::length2(), Primitive::matl, and Ray::origin().

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 47 of file Ring.cc.


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