rcrt::Vec3D Class Reference

#include <Vec3D.h>

List of all members.

Public Member Functions

 Vec3D ()
 Vec3D (const float &val)
 Vec3D (const float &xc, const float &yc, const float &zc)
 Vec3D (const Vec3D &vec)
virtual ~Vec3D ()
const Vec3Doperator= (const Vec3D &vec)
Vec3D operator+ (const Vec3D &vec) const
Vec3D operator- (const Vec3D &vec) const
float operator * (const Vec3D &vec) const
float operator[] (int i) const
float & operator[] (int i)
bool operator!= (const Vec3D &p) const
bool operator== (const Vec3D &p) const
Vec3D operator * (const float &f) const
Vec3D operator/ (const float &f) const
Vec3D crossP (const Vec3D &vec) const
Vec3D abs () const
const Vec3Dnormalize ()
Vec3D normalized () const
float norm () const
Vec3D reflect (const Vec3D &normal) const
void getCS (Vec3D &u, Vec3D &v) const
const float & x () const
const float & y () const
const float & z () const

Private Member Functions

void assign (const Vec3D &vec)

Private Attributes

float values [3]

Friends

Vec3D operator * (const float &f, const Vec3D &vec)


Detailed Description

Definition at line 9 of file Vec3D.h.


Constructor & Destructor Documentation

rcrt::Vec3D::Vec3D (  ) 

Definition at line 8 of file Vec3D.cpp.

References values.

Referenced by abs(), crossP(), operator *(), operator+(), operator-(), and operator/().

rcrt::Vec3D::Vec3D ( const float &  val  ) 

Definition at line 13 of file Vec3D.cpp.

References values.

rcrt::Vec3D::Vec3D ( const float &  xc,
const float &  yc,
const float &  zc 
)

Definition at line 18 of file Vec3D.cpp.

References values.

rcrt::Vec3D::Vec3D ( const Vec3D vec  ) 

Definition at line 26 of file Vec3D.cpp.

References assign().

rcrt::Vec3D::~Vec3D (  )  [virtual]

Definition at line 32 of file Vec3D.cpp.


Member Function Documentation

void rcrt::Vec3D::assign ( const Vec3D vec  )  [private]

Definition at line 37 of file Vec3D.cpp.

References values.

Referenced by operator=(), and Vec3D().

const Vec3D & rcrt::Vec3D::operator= ( const Vec3D vec  ) 

Definition at line 48 of file Vec3D.cpp.

References assign().

Vec3D rcrt::Vec3D::operator+ ( const Vec3D vec  )  const

Definition at line 56 of file Vec3D.cpp.

References values, and Vec3D().

Vec3D rcrt::Vec3D::operator- ( const Vec3D vec  )  const

Definition at line 64 of file Vec3D.cpp.

References values, and Vec3D().

float rcrt::Vec3D::operator * ( const Vec3D vec  )  const

Definition at line 72 of file Vec3D.cpp.

References values.

float rcrt::Vec3D::operator[] ( int  i  )  const

Definition at line 79 of file Vec3D.cpp.

References values.

float & rcrt::Vec3D::operator[] ( int  i  ) 

Definition at line 84 of file Vec3D.cpp.

References values.

bool rcrt::Vec3D::operator!= ( const Vec3D p  )  const

Definition at line 102 of file Vec3D.cpp.

References values.

bool rcrt::Vec3D::operator== ( const Vec3D p  )  const

Definition at line 108 of file Vec3D.cpp.

References values.

Vec3D rcrt::Vec3D::operator * ( const float &  f  )  const

Definition at line 90 of file Vec3D.cpp.

References values, and Vec3D().

Vec3D rcrt::Vec3D::operator/ ( const float &  f  )  const

Definition at line 96 of file Vec3D.cpp.

References values, and Vec3D().

Vec3D rcrt::Vec3D::crossP ( const Vec3D vec  )  const

Definition at line 115 of file Vec3D.cpp.

References values, and Vec3D().

Referenced by rcrt::DisplacedTriangle::baseIntersect(), getCS(), rcrt::Matrix4D::getOrthoNormalBasis(), rcrt::PerspectiveCamera::initialise(), rcrt::Triangle::intersect(), rcrt::DisplacedTriangle::intersect(), rcrt::PerspectiveCamera::PerspectiveCamera(), and rcrt::PerspectiveCamera::update().

Vec3D rcrt::Vec3D::abs (  )  const

Definition at line 123 of file Vec3D.cpp.

References values, and Vec3D().

Referenced by rcrt::ConvexQuad::intersect(), rcrt::ConvexQuad::isInside(), rcrt::DebugMaterial::sample(), rcrt::DebugMaterial::scatterPhoton(), and rcrt::DebugTracer::trace().

const Vec3D & rcrt::Vec3D::normalize (  ) 

Definition at line 129 of file Vec3D.cpp.

References norm(), and values.

Referenced by rcrt::ConvexQuad::ConvexQuad(), rcrt::Sphere::getGNormal(), rcrt::PerspectiveCamera::getRay(), rcrt::AreaLight::getSample(), rcrt::WoodTexture::getScale(), rcrt::PointLight::illuminate(), rcrt::PerspectiveCamera::initialise(), rcrt::MaterialLoader::initWood(), rcrt::PerspectiveCamera::PerspectiveCamera(), rcrt::WoodMaterial::scatterPhoton(), rcrt::ImageMaterial::scatterPhoton(), rcrt::BSDFMaterial::scatterPhoton(), rcrt::PhotonTracer::trace(), rcrt::Triangle::Triangle(), and rcrt::PerspectiveCamera::update().

Vec3D rcrt::Vec3D::normalized (  )  const

Definition at line 140 of file Vec3D.cpp.

References norm().

Referenced by rcrt::AreaLight::emitPhoton(), getCS(), rcrt::AreaLight::getSample(), and rcrt::Scene::isOccluded().

float rcrt::Vec3D::norm (  )  const

Definition at line 146 of file Vec3D.cpp.

References values.

Referenced by rcrt::AreaLight::AreaLight(), rcrt::AreaLight::getSample(), rcrt::WoodTexture::getScale(), rcrt::PointLight::illuminate(), normalize(), and normalized().

Vec3D rcrt::Vec3D::reflect ( const Vec3D normal  )  const

Definition at line 151 of file Vec3D.cpp.

Referenced by rcrt::Phong::evalSpecular(), rcrt::Phong::pdf(), rcrt::MirrorMaterial::scatterPhoton(), rcrt::BSDFMaterial::scatterPhoton(), rcrt::snell(), rcrt::SimpleTracer::trace(), and rcrt::PhotonTracer::trace().

void rcrt::Vec3D::getCS ( Vec3D u,
Vec3D v 
) const

Definition at line 156 of file Vec3D.cpp.

References crossP(), normalized(), and values.

Referenced by rcrt::WoodMaterial::scatterPhoton(), rcrt::ImageMaterial::scatterPhoton(), and rcrt::BSDFMaterial::scatterPhoton().

const float & rcrt::Vec3D::x (  )  const

Definition at line 180 of file Vec3D.cpp.

References values.

Referenced by rcrt::WallMaterial::calcDistNormal(), rcrt::CookTorrance::evalSpecular(), rcrt::Matrix4D::getOrthoNormalBasis(), rcrt::HCoord4D::HCoord4D(), rcrt::AABB::intersect(), rcrt::ConvexQuad::isInside(), rcrt::Matrix4D::operator *(), rcrt::Point3D::operator+(), rcrt::Point3D::operator-(), rcrt::operator<<(), rcrt::Ray::Ray(), rcrt::Matrix4D::rotation(), rcrt::DebugMaterial::sample(), rcrt::DebugMaterial::scatterPhoton(), rcrt::DebugTracer::trace(), and rcrt::Matrix4D::translation().

const float & rcrt::Vec3D::y (  )  const

Definition at line 186 of file Vec3D.cpp.

References values.

Referenced by rcrt::CookTorrance::evalSpecular(), rcrt::Matrix4D::getOrthoNormalBasis(), rcrt::HCoord4D::HCoord4D(), rcrt::AABB::intersect(), rcrt::ConvexQuad::isInside(), rcrt::Matrix4D::operator *(), rcrt::Point3D::operator+(), rcrt::Point3D::operator-(), rcrt::operator<<(), rcrt::Ray::Ray(), rcrt::Matrix4D::rotation(), rcrt::DebugMaterial::sample(), rcrt::DebugMaterial::scatterPhoton(), rcrt::DebugTracer::trace(), and rcrt::Matrix4D::translation().

const float & rcrt::Vec3D::z (  )  const

Definition at line 192 of file Vec3D.cpp.

References values.

Referenced by rcrt::WallMaterial::calcDistNormal(), rcrt::CookTorrance::evalSpecular(), rcrt::Matrix4D::getOrthoNormalBasis(), rcrt::HCoord4D::HCoord4D(), rcrt::AABB::intersect(), rcrt::ConvexQuad::isInside(), rcrt::Matrix4D::operator *(), rcrt::Point3D::operator+(), rcrt::Point3D::operator-(), rcrt::operator<<(), rcrt::Ray::Ray(), rcrt::Matrix4D::rotation(), rcrt::DebugMaterial::sample(), rcrt::DebugMaterial::scatterPhoton(), rcrt::DebugTracer::trace(), and rcrt::Matrix4D::translation().


Friends And Related Function Documentation

Vec3D operator * ( const float &  f,
const Vec3D vec 
) [friend]

Definition at line 52 of file Vec3D.h.


Member Data Documentation

float rcrt::Vec3D::values[3] [private]

Definition at line 14 of file Vec3D.h.

Referenced by abs(), assign(), crossP(), getCS(), norm(), normalize(), rcrt::operator *(), operator *(), operator!=(), operator+(), operator-(), operator/(), operator==(), operator[](), Vec3D(), x(), y(), and z().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:55 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3