public RealQuaternion Vector3DTransform(RealMatrix4x3 transform) => transform.IsIdentity ? this : new RealQuaternion( I * transform.m11 + J * transform.m21 + K * transform.m31, I * transform.m12 + J * transform.m22 + K * transform.m32, I * transform.m13 + J * transform.m23 + K * transform.m33, W);
public RealQuaternion Point3DTransform(RealMatrix4x3 transform) => transform.IsIdentity ? this : new RealQuaternion( I * transform.m11 + J * transform.m21 + K * transform.m31 + transform.m41, I * transform.m12 + J * transform.m22 + K * transform.m32 + transform.m42, I * transform.m13 + J * transform.m23 + K * transform.m33 + transform.m43, W);
public bool Equals(RealMatrix4x3 M) => (m11 == M.m11 && m12 == M.m12 && m13 == M.m13 && m21 == M.m21 && m22 == M.m22 && m23 == M.m23 && m31 == M.m31 && m32 == M.m32 && m33 == M.m33 && m41 == M.m41 && m42 == M.m42 && m43 == M.m43);
public bool TryParse(GameCache cache, List <string> args, out IBlamType result, out string error) { result = null; if (args.Count != 12) { error = $"{args.Count} arguments supplied; should be 12"; return(false); } else if (!float.TryParse(args[0], out float M11)) { error = $"Unable to parse \"{args[0]}\" (M11) as `float`."; return(false); } else if (!float.TryParse(args[1], out float M12)) { error = $"Unable to parse \"{args[1]}\" (M12) as `float`."; return(false); } else if (!float.TryParse(args[2], out float M13)) { error = $"Unable to parse \"{args[2]}\" (M13) as `float`."; return(false); } else if (!float.TryParse(args[3], out float M21)) { error = $"Unable to parse \"{args[3]}\" (M21) as `float`."; return(false); } else if (!float.TryParse(args[4], out float M22)) { error = $"Unable to parse \"{args[4]}\" (M22) as `float`."; return(false); } else if (!float.TryParse(args[5], out float M23)) { error = $"Unable to parse \"{args[5]}\" (M23) as `float`."; return(false); } else if (!float.TryParse(args[6], out float M31)) { error = $"Unable to parse \"{args[6]}\" (M31) as `float`."; return(false); } else if (!float.TryParse(args[7], out float M32)) { error = $"Unable to parse \"{args[7]}\" (M32) as `float`."; return(false); } else if (!float.TryParse(args[8], out float M33)) { error = $"Unable to parse \"{args[8]}\" (M33) as `float`."; return(false); } else if (!float.TryParse(args[9], out float M41)) { error = $"Unable to parse \"{args[9]}\" (M41) as `float`."; return(false); } else if (!float.TryParse(args[10], out float M42)) { error = $"Unable to parse \"{args[10]}\" (M42) as `float`."; return(false); } else if (!float.TryParse(args[11], out float M43)) { error = $"Unable to parse \"{args[11]}\" (M43) as `float`."; return(false); } else { result = new RealMatrix4x3( M11, M12, M13, M21, M22, M23, M31, M32, M33, M41, M42, M43); error = null; return(true); } }