public static float GetSpecificValue(this Quaternion quaternion, QuaternionElementType element, bool toSpirareCoordinate = true) { var rotation = toSpirareCoordinate ? quaternion.ToSpirareCoordinate() : quaternion; switch (element) { case QuaternionElementType.x: return(rotation.x); case QuaternionElementType.y: return(rotation.y); case QuaternionElementType.z: return(rotation.z); case QuaternionElementType.w: return(rotation.w); default: return(float.NaN); } }
private object GetRotation(ArgumentParser parser, QuaternionElementType axis, CoordinateType coordinate) { return(transformBinding.GetRotation(parser, axis, coordinate)); }