private void LimitRotationZXY(TMONode node) { TMOConstraintItem item = constraint_zxy.GetItem(node.Name); Vector3 angle1 = TMOMat.ToAngleZXY(node.Rotation); Vector3 angle0 = item.Limit(angle1); node.Rotation = TMOMat.ToQuaternionZXY(angle0); //Console.WriteLine("node {0} x {1:F2} y {2:F2} z {3:F2}", node.Name, angle0.X, angle0.Y, angle0.Z); }
private void LimitRotationXYZ(TMONode node) { TMOConstraintItem item = constraint_xyz.GetItem(node.Name); Vector3 angle1 = Helper.ToAngleXYZ(node.Rotation); Vector3 angle0 = item.Limit(angle1); node.Rotation = Helper.ToQuaternionXYZ(angle0); //Console.WriteLine("node {0} x {1:F2} y {2:F2} z {3:F2}", node.Name, angle0.X, angle0.Y, angle0.Z); }