Cyl Class Reference

#include <Cyl.h>

Inherits Primitive.


Public Member Functions

 Cyl (Material *material, const Point &base, const Point &top, const float rad)
virtual ~Cyl ()
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.

Protected Attributes

Point base
Point top
float radius
Vector A
PlanebasePlane
PlanetopPlane


Detailed Description

Definition at line 13 of file Cyl.h.


Constructor & Destructor Documentation

Cyl Material material,
const Point &  base,
const Point &  top,
const float  rad
 

Definition at line 16 of file Cyl.cc.

References A, base, basePlane, Vector::normalize(), top, and topPlane.

~Cyl  )  [virtual]
 

Definition at line 27 of file Cyl.cc.

References basePlane, and topPlane.


Member Function Documentation

void getBounds BoundingBox bbox  )  const [virtual]
 

Implements Object.

Definition at line 33 of file Cyl.cc.

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

Intersect ray with primitive.

Implements Primitive.

Definition at line 63 of file Cyl.cc.

References A, base, basePlane, Cross(), Ray::direction(), Dot(), HitRecord::hit(), Plane::intersect(), Vector::length2(), Primitive::matl, HitRecord::minT(), Vector::normalize(), Ray::origin(), radius, HitRecord::scratchdata, and topPlane.

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 38 of file Cyl.cc.

References A, base, Dot(), radius, and HitRecord::scratchdata.


Field Documentation

Vector A [protected]
 

Definition at line 30 of file Cyl.h.

Referenced by Cyl(), intersect(), and normal().

Point base [protected]
 

Definition at line 27 of file Cyl.h.

Referenced by Cyl(), intersect(), and normal().

Plane* basePlane [protected]
 

Definition at line 31 of file Cyl.h.

Referenced by Cyl(), intersect(), and ~Cyl().

float radius [protected]
 

Definition at line 29 of file Cyl.h.

Referenced by intersect(), and normal().

Point top [protected]
 

Definition at line 28 of file Cyl.h.

Referenced by Cyl().

Plane* topPlane [protected]
 

Definition at line 32 of file Cyl.h.

Referenced by Cyl(), intersect(), and ~Cyl().


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