#include <Vec3D.h>
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 Vec3D & | operator= (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 Vec3D & | normalize () |
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) |
Definition at line 9 of file Vec3D.h.
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 | ) |
rcrt::Vec3D::Vec3D | ( | const float & | xc, | |
const float & | yc, | |||
const float & | zc | |||
) |
rcrt::Vec3D::Vec3D | ( | const Vec3D & | vec | ) |
void rcrt::Vec3D::assign | ( | const Vec3D & | vec | ) | [private] |
float rcrt::Vec3D::operator * | ( | const Vec3D & | vec | ) | const |
float rcrt::Vec3D::operator[] | ( | int | i | ) | const |
float & rcrt::Vec3D::operator[] | ( | int | i | ) |
bool rcrt::Vec3D::operator!= | ( | const Vec3D & | p | ) | const |
bool rcrt::Vec3D::operator== | ( | const Vec3D & | p | ) | const |
Vec3D rcrt::Vec3D::operator * | ( | const float & | f | ) | const |
Vec3D rcrt::Vec3D::operator/ | ( | const float & | f | ) | 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().
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().
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().
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().