Ray Class Reference

#include <Ray.h>


Detailed Description

This class is an implementation of a ray.

Definition at line 18 of file Ray.h.


Public Member Functions

 Ray ()
 Initializes the ray with default values.
 Ray (const Ray &r)
 The copy constructor.
Rayoperator= (const Ray &r)
 The assignment operator.

Data Fields

Vector3D org
 The origin of the Ray.
Vector3D dir
 The direction of the Ray.
float t
 The current/maximum hit distance.
Primitivehit
 The currently closest primitive.
float u
 barycentric coordinates of the hitpoint on a triangle.
float v
 barycentric coordinates of the hitpoint on a triangle.
unsigned int bounces
 number of bounces that are already performed by the ray.

Constructor & Destructor Documentation

Ray::Ray (  )  [inline]

Initializes the ray with default values.

Definition at line 65 of file Ray.h.

References bounces, hit, Infinity, t, u, and v.

Ray::Ray ( const Ray r  )  [inline]

The copy constructor.

Parameters:
r The ray to be copied.

Definition at line 77 of file Ray.h.

References bounces, dir, hit, org, t, u, and v.


Member Function Documentation

Ray & Ray::operator= ( const Ray r  )  [inline]

The assignment operator.

Parameters:
r The ray to be assigned.
Returns:
The new ray.

Definition at line 93 of file Ray.h.

References bounces, dir, hit, org, t, u, and v.


Field Documentation

Vector3D Ray::org

The origin of the Ray.

Vector3D org

Definition at line 24 of file Ray.h.

Referenced by KDTree::KDNode::distanceToSplitPlane(), KDTree::KDNode::getNearFar(), Sphere::GetNormal(), QuadAreaLight::Illuminate(), PointLight::Illuminate(), PerspectiveCamera::InitRay(), DepthOfFieldCamera::InitRay(), CylindricCamera::InitRay(), Triangle::Intersect(), Sphere::Intersect(), InfinitePlane::Intersect(), Box::Intersect(), AABB::Intersect(), operator=(), Ray(), WoodShader::Shade(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), PhongShader::Shade(), MirrorShader::Shade(), MarbleShader::Shade(), GoldShader::Shade(), FlatTransparentShader::Shade(), CopperShader::Shade(), CloudShader::Shade(), CenterMapShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().

Vector3D Ray::dir

The direction of the Ray.

Vector3D dir

Definition at line 30 of file Ray.h.

Referenced by KDTree::KDNode::distanceToSplitPlane(), Sphere::GetNormal(), QuadAreaLight::Illuminate(), PointLight::Illuminate(), PerspectiveCamera::InitRay(), DepthOfFieldCamera::InitRay(), CylindricCamera::InitRay(), Triangle::Intersect(), Sphere::Intersect(), InfinitePlane::Intersect(), Box::Intersect(), AABB::Intersect(), operator=(), Ray(), WoodShader::Shade(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), PhongShader::Shade(), MirrorShader::Shade(), MarbleShader::Shade(), GoldShader::Shade(), FlatTransparentShader::Shade(), EyeLightShader::Shade(), CopperShader::Shade(), CloudShader::Shade(), CenterMapShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().

float Ray::t

The current/maximum hit distance.

float t

Definition at line 36 of file Ray.h.

Referenced by Sphere::GetNormal(), QuadAreaLight::Illuminate(), PointLight::Illuminate(), Triangle::Intersect(), Sphere::Intersect(), InfinitePlane::Intersect(), AABB::Intersect(), KDTree::KDNode::leafIntersect(), operator=(), Ray(), WoodShader::Shade(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), PhongShader::Shade(), MirrorShader::Shade(), MarbleShader::Shade(), GoldShader::Shade(), FlatTransparentShader::Shade(), CopperShader::Shade(), CloudShader::Shade(), CenterMapShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().

Primitive* Ray::hit

The currently closest primitive.

Primitive* hit

Definition at line 42 of file Ray.h.

Referenced by QuadAreaLight::Illuminate(), PointLight::Illuminate(), Triangle::Intersect(), Sphere::Intersect(), KDTree::KDNode::leafIntersect(), operator=(), Ray(), Scene::RayTrace(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), PlasmaShader::Shade(), PhongShader::Shade(), MirrorShader::Shade(), MapShader::Shade(), GoldShader::Shade(), FlatTransparentShader::Shade(), FlatShader::Shade(), EyeLightShader::Shade(), DebugShader::Shade(), CopperShader::Shade(), CloudShader::Shade(), CenterMapShader::Shade(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().

float Ray::u

barycentric coordinates of the hitpoint on a triangle.

float u

Definition at line 48 of file Ray.h.

Referenced by SmoothTriangle::GetNormal(), TexturedSmoothTriangle::GetUV(), Triangle::Intersect(), operator=(), Ray(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), MirrorShader::Shade(), GoldShader::Shade(), EdgeShader::Shade(), and CopperShader::Shade().

float Ray::v

barycentric coordinates of the hitpoint on a triangle.

float v

Definition at line 53 of file Ray.h.

Referenced by SmoothTriangle::GetNormal(), TexturedSmoothTriangle::GetUV(), Triangle::Intersect(), operator=(), Ray(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), MirrorShader::Shade(), GoldShader::Shade(), EdgeShader::Shade(), and CopperShader::Shade().

unsigned int Ray::bounces

number of bounces that are already performed by the ray.

unsigned int bounces

Definition at line 59 of file Ray.h.

Referenced by operator=(), Ray(), Scene::RayTrace(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), MirrorShader::Shade(), GoldShader::Shade(), FlatTransparentShader::Shade(), and CopperShader::Shade().


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