[Serializable] public struct
A Quaternion rotation implementation defined by Pitch, Yaw and Roll in degrees.
public float
Pitch
The rotation in degrees around the X axis. 0 = Forward, +Up, -Down.
public float
Yaw
The rotation in degrees around the Y axis. 0 = Straight, +Right, -Left.
public float
Roll
The rotation in degrees around the Z axis. 0 = Up is 12 o'clock, +Clockwise, -Counter-clockwise.
public static readonly MRotator
Neutral
An MRotator with no rotation.
kEpsilon
Rotator floating-point precision.
Summary:
Makes a rotation with Pitch, Yaw and Roll.
Params:
P:
Pitch.
Y:
Yaw.
R:
Roll.
Summary:
Makes a rotation with an MVector.
Params:
PYR:
An MVector where X = Pitch, Y = Yaw, and Z = Roll.
Summary:
Makes an MRotator with a Quaternion.
Params:
Quaternion:
The Quaternion defining the Pitch, Yaw, and Roll.
public Quaternion
Summary:
Computes a Quaternion with a rotation of Pitch, Yaw and Roll.
Returns:
A Quaternion with Pitch, Yaw, Roll.
public Quaternion
Summary:
Computes a Quaternion with a rotation of Pitch, Yaw and Roll.
Params:
T:
The Transform to combine with.
Returns:
A Quaternion combining T's Rotation with this Pitch, Yaw, and Roll.
public MRotator
Summary:
Computes a Rotator combining T's Rotation with Pitch, Yaw, and Roll.
Params:
T:
The Transform to combine with.
Returns:
An MRotator combining T's Rotation with this Pitch, Yaw, and Roll.
public MRotator
Summary:
Computes a Rotator relative to a directional Vector and Up Vector.
Remarks:
Suppose UpVector is the Positive Y-Axis.
Params:
Vector:
Relative facing direction.
UpVector:
Global Up Vector.
Returns:
An MRotator rotated relative to a Vector with respect to Up.
public static MRotator
Summary:
Converts a Quaternion to an MRotator.
Params:
Q:
The Quaternion to extract Pitch, Yaw and Roll.
Returns:
An MRotator rotated according to a Quaternion.
public static MRotator
Summary:
Gets the rotation required to look towards a direction with an up.
Params:
Direction:
The direction to look towards.
Up:
The up vector to rotate about.
Returns:
An MRotator rotation towards Direction about Up.
public MRotator
Summary:
Adds a rotation to the respective rotation component.
Returns:
This MRotator after adding the deltas.
public MRotator
Summary:
Adds an MRotator to this MRotator on their respective components.
Params:
DeltaPYR:
The MRotator to add.
Returns:
See Add(float DeltaPitch, float DeltaYaw, float DeltaRoll).
public MRotator
Summary:
The opposite of this MRotator over OpposeAxes.
Params:
OpposeAxes:
The axes to oppose.
Returns:
An MRotator in the opposite direction over the supplied axes.
public static MRotator
Summary:
Interpolates between two MRotators.
Params:
From:
The beginning rotation.
To:
The target rotation.
Alpha:
The percentage of interpolation.
Equation:
The equation to interpolate. Default is Linear.
Returns:
An interpolated MRotator between From and To.
public static MRotator
Summary:
Interpolates between two MRotators.
Params:
From:
The beginning rotation.
To:
The target rotation.
Alpha:
The percentage of interpolation.
Curve:
The curve describing the speed of the interpolation.
Returns:
An interpolated MRotator between From and To.
public MVector
Summary:
An MVector where X = Pitch, Y = Yaw, Z = Roll.
public MVector
Summary:
Gets the direction this MRotator is facing when facing forward.
Params:
Forward:
Forward orientation.
Returns:
An MVector direction representing this Rotation.
public MVector
Summary:
This Rotator as a directional Vector.
Returns:
An normalised MVector describing this MRotator.
public void
Summary:
This MRotator % 360 on all components.
public MRotator
Summary:
Forces the Angles to be within 0 - 360 degrees.
Returns:
The normalised MRotator.
public bool
Summary:
If this MRotator is Neutral, considering ZeroThreshold.
Params:
ZeroThreshold:
The threshold to consider Zero. Default = kEpsilon.
Returns:
True if this MRotator is considered Neutral.
public static bool
Summary:
Checks R's components for NaN.
Params:
R:
The vector to check.
Returns:
True if R contains NaN.
public static MRotator operator+
Summary:
Adds two MRotators together.
Params:
L:
Left-side MRotator.
R:
Right-side MRotator.
Returns:
(MRotator L, MRotator R) => L.Add(R)
public static MRotator operator-
Summary:
Subtracts R from L.
Params:
L:
Left-side MRotator.
R:
Right-side MRotator.
Returns:
L.Add(-R).
public static MRotator operator*
Summary:
Multiplies an MRotator by a Scalar value.
Params:
R:
Rotator.
S:
Scalar.
Returns:
R[P..Y..R] * S.
public static MRotator operator*
Summary:
Apply Rotations L and R in sequence.
Remarks:
MRotator multiplications are not commutative. L * R != R * L.
Params:
L:
First rotation.
R:
Second rotation.
Returns:
An MRotator L rotated by R.
public static bool operator==
Summary:
Compares two MRotators for equality.
Params:
Left:
Left-side comparison.
Right:
Right-side comparison.
Returns:
True if the square difference between Left and Right is less than kEpsilon ^ 2.
public static bool operator!=
Summary:
Compares two MRotators for inequality.
Params:
Left:
Left-side comparison.
Right:
Right-side comparison.
Returns:
The opposite of operator ==.
public static implicit operator Quaternion
Summary:
Converts Pitch, Yaw, Roll into its corresponding Quaternion.
public static MVector operator*
Summary:
Rotate Vector by Rotation.
public static Vector3 operator*
Summary:
Rotate Vector by Rotation.
public override int
Summary:
Hash code for use in Maps, Sets, MArrays, etc.
Returns:
GetHashCode() => Pitch.GetHashCode() ^ (Yaw.GetHashCode() << 2) ^ (Roll.GetHashCode() >> 2)
public override string
Summary:
A human-readable MRotator.
Returns:
"Pitch: " + Pitch + " Yaw: " + Yaw + " Roll: " + Roll
public enum : byte
Rotation axes.
NoAxis
No Rotation axis.
Pitch
Rotation axis describing Pitch.
Yaw
Rotation axis describing Yaw.
Roll
Rotation axis describing Roll.