#include <vmath.h>
Public Member Functions | |
| Vector3 () | |
| Vector3 (T nx, T ny, T nz) | |
| Vector3< T > | operator= (const Vector3< T > &rhs) |
| T & | operator[] (int n) |
| Vector3< T > | operator+ (const Vector3< T > &rhs) const |
| Vector3< T > | operator- (const Vector3< T > &rhs) const |
| Vector3< T > | operator * (const Vector3< T > &rhs) const |
| Vector3< T > | operator/ (const Vector3< T > &rhs) const |
| Vector3< T > & | operator+= (const Vector3< T > &rhs) |
| Vector3< T > & | operator-= (const Vector3< T > &rhs) |
| Vector3< T > & | operator *= (const Vector3< T > &rhs) |
| Vector3< T > & | operator/= (const Vector3< T > &rhs) |
| T | dotProduct (const Vector3< T > &rhs) const |
| Vector3< T > | crossProduct (const Vector3< T > &rhs) const |
| Vector3< T > | operator+ (T rhs) const |
| Vector3< T > | operator- (T rhs) const |
| Vector3< T > | operator * (T rhs) const |
| Vector3< T > | operator/ (T rhs) const |
| Vector3< T > & | operator+= (T rhs) |
| Vector3< T > & | operator-= (T rhs) |
| Vector3< T > & | operator *= (T rhs) |
| Vector3< T > & | operator/= (T rhs) |
| bool | operator== (const Vector3< T > &rhs) const |
| bool | operator!= (const Vector3< T > &rhs) const |
| T | length () const |
| T | lengthSq () const |
| void | normalize () |
| void | rotate (T ax, T ay, T az) |
| Vector3< T > | lerp (T fact, const Vector3< T > &r) const |
| operator T * () | |
| operator const T * () const | |
Friends | |
| std::ostream & | operator<< (std::ostream &lhs, const Vector3< T > rhs) |
Creates and sets to (x,y,z)
| nx | intial x-coordinate value | |
| ny | intial y-coordinate value | |
| nz | intial z-coordinate value |
Copy operator
| rhs | Right hand side argument of binary operator. |
| T& Vector3< T >::operator[] | ( | int | n | ) | [inline] |
Array access operator
| n | Array index |
Addition operator
| rhs | Right hand side argument of binary operator. |
Substraction operator
| rhs | Right hand side argument of binary operator. |
Multiplication operator
| rhs | Right hand side argument of binary operator. |
Division operator
| rhs | Right hand side argument of binary operator. |
Addition operator
| rhs | Right hand side argument of binary operator. |
Substraction operator
| rhs | Right hand side argument of binary operator. |
Multiplication operator
| rhs | Right hand side argument of binary operator. |
Division operator
| rhs | Right hand side argument of binary operator. |
Dot product of two vectors.
| rhs | Right hand side argument of binary operator. |
Cross product opertor
| rhs | Right hand side argument of binary operator. |
Addition operator
| rhs | Right hand side argument of binary operator. |
Substraction operator
| rhs | Right hand side argument of binary operator. |
Multiplication operator
| rhs | Right hand side argument of binary operator. |
Division operator
| rhs | Right hand side argument of binary operator. |
Addition operator
| rhs | Right hand side argument of binary operator. |
Substraction operator
| rhs | Right hand side argument of binary operator. |
Multiplication operator
| rhs | Right hand side argument of binary operator. |
Division operator
| rhs | Right hand side argument of binary operator. |
Equality test operator
| rhs | Right hand side argument of binary operator. |
Inequality test operator
| rhs | Right hand side argument of binary operator. |
| T Vector3< T >::length | ( | ) | const [inline] |
Get lenght of vector.
| T Vector3< T >::lengthSq | ( | ) | const [inline] |
| void Vector3< T >::normalize | ( | ) | [inline] |
Normalize vector
| void Vector3< T >::rotate | ( | T | ax, | |
| T | ay, | |||
| T | az | |||
| ) | [inline] |
Rotate vector around three axis.
| ax | Angle (in degrees) to be rotated around X-axis. | |
| ay | Angle (in degrees) to be rotated around Y-axis. | |
| az | Angle (in degrees) to be rotated around Z-axis. |
Linear interpolation of two vectors
| fact | Factor of interpolation. For translation from positon of this vector to vector r, values of factor goes from 0.0 to 1.0. | |
| r | Second Vector for interpolation |
| Vector3< T >::operator T * | ( | ) | [inline] |
Conversion to pointer operator
| Vector3< T >::operator const T * | ( | ) | const [inline] |
Conversion to pointer operator
| std::ostream& operator<< | ( | std::ostream & | lhs, | |
| const Vector3< T > | rhs | |||
| ) | [friend] |
Output to stream operator
| lhs | Left hand side argument of operator (commonly ostream instance). | |
| rhs | Right hand side argument of operator. |
First element of vector, alias for S-coordinate. For textures notation.
First element of vector, alias for R-coordinate. For color notation.
Second element of vector, alias for T-coordinate. For textures notation.
Second element of vector, alias for G-coordinate. For color notation.
Third element of vector, alias for U-coordinate. For textures notation.
Third element of vector, alias for B-coordinate. For color notation.
1.5.1-p1