Struct Euler4
Rotation unit on each plane in 4D
public struct Euler4 : IEquatable<Euler4>
Remarks
Euler4 is basically a vector with 6 axis (plane), and can be manipulated like other vector. In most cases when dealing with 4D rotations, you'll use Euler4, since it can be represented as an euler rotation, or angular velocity of an object.
Constructors
Euler4(Int32, Single)
Create an euler data with a value for given axis index.
public Euler4(int axis, float value)
Remarks
See Item[Int32] for axis index. Other axis will set as zero by default
Euler4(Single, Single, Single, Single, Single, Single)
Create an euler data with given individual values.
public Euler4(float x, float y, float z, float t, float u, float v)
Euler4(Vector3, Vector3)
Create an euler data with given individual values (with a pair of Vector3).
public Euler4(Vector3 xyz, Vector3 tuv)
Fields
t
XW Plane
public float t
u
YW Plane
public float u
v
ZW Plane
public float v
x
YZ Plane
public float x
y
ZX Plane
public float y
z
XY Plane
public float z
Properties
Item[Int32]
Get or set a vector value in given axis index
public float this[int i] { get; set; }
Remarks
Axis index in order: X, Y, Z, T, U, V
tuv
Get TUV part if the euler
public Vector3 tuv { get; }
xyz
Get XYZ part of the euler
public Vector3 xyz { get; }
zero
Euler with zero values
public static Euler4 zero { get; }
Methods
Cross(Vector4, Vector4)
Creates an euler rotation from two vector
public static Euler4 Cross(Vector4 a, Vector4 b)
Remarks
This method is equivalent to the wedge operation between vector and vector in Geometry Algebra. It is used by internal physics engine.
Dot(Euler4, Euler4)
Get the dot product of the euler
public static float Dot(Euler4 a, Euler4 b)
LengthSq(Euler4)
Get the squared length of the euler
public static float LengthSq(Euler4 v)
LerpAngle(Euler4, Euler4, Single)
Interpolate euler rotation degree from A to B by T in each axes
public static Euler4 LerpAngle(Euler4 a, Euler4 b, float t)
Remarks
This method does loop back from 360 to zero if that's necessary. The interpolation is not clampled.
Operators
Addition(Euler4, Euler4)
Axis-wisely add two euler values
public static Euler4 operator +(Euler4 lhs, Euler4 rhs)
Division(Euler4, Single)
Axis-wisely divide an euler values with a number
public static Euler4 operator /(Euler4 lhs, float f)
Equality(Euler4, Euler4)
Equivalence check
public static bool operator ==(Euler4 lhs, Euler4 rhs)
Inequality(Euler4, Euler4)
Inequivalence check
public static bool operator !=(Euler4 lhs, Euler4 rhs)
Multiply(Euler4, Euler4)
Axis-wisely scale both euler.
public static Euler4 operator *(Euler4 a, Euler4 b)
Multiply(Euler4, Single)
Axis-wisely scale an euler values with a number
public static Euler4 operator *(Euler4 lhs, float f)
Multiply(Single, Euler4)
Axis-wisely scale an euler values with a number
public static Euler4 operator *(float f, Euler4 lhs)
Subtraction(Euler4, Euler4)
Axis-wisely subtract two euler values
public static Euler4 operator -(Euler4 lhs, Euler4 rhs)
UnaryNegation(Euler4)
Negate each euler axis
public static Euler4 operator -(Euler4 lhs)