Primitive Class Reference

#include <Primitive.h>

Inheritance diagram for Primitive:

AABB InfinitePlane Sphere Triangle SmoothTriangle TexturedSmoothTriangle

Detailed Description

Definition at line 8 of file Primitive.h.


Public Member Functions

 Primitive ()
virtual ~Primitive ()
virtual bool Intersect (Ray &ray)=0
virtual bool Occluded (Ray &ray)
virtual Vector3D GetNormal (Ray &ray)=0
virtual PAIR GetUV (Ray &ray)
ShadergetShader ()
void setShader (Shader *sh)
const BoxGetBounds ()
 Get bounds of this box.
bool & castShadows ()
 get direct access to the cast shadow variable

Protected Member Functions

virtual Box CalcBounds ()=0

Protected Attributes

Box bounds
bool bDirtyBounds
Shadershader
bool bCastShadows

Constructor & Destructor Documentation

Primitive::Primitive (  )  [inline]

Definition at line 19 of file Primitive.h.

References bCastShadows, bDirtyBounds, and shader.

virtual Primitive::~Primitive (  )  [inline, virtual]

Definition at line 26 of file Primitive.h.


Member Function Documentation

virtual Box Primitive::CalcBounds (  )  [protected, pure virtual]

Implemented in AABB, InfinitePlane, Sphere, and Triangle.

Referenced by GetBounds().

virtual bool Primitive::Intersect ( Ray ray  )  [pure virtual]

Implemented in AABB, InfinitePlane, Sphere, and Triangle.

Referenced by Occluded().

virtual bool Primitive::Occluded ( Ray ray  )  [inline, virtual]

Definition at line 29 of file Primitive.h.

References Intersect().

virtual Vector3D Primitive::GetNormal ( Ray ray  )  [pure virtual]

Implemented in AABB, InfinitePlane, SmoothTriangle, Sphere, and Triangle.

Referenced by UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), PlasmaShader::Shade(), PhongShader::Shade(), MirrorShader::Shade(), GoldShader::Shade(), EyeLightShader::Shade(), DebugShader::Shade(), CopperShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().

virtual PAIR Primitive::GetUV ( Ray ray  )  [inline, virtual]

Reimplemented in TexturedSmoothTriangle.

Definition at line 31 of file Primitive.h.

References PAIR.

Referenced by PlasmaShader::Shade(), PhongShader::Shade(), MapShader::Shade(), FlatTransparentShader::Shade(), FlatShader::Shade(), CloudShader::Shade(), CenterMapShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().

Shader* Primitive::getShader (  )  [inline]

Definition at line 33 of file Primitive.h.

References shader.

Referenced by Scene::RayTrace().

void Primitive::setShader ( Shader sh  )  [inline]

Definition at line 34 of file Primitive.h.

References shader.

const Box& Primitive::GetBounds (  )  [inline]

Get bounds of this box.

Definition at line 37 of file Primitive.h.

References bDirtyBounds, bounds, and CalcBounds().

bool& Primitive::castShadows (  )  [inline]

get direct access to the cast shadow variable

Definition at line 48 of file Primitive.h.

References bCastShadows.

Referenced by PhongShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), and BumpMappedMarblePhongShader::Shade().


Field Documentation

Box Primitive::bounds [protected]

Definition at line 11 of file Primitive.h.

Referenced by Triangle::CalcBounds(), and GetBounds().

bool Primitive::bDirtyBounds [protected]

Definition at line 12 of file Primitive.h.

Referenced by GetBounds(), and Primitive().

Shader* Primitive::shader [protected]

Definition at line 13 of file Primitive.h.

Referenced by getShader(), Primitive(), and setShader().

bool Primitive::bCastShadows [protected]

Definition at line 14 of file Primitive.h.

Referenced by castShadows(), and Primitive().


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 21:48:57 2008 for RayTracer by  doxygen 1.5.4