public void Rotate(Quaternionf q) { Matrix4f m = new Matrix4f(); m.FromQuaternion(q); Rotate(m); }
public void Yaw(float angle) { Quaternionf q = new Quaternionf(); q.FromAxisAngle(zAxis, angle); Matrix4f m = new Matrix4f(); m.FromQuaternion(q); Rotate(m); if (!xAxis.IsFinite() || !yAxis.IsFinite()) throw new Exception("Non-finite in CoordinateFrame.Yaw()"); }
public CoordinateFrame(Vector3f origin, Quaternionf rotation) { Matrix4f m = new Matrix4f(); m.FromQuaternion(rotation); this.origin = origin; xAxis = new Vector3f(m.M11, m.M21, m.M31); yAxis = new Vector3f(m.M12, m.M22, m.M32); zAxis = new Vector3f(m.M13, m.M23, m.M33); if (!IsFinite()) throw new ArgumentException("Non-finite in CoordinateFrame constructor"); }