public void Yaw(float angle) { LLQuaternion q = new LLQuaternion(angle, zAxis); LLMatrix3 m = new LLMatrix3(q); Rotate(m); if (!xAxis.IsFinite() || !yAxis.IsFinite()) { throw new Exception("Non-finite in CoordinateFrame.Yaw()"); } }
public void Rotate(LLMatrix3 m) { xAxis = LLVector3.Rot(xAxis, m); yAxis = LLVector3.Rot(yAxis, m); Orthonormalize(); if (!IsFinite()) { throw new Exception("Non-finite in CoordinateFrame.Rotate()"); } }
public CoordinateFrame(LLVector3 origin, LLMatrix3 rotation) { this.origin = origin; xAxis = rotation[0]; yAxis = rotation[1]; zAxis = rotation[2]; if (!IsFinite()) { throw new ArgumentException("Non-finite in CoordinateFrame constructor"); } }
public CoordinateFrame(LLVector3 origin, LLQuaternion rotation) { LLMatrix3 m = new LLMatrix3(rotation); this.origin = origin; xAxis = m[0]; yAxis = m[1]; zAxis = m[2]; if (!IsFinite()) { throw new ArgumentException("Non-finite in CoordinateFrame constructor"); } }
public void Rotate(LLQuaternion q) { LLMatrix3 m = new LLMatrix3(q); Rotate(m); }