|
Momentum Scripting v1
|
#include <Vec4.h>
Public Types | |
| typedef double | Type |
Public Member Functions | |
| Vec4 () | |
| Vec4 (const double v[4]) | |
| Vec4 (const Vec3 &v3, double w) | |
| Vec4 (const Vec4 ©) | |
| Vec4 (double r) | |
| Vec4 (double x, double y, double z, double w) | |
| Vec3 | asVec3 () const |
| void | clamp (const Vec4 &min, const Vec4 &max) |
| double | distance (const Vec4 &v2) const |
| double | distance2 (const Vec4 &v2) const |
| bool | equalsZero () const |
| bool | isFinite () const |
| bool | isNaN () const |
| bool | isValid () const |
| double | length () const |
| double | length2 () const |
| double | maxComponent () const |
| int | maxElement () const |
| double | minComponent () const |
| int | minElement () const |
| double | normalize () |
| bool | operator!= (const Vec4 &v) const |
| double | operator* (const Vec4 &rhs) const |
| const Vec4 | operator* (double rhs) const |
| Vec4 & | operator*= (double rhs) |
| const Vec4 | operator+ (const double &rhs) const |
| const Vec4 | operator+ (const Vec4 &rhs) const |
| Vec4 & | operator+= (const double &rhs) |
| Vec4 & | operator+= (const Vec4 &rhs) |
| const Vec4 | operator- () const |
| const Vec4 | operator- (const double &rhs) const |
| const Vec4 | operator- (const Vec4 &rhs) const |
| Vec4 & | operator-= (const double &rhs) |
| Vec4 & | operator-= (const Vec4 &rhs) |
| const Vec4 | operator/ (double rhs) const |
| Vec4 & | operator/= (double rhs) |
| bool | operator== (const Vec4 &v) const |
| double & | operator[] (int i) |
| const double & | operator[] (int i) const |
| const Vec4 | operator| (const Vec4 &rhs) const |
| void | set (const Vec4 &rhs) |
| void | set (double value) |
| void | set (double x, double y, double z, double w) |
| void | setW (double value) |
| void | setX (double value) |
| void | setY (double value) |
| void | setZ (double value) |
| double | w () const |
| double | x () const |
| double | y () const |
| double | z () const |
Static Public Member Functions | |
| static Vec4 | componentMax (const Vec4 &v1, const Vec4 &v2) |
| static Vec4 | componentMin (const Vec4 &v1, const Vec4 &v2) |
| static Vec4 | random (const Vec4 &min, const Vec4 &max) |
| static Vec4 | random (double min, double max) |
A 4 dimensional vector and contains basic arithmetic.
| typedef double MOMENTUM_NAMESPACE::Vec4::Type |
| MOMENTUM_NAMESPACE::Vec4::Vec4 | ( | const Vec4 & | copy | ) |
Copy constructor.
| MOMENTUM_NAMESPACE::Vec4::Vec4 | ( | ) |
Default constructor.
|
explicit |
Constructor, fill all elements with scalar r.
| MOMENTUM_NAMESPACE::Vec4::Vec4 | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | w | ||
| ) |
Constructor, initialize elements with the specified scalars.
|
explicit |
Constructor, initialize elements with the specified scalars.
| MOMENTUM_NAMESPACE::Vec4::Vec4 | ( | const Vec3 & | v3, |
| double | w | ||
| ) |
Constructor, initialize the first three elements with v3 and the last with w.
Clamp a vector between a lower and upper bound (per component).
| double MOMENTUM_NAMESPACE::Vec4::distance | ( | const Vec4 & | v2 | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::distance2 | ( | const Vec4 & | v2 | ) | const |
| bool MOMENTUM_NAMESPACE::Vec4::equalsZero | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Vec4::isFinite | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Vec4::isNaN | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Vec4::isValid | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::length | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::length2 | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::maxComponent | ( | ) | const |
| int MOMENTUM_NAMESPACE::Vec4::maxElement | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::minComponent | ( | ) | const |
| int MOMENTUM_NAMESPACE::Vec4::minElement | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::normalize | ( | ) |
Normalize the vector so that it has length unity.
| bool MOMENTUM_NAMESPACE::Vec4::operator!= | ( | const Vec4 & | v | ) | const |
In-equality test.
| double MOMENTUM_NAMESPACE::Vec4::operator* | ( | const Vec4 & | rhs | ) | const |
| const Vec4 MOMENTUM_NAMESPACE::Vec4::operator* | ( | double | rhs | ) | const |
rhs. | Vec4 & MOMENTUM_NAMESPACE::Vec4::operator*= | ( | double | rhs | ) |
rhs | const Vec4 MOMENTUM_NAMESPACE::Vec4::operator+ | ( | const double & | rhs | ) | const |
Binary vector add.
| Vec4 & MOMENTUM_NAMESPACE::Vec4::operator+= | ( | const double & | rhs | ) |
Unary vector add.
Slightly more efficient because no temporary intermediate object.
Unary vector add.
Slightly more efficient because no temporary intermediate object.
| const Vec4 MOMENTUM_NAMESPACE::Vec4::operator- | ( | ) | const |
Negation operator.
Returns the negative of the Vec4.
| const Vec4 MOMENTUM_NAMESPACE::Vec4::operator- | ( | const double & | rhs | ) | const |
Binary vector subtract.
| Vec4 & MOMENTUM_NAMESPACE::Vec4::operator-= | ( | const double & | rhs | ) |
Unary vector subtract.
| const Vec4 MOMENTUM_NAMESPACE::Vec4::operator/ | ( | double | rhs | ) | const |
Divide by scalar.
| Vec4 & MOMENTUM_NAMESPACE::Vec4::operator/= | ( | double | rhs | ) |
rhs. | bool MOMENTUM_NAMESPACE::Vec4::operator== | ( | const Vec4 & | v | ) | const |
Equality test.
| double & MOMENTUM_NAMESPACE::Vec4::operator[] | ( | int | i | ) |
| const double & MOMENTUM_NAMESPACE::Vec4::operator[] | ( | int | i | ) | const |
min..max]
|
static |
min..max] | void MOMENTUM_NAMESPACE::Vec4::set | ( | const Vec4 & | rhs | ) |
Set the value of the vector with rhs.
| void MOMENTUM_NAMESPACE::Vec4::set | ( | double | value | ) |
Set all elements of the vector with scalar value value.
| void MOMENTUM_NAMESPACE::Vec4::set | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | w | ||
| ) |
Set the elements of the vector.
| void MOMENTUM_NAMESPACE::Vec4::setW | ( | double | value | ) |
| void MOMENTUM_NAMESPACE::Vec4::setX | ( | double | value | ) |
| void MOMENTUM_NAMESPACE::Vec4::setY | ( | double | value | ) |
| void MOMENTUM_NAMESPACE::Vec4::setZ | ( | double | value | ) |
| double MOMENTUM_NAMESPACE::Vec4::w | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::x | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::y | ( | ) | const |
| double MOMENTUM_NAMESPACE::Vec4::z | ( | ) | const |