|
|
Class for describing points, normal vectors, direction vectors in 3D space.
| Vector3 positiveInfinit ()
| positiveInfinit |
[static]
Returns vector describing (positive) infinit point.
| Vector3 negativeInfinit ()
| negativeInfinit |
[static]
Returns vector describing (negative) infinit point.
| DBL a[3] | a[3] |
| Vector3 ()
| Vector3 |
Create uninitialized vector
| Vector3 (DBL w)
| Vector3 |
Create vector with same coifficients.
Parameters:
| w | value for all coifficients. |
| Vector3 (DBL x, DBL y, DBL z)
| Vector3 |
Create vector from given coifficients.
| void add (const Vector3 &v)
| add |
Add vector.
| void sub (const Vector3 &v)
| sub |
Subtract vector.
| void scale (DBL s)
| scale |
Scale vecotr by scalar.
| void normalize ()
| normalize |
Normalize vector. Scale vector so that its length is 1.
| void inverse ()
| inverse |
Inverse vector componentwise. Calculates 1/a for all coifficients.
| void applyFromLeft (const Matrix &m)
| applyFromLeft |
Calculate v -> M*v.
Parameters:
| m | matrix M |
| void applyFromLeftTransposed (const Matrix &m)
| applyFromLeftTransposed |
Calculate v -> M^T * v.
Parameters:
| m | matrix M |
| void minimize (const Vector3 &v)
| minimize |
Minimize vector components.
| void maximize (const Vector3 &v)
| maximize |
Maximize vector components.
| Vector3 scaled (DBL s)
| scaled |
[const]
Returns: vector scaled by scalar s
| double lengthSq ()
| lengthSq |
[const]
Returns: length in square
| double length ()
| length |
[const]
Returns: length of vector
| bool equals (const Vector3& v)
| equals |
[const]
Compare vector to other vector
| bool operator< (const Vector3& v)
| operator< |
[const]
Introduce order between vectors.
| DBL dotProd (const Vector3& v, const Vector3 &w)
| dotProd |
[static]
Calculate dot product of two vectors.
| Vector3 add (const Vector3& v, const Vector3 &w)
| add |
[static]
Add two vectors.
| Vector3 sub (const Vector3& v, const Vector3 &w)
| sub |
[static]
Subtract two vectors.