HitRecord Class Reference

Record of the hit location. Stores the hit with the smallest "t" value greater than epsilon. More...

#include <HitRecord.h>


Public Member Functions

 HitRecord (double max)
 HitRecord (double max, double ep)
 ~HitRecord ()
bool hit (double t, const Primitive *hit_prim, const Material *hit_matl)
 returns true if the hit specified is the new smallest value
double minT () const
const PrimitivegetPrimitive () const
const MaterialgetMaterial () const
template<typename T>
T * getScratchpad ()
template<typename T>
const T * getScratchpad () const

Data Fields

char scratchdata [128]


Detailed Description

Record of the hit location. Stores the hit with the smallest "t" value greater than epsilon.

Definition at line 14 of file HitRecord.h.


Constructor & Destructor Documentation

HitRecord double  max  )  [inline]
 

constructor with EPSILON for the value of epsilon

Definition at line 17 of file HitRecord.h.

References EPSILON.

HitRecord double  max,
double  ep
[inline]
 

constructor with caller-specified value for epsilon

Definition at line 24 of file HitRecord.h.

~HitRecord  )  [inline]
 

Definition at line 30 of file HitRecord.h.


Member Function Documentation

const Material* getMaterial  )  const [inline]
 

Definition at line 50 of file HitRecord.h.

Referenced by Scene::render().

const Primitive* getPrimitive  )  const [inline]
 

Definition at line 47 of file HitRecord.h.

Referenced by Scene::render(), and LambertianMaterial::shade().

const T* getScratchpad  )  const [inline]
 

Definition at line 61 of file HitRecord.h.

References scratchdata.

T* getScratchpad  )  [inline]
 

Definition at line 55 of file HitRecord.h.

References scratchdata.

bool hit double  t,
const Primitive hit_prim,
const Material hit_matl
[inline]
 

returns true if the hit specified is the new smallest value

Definition at line 34 of file HitRecord.h.

Referenced by Triangle::intersect(), Sphere::intersect(), Ring::intersect(), Plane::intersect(), Cyl::intersect(), and Box::intersect().

double minT  )  const [inline]
 

Definition at line 44 of file HitRecord.h.

Referenced by Primitive::computeUVW(), Cyl::intersect(), and LambertianMaterial::shade().


Field Documentation

char scratchdata[128]
 

Definition at line 66 of file HitRecord.h.

Referenced by getScratchpad(), Cyl::intersect(), Box::intersect(), Cyl::normal(), and Box::normal().


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