|
|
template<typename S > |
| Nimble::Vector3T< S > | cast () const |
| | Cast the vector to another type. |
| |
|
Vector3T & | clamp (T low, T high) |
| | Clamps all components to the range [low, high]. |
| |
|
Vector3T & | clampUnit (void) |
| | Clamps components to range [0,1]. |
| |
|
void | clear (void) |
| | Fills the vector with zeroes. |
| |
|
T * | data () |
| | Returns a pointer to the first element. |
| |
|
const T * | data () const |
| | Returns a pointer to the first element. |
| |
|
Vector3T & | descale (const Vector3T &v) |
| | Divide component-wise. |
| |
|
T & | get (size_t i) |
| | Multiply component-wise. |
| |
|
const T & | get (size_t i) const |
| | Multiply component-wise. |
| |
|
bool | isOne (void) const |
| | Check if all components are one. |
| |
|
bool | isZero (void) const |
| | Check if all components are zero. |
| |
|
double | length (void) const |
| | Returns the length of the vector. |
| |
|
double | lengthSqr (void) const |
| | Returns the squared length of the vector. |
| |
|
Vector3T & | make (const Vector2T< T > &v, T cz) |
| | Sets the vector to given values. |
| |
|
Vector3T & | make (T cx, T cy, T cz) |
| | Sets the vector to given values. |
| |
|
Vector3T & | make (T xyz) |
| | Fills the vector with given value. |
| |
|
T | maximum () const |
| | Returns the largest component. |
| |
|
T | minimum () const |
| | Returns the smallest component. |
| |
|
Vector3T & | negate (void) |
| | Returns the negation of the vector. |
| |
| Vector3T & | normalize (double len=1.0) |
| | Normalizes the vector to the given length. More... |
| |
| Vector3T | normalized (double len=1.0) const |
| | Get a vector normalized to given length. More... |
| |
|
bool | operator!= (const Vector3T &src) const |
| | Compares if two vectors differ. |
| |
|
Vector3T | operator* (T s) const |
| | Multiplies a vector with a scalar. |
| |
|
Vector3T & | operator*= (T s) |
| | Multiplies a vector with a scalar. |
| |
|
Vector3T | operator+ (const Vector3T &v) const |
| | Adds two vectors. |
| |
|
Vector3T & | operator+= (const Vector3T &v) |
| | Adds two vectors. |
| |
|
Vector3T | operator- (const Vector3T &v) const |
| | Subtract two vectors. |
| |
|
Vector3T | operator- () const |
| | Returns the negation of the vector. |
| |
|
Vector3T & | operator-= (const Vector3T &v) |
| | Subtract two vectors. |
| |
|
Vector3T | operator/ (T s) const |
| | Divides a vector with a scalar. |
| |
|
Vector3T & | operator/= (T s) |
| | Divides a vector with a scalar. |
| |
|
bool | operator== (const Vector3T &src) const |
| | Compares if two vectors are equal. |
| |
|
const T & | operator[] (size_t i) const |
| | Returns the ith component. |
| |
|
T & | operator[] (size_t i) |
| | Multiply component-wise. |
| |
|
Vector3T & | scale (const Vector3T &v) |
| | Multiply component-wise. |
| |
|
void | set (size_t i, T v) |
| | Sets the ith component. |
| |
|
Vector3T | shuffle (int i1, int i2, int i3) const |
| | Returns a vector with components reordered. |
| |
|
T | sum () const |
| | Sum of all components. |
| |
| Vector2T< T > | vector2 () const |
| | Returns a copy of the first two components as a Vector2. More... |
| |
| Vector2T< T > | vector2 (int i0, int i1) const |
| | Makes a new Nimble::Vector2f of two freely selected components of vector3. More... |
| |
|
| Vector3T (T cx, T cy, T cz) |
| | Constructs a vector initializing it to given values. |
| |
|
| Vector3T (const Vector2T< T > &v, T az) |
| | Constructs a vector using a 2d vector and a scalar component. |
| |
template<typename T>
class Nimble::Vector3T< T >
Three-dimensional vector class for 3D mathematics.