#include <Vector3D.h>
Definition at line 15 of file Vector3D.h.
Public Member Functions | |
Vector3D () | |
The constrcutor. | |
Vector3D (float x, float y, float z) | |
The constrcutor. | |
float | operator[] (unsigned int i) const |
The index operator. | |
float & | operator[] (unsigned int i) |
The index operator. | |
float | x () const |
Returns the x value of the vector. | |
float | y () const |
Returns the y value of the vector. | |
float | z () const |
Returns the z value of the vector. | |
float & | x () |
Returns the x value of the vector. | |
float & | y () |
Returns the y value of the vector. | |
float & | z () |
Returns the z value of the vector. | |
Vector3D & | operator= (const Vector3D &x) |
The assignment operator. | |
void | SetMin (const Vector3D &x) |
Sets the values of this vector to the minimum of its value and x. | |
void | SetMax (const Vector3D &x) |
Sets the values of this vector to the maximum of its value and x. | |
int | MaxDim () const |
Vector3D | Abs () |
float | Length () |
Vector3D | Inverted () |
void | Normalize () |
Vector3D | Normalized () |
Vector3D | operator- () |
Vector3D | operator * (const float f) |
Vector3D & | operator *= (const float f) |
Vector3D | operator+ (const Vector3D &b) |
Vector3D & | operator+= (const Vector3D &b) |
Vector3D | operator- (const Vector3D &b) |
Vector3D & | operator-= (const Vector3D &b) |
Private Attributes | |
float | v [3] |
Friends | |
float | Dot (const Vector3D &a, const Vector3D &b) |
Vector3D | Cross (const Vector3D &a, const Vector3D &b) |
Vector3D | Product (const Vector3D &a, const Vector3D &b) |
Vector3D | operator * (float f, const Vector3D &w) |
Vector3D::Vector3D | ( | ) | [inline] |
The constrcutor.
Definition at line 27 of file Vector3D.h.
References v.
Referenced by Abs(), Inverted(), Normalized(), operator *(), operator+(), and operator-().
Vector3D::Vector3D | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
float Vector3D::operator[] | ( | unsigned int | i | ) | const [inline] |
float & Vector3D::operator[] | ( | unsigned int | i | ) | [inline] |
float Vector3D::x | ( | ) | const [inline] |
Returns the x value of the vector.
Definition at line 61 of file Vector3D.h.
References v.
Referenced by DepthOfFieldCamera::InitRay(), CylindricCamera::InitRay(), Box::Intersect(), AABB::Intersect(), moveSphere(), KDTree::retrySplit(), rotateVec(), WoodShader::Shade(), MarbleShader::Shade(), and CloudShader::Shade().
float Vector3D::y | ( | ) | const [inline] |
Returns the y value of the vector.
Definition at line 69 of file Vector3D.h.
References v.
Referenced by DepthOfFieldCamera::InitRay(), CylindricCamera::InitRay(), Box::Intersect(), AABB::Intersect(), moveSphere(), KDTree::retrySplit(), rotateVec(), WoodShader::Shade(), MarbleShader::Shade(), and CloudShader::Shade().
float Vector3D::z | ( | ) | const [inline] |
Returns the z value of the vector.
Definition at line 77 of file Vector3D.h.
References v.
Referenced by DepthOfFieldCamera::InitRay(), CylindricCamera::InitRay(), Box::Intersect(), AABB::Intersect(), moveSphere(), KDTree::retrySplit(), rotateVec(), WoodShader::Shade(), MarbleShader::Shade(), and CloudShader::Shade().
float & Vector3D::x | ( | ) | [inline] |
float & Vector3D::y | ( | ) | [inline] |
float & Vector3D::z | ( | ) | [inline] |
void Vector3D::SetMin | ( | const Vector3D & | x | ) | [inline] |
Sets the values of this vector to the minimum of its value and x.
Definition at line 120 of file Vector3D.h.
References v.
Referenced by Box::Extend().
void Vector3D::SetMax | ( | const Vector3D & | x | ) | [inline] |
Sets the values of this vector to the maximum of its value and x.
Definition at line 130 of file Vector3D.h.
References v.
Referenced by Box::Extend().
int Vector3D::MaxDim | ( | ) | const [inline] |
Vector3D Vector3D::Abs | ( | ) | [inline] |
Definition at line 140 of file Vector3D.h.
References v, and Vector3D().
Referenced by PlasmaShader::Shade(), and DebugShader::Shade().
float Vector3D::Length | ( | ) | [inline] |
Definition at line 144 of file Vector3D.h.
References Dot.
Referenced by QuadAreaLight::Illuminate(), PointLight::Illuminate(), Normalize(), Normalized(), QuadAreaLight::QuadAreaLight(), UniAxialCrystalShader::Shade(), TransparentShader::Shade(), SteelShader::Shade(), SilverShader::Shade(), GoldShader::Shade(), CopperShader::Shade(), and CenterMapShader::Shade().
Vector3D Vector3D::Inverted | ( | ) | [inline] |
Definition at line 148 of file Vector3D.h.
References v, and Vector3D().
Referenced by AABB::Intersect().
void Vector3D::Normalize | ( | ) | [inline] |
Definition at line 152 of file Vector3D.h.
Referenced by QuadAreaLight::Illuminate(), PointLight::Illuminate(), InfinitePlane::InfinitePlane(), PerspectiveCamera::InitRay(), DepthOfFieldCamera::InitRay(), and QuadAreaLight::QuadAreaLight().
Vector3D Vector3D::Normalized | ( | ) | [inline] |
Definition at line 159 of file Vector3D.h.
References Length(), v, and Vector3D().
Referenced by DepthOfFieldCamera::DepthOfFieldCamera(), Triangle::GetNormal(), Sphere::GetNormal(), SmoothTriangle::GetNormal(), CylindricCamera::InitRay(), PerspectiveCamera::PerspectiveCamera(), BumpMappedWoodPhongShader::Shade(), BumpMappedPhongShader::Shade(), BumpMappedMarblePhongShader::Shade(), and BumpMappedDebugShader::Shade().
Vector3D Vector3D::operator- | ( | ) | [inline] |
Vector3D Vector3D::operator * | ( | const float | f | ) | [inline] |
Vector3D& Vector3D::operator *= | ( | const float | f | ) | [inline] |
vector product
Definition at line 215 of file Vector3D.h.
component-wise product
Definition at line 210 of file Vector3D.h.
scale vector
Definition at line 222 of file Vector3D.h.
float Vector3D::v[3] [private] |
Definition at line 201 of file Vector3D.h.
Referenced by Abs(), Inverted(), MaxDim(), Normalize(), Normalized(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator[](), SetMax(), SetMin(), Vector3D(), x(), y(), and z().