Helper class to indicate 3D angles in radians Allows for converting quaternions to human readable angles easily (and back to a quaternion) More...
Inherits IEquatable< Angles3 >.
Public Member Functions | |
Angles3 (float xAngle, float yAngle, float zAngle) | |
Creates a new Angles3 object from three xyz radians. More... | |
Angles3 (Quaternion quat) | |
Creates a new Angles3 object from a Quaternion. More... | |
override int | GetHashCode () |
Returns the hashcode of this instance. More... | |
override bool | Equals (object obj) |
Returns true if this Angles3 is equal to the specified object. More... | |
bool | Equals (Angles3 other) |
Returns true if this Angles3 is equal to the specified Angles3. More... | |
override string | ToString () |
Returns this Angles3 in a formatted string. The format is "{X}, {Y}, {Z}". More... | |
Static Public Member Functions | |
static implicit | operator Vec3 (Angles3 angles) |
Impicit converter from Angles3 to Vec3. More... | |
static implicit | operator Ang3 (Angles3 angles) |
Impicit converter from Angles3 to Ang3. More... | |
static implicit | operator Angles3 (Ang3 angles) |
Impicit converter from Ang3 to Angles3. More... | |
static implicit | operator Angles3 (Vec3 angles) |
Impicit converter from Vec3 to Angles3. More... | |
static implicit | operator Angles3 (Vector3 angles) |
Impicit converter from Vector3 to Angles3. More... | |
static implicit | operator Vector3 (Angles3 angles) |
Impicit converter from Angles3 to Vector3. More... | |
static Angles3 | operator* (Angles3 v, float scale) |
Scale the angles by the value of scale . More... | |
static Angles3 | operator* (float scale, Angles3 v) |
Scale the angles by the value of scale More... | |
static Angles3 | operator/ (Angles3 v, float scale) |
Divides the angles by scale . More... | |
static Angles3 | operator+ (Angles3 v0, Angles3 v1) |
Combine two Angles3 component wise together. More... | |
static Angles3 | operator- (Angles3 v0, Angles3 v1) |
Subtract two Angles3 component wise from eachother. More... | |
static Angles3 | operator- (Angles3 v) |
Flip the values of the Angles3. More... | |
static Angles3 | operator! (Angles3 v) |
Flip the values of the Angles3. More... | |
static bool | operator== (Angles3 left, Angles3 right) |
Compare two values of Angles3 component wise. Returns true if both are equal. More... | |
static bool | operator!= (Angles3 left, Angles3 right) |
Compare two values of Angles3 component wise. Returns true if both are inequal. More... | |
Properties | |
float | x [get, set] |
The x-axis angle. More... | |
float | y [get, set] |
The y-axis angle. More... | |
float | z [get, set] |
The z-axis angle. More... | |
float | X [get, set] |
The x-axis angle. More... | |
float | Y [get, set] |
The y-axis angle. More... | |
float | Z [get, set] |
The z-axis angle. More... | |
Angles3 | Absolute [get] |
Returns a new Angles3 with absolute values. More... | |
Angles3 | Flipped [get] |
Returns a new Angles3 with flipped values. More... | |
Vector3 | ViewDirection [get] |
Converts the yaw and pitch to a view direction. x=yaw y=pitch z=roll (we ignore this element, since its not possible to convert the roll-component into a vector) More... | |
Quaternion | Quaternion [get] |
Get this Angles3 as a Quaternion. More... | |
float | this[int index] [get, set] |
Gets individual axes by index More... | |
Helper class to indicate 3D angles in radians Allows for converting quaternions to human readable angles easily (and back to a quaternion)
|
inline |
Creates a new Angles3 object from three xyz radians.
xAngle | |
yAngle | |
zAngle |
|
inline |
Creates a new Angles3 object from a Quaternion.
quat |
|
inline |
|
inline |
|
inline |
Returns the hashcode of this instance.
|
inline static |
Impicit converter from Angles3 to Ang3.
angles |
|
inline static |
Impicit converter from Ang3 to Angles3.
angles |
|
inline static |
Impicit converter from Vec3 to Angles3.
angles |
|
inline static |
Impicit converter from Angles3 to Vec3.
angles |
|
inline static |
Compare two values of Angles3 component wise. Returns true if both are inequal.
left | |
right |
Scale the angles by the value of scale .
v | |
scale |
Scale the angles by the value of scale
scale | |
v |
Divides the angles by scale .
v | |
scale |
Compare two values of Angles3 component wise. Returns true if both are equal.
left | |
right |
|
inline |
Returns this Angles3 in a formatted string. The format is "{X}, {Y}, {Z}".
|
get |
Get this Angles3 as a Quaternion.
|
get set |
Gets individual axes by index
index | Index, 0 - 2 where 0 is X and 2 is Z |
|
get |
Converts the yaw and pitch to a view direction. x=yaw y=pitch z=roll (we ignore this element, since its not possible to convert the roll-component into a vector)
The view direction.
|
get set |
The x-axis angle.
|
get set |
The x-axis angle.
|
get set |
The y-axis angle.
|
get set |
The y-axis angle.
|
get set |
The z-axis angle.
|
get set |
The z-axis angle.