struct
#include <Spore ModAPI/Spore/MathUtils.h>
Vector3 A vector of 3 float values (x, y, z).
Public static variables
Public static functions
Constructors, destructors, conversion operators
Public functions
- auto Length() const -> float
- Returns the length of the vector, computed as the square root of then sum of its components squared.
- auto SquaredLength() const -> float
- Similar to Length(), but without applying the square root.
- auto Normalized() const -> Vector3
- Returns a normalized version of this vector. Being normalized means it has a length of 1.0.
- auto Dot(const Vector3& other) const -> float
- Computes the dot product between this vector and
other
. - auto Cross(const Vector3& other) const -> Vector3
- Computes the cross product between this vector and
other
. - auto AngleTo(const Vector3& other) const -> float
- Returns the angle between two vectors in radians, in the range [0, PI].
- auto operator+=(const Vector3&) -> Vector3&
- VECTOR 3.
- auto operator+=(float) -> Vector3&
- auto operator-=(const Vector3&) -> Vector3&
- auto operator-=(float) -> Vector3&
- auto operator*=(float) -> Vector3&
- auto operator/=(float) -> Vector3&
- auto operator==(const Vector3& b) const -> bool
- auto operator!=(const Vector3& b) const -> bool
Public variables
Function documentation
static float Math:: Vector3:: OrientedAngle(const Vector3& v1,
const Vector3& v2,
const Vector3& orientationAxis)
Returns the oriented angle between the vectors v1
and v2
, in the range [0, 2pi).
Parameters | |
---|---|
v1 | |
v2 | |
orientationAxis |
An additional vector must be passed to determine which is the orientation (i.e. whether a positive angle moves from v1
to v2
or the other way around), following the "right hand rule".