|
| | Vector4 (double w, double x, double y, double z) |
| | Create vector from components.
|
| |
| | Vector4 (const Vector4 &from) |
| | Copy constructor.
|
| |
| | Vector4 (double w, const Vector3 &vec3) |
| | Create from scalar and 3D vector.
|
| |
| | Vector4 (double v) |
| | Create vector with all components equal.
|
| |
|
| Vector4 () |
| | Create zero vector.
|
| |
|
Vector4 | Get () const |
| | Get copy of this vector.
|
| |
|
double | Magnitude () const |
| | Get vector length.
|
| |
|
Vector4 & | Normalize () |
| | Normalize this vector.
|
| |
|
Vector4 | Normalized () const |
| | Get normalized copy.
|
| |
|
Vector4 | operator+ (const Vector4 &other) const |
| | Addition.
|
| |
|
Vector4 | operator- (const Vector4 &other) const |
| | Subtraction.
|
| |
|
Vector4 | operator- () const |
| | Negation.
|
| |
|
Vector4 & | operator+= (const Vector4 &other) |
| | Add-assign.
|
| |
|
Vector4 & | operator-= (const Vector4 &other) |
| | Subtract-assign.
|
| |
|
Vector4 | operator* (const double &other) const |
| | Scalar multiplication.
|
| |
|
Vector4 | operator/ (const double &other) const |
| | Scalar division.
|
| |
|
bool | operator== (const Vector4 &other) const |
| | Equality comparison.
|
| |
|
| operator std::string () const |
| | Convert to string.
|
| |
|
| operator Quaternion () const |
| | Convert to Quaternion.
|
| |
|
const float * | data () const |
| | Get raw float array.
|
| |
4D vector class
Represents a point or direction in 4D space. Used for homogeneous coordinates and quaternion math.