#include <CVector3f.h>
Public Member Functions | |
| CVector3f (float a=0, float b=0, float c=0) | |
| CVector3f (const CVector3f &v) | |
| float & | operator[] (int i) |
| float | Norm () const |
| void | Normalize () |
| CVector3f | operator+ (const CVector3f &v) const |
| CVector3f | operator- (const CVector3f &v) const |
| float | operator * (const CVector3f &v) const |
| CVector3f | operator^ (const CVector3f &v) const |
| CVector3f | operator * (float k) const |
| CVector3f | operator/ (float k) const |
| CVector3f | operator>> (const CVector3f &v) const |
| CVector3f | operator- () const |
| CVector3f & | operator+= (const CVector3f &v) |
| CVector3f & | operator-= (const CVector3f &v) |
| CVector3f & | operator^= (const CVector3f &v) |
| CVector3f & | operator *= (float k) |
| CVector3f & | operator/= (float k) |
| CVector3f & | operator>>= (const CVector3f &v) |
Public Attributes | |
| float | x |
| float | y |
| float | z |
Friends | |
| CVector3f | operator * (float k, const CVector3f &v) |
Definition at line 20 of file CVector3f.h.
| CVector3f::CVector3f | ( | float | a = 0, |
|
| float | b = 0, |
|||
| float | c = 0 | |||
| ) | [inline] |
The CVector3f class parameter constructor. It does only simple member assignment.
Definition at line 31 of file CVector3f.h.
Referenced by operator *(), operator+(), operator-(), operator/(), operator>>(), operator^(), and operator^=().
| CVector3f::CVector3f | ( | const CVector3f & | v | ) | [inline] |
| float& CVector3f::operator[] | ( | int | i | ) | [inline] |
This operator return a reference to the coordinate corresponding to the index.
Definition at line 45 of file CVector3f.h.
| float CVector3f::Norm | ( | ) | const [inline] |
This function calculates the lenght of the vector.
.
Definition at line 61 of file CVector3f.h.
Referenced by CRenderObj::GetPixelColor(), and CRenderObj::GetStartingPoint().
| void CVector3f::Normalize | ( | ) | [inline] |
This function normalizes the vector.
.
Definition at line 71 of file CVector3f.h.
Referenced by CRenderObj::GetPixelColor(), and CVectBase::Update().
This operator adds two vectors.
Definition at line 80 of file CVector3f.h.
References CVector3f(), x, y, and z.
This operator substracts two vectors.
Definition at line 90 of file CVector3f.h.
References CVector3f(), x, y, and z.
| float CVector3f::operator * | ( | const CVector3f & | v | ) | const [inline] |
This operator returns the cross product of two vectors.
Definition at line 117 of file CVector3f.h.
References CVector3f(), x, y, and z.
| CVector3f CVector3f::operator * | ( | float | k | ) | const [inline] |
This operator returns the product of a vector and a scalar.
Definition at line 127 of file CVector3f.h.
References CVector3f(), x, y, and z.
| CVector3f CVector3f::operator/ | ( | float | k | ) | const [inline] |
This operator returns a vector divised by a scalar.
Definition at line 139 of file CVector3f.h.
References CVector3f(), x, y, and z.
This operator projects a vector on another one.
Definition at line 150 of file CVector3f.h.
References CVector3f(), x, y, and z.
| CVector3f CVector3f::operator- | ( | ) | const [inline] |
This operator returns the opposite of a vector
Definition at line 161 of file CVector3f.h.
References CVector3f(), x, y, and z.
This operator is the same as + with an additionnal assignment.
Definition at line 170 of file CVector3f.h.
This operator is the same as - with an additionnal assignment.
Definition at line 181 of file CVector3f.h.
This operator is the same as ^ with an additionnal assignment.
Definition at line 192 of file CVector3f.h.
References CVector3f(), x, y, and z.
| CVector3f& CVector3f::operator *= | ( | float | k | ) | [inline] |
This operator is the same as * with an additionnal assignment.
Definition at line 201 of file CVector3f.h.
| CVector3f& CVector3f::operator/= | ( | float | k | ) | [inline] |
This operator is the same as / with an additionnal assignment.
Definition at line 212 of file CVector3f.h.
This operator is the same as >> with an additionnal assignment.
Definition at line 223 of file CVector3f.h.
This operator returns the product of a scalar and a vector.
Definition at line 240 of file CVector3f.h.
| float CVector3f::x |
x coordinate.
Definition at line 23 of file CVector3f.h.
Referenced by CVariable::Compute(), CVector3f(), CRenderObj::GetCloseToBoundingBox(), CRenderObj::GetPixelColor(), CRenderObj::InBoundingBox(), Norm(), Normalize(), operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), operator>>=(), operator[](), operator^(), operator^=(), CVectBase::Update(), and CRenderObj::Validate().
| float CVector3f::y |
y coordinate.
Definition at line 24 of file CVector3f.h.
Referenced by CVariable::Compute(), CVector3f(), CRenderObj::GetCloseToBoundingBox(), CRenderObj::GetPixelColor(), CRenderObj::InBoundingBox(), Norm(), Normalize(), operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), operator>>=(), operator[](), operator^(), operator^=(), CVectBase::Update(), and CRenderObj::Validate().
| float CVector3f::z |
z coordinate.
Definition at line 25 of file CVector3f.h.
Referenced by CVariable::Compute(), CVector3f(), CRenderObj::GetCloseToBoundingBox(), CRenderObj::GetPixelColor(), CRenderObj::InBoundingBox(), Norm(), Normalize(), operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), operator>>=(), operator[](), operator^(), operator^=(), and CRenderObj::Validate().
1.5.4