public void dBodyGetRotationTest() { IntPtr newWorldId = Ode.dWorldCreate(); IntPtr newBodyId = Ode.dBodyCreate(newWorldId); Ode.dMatrix3 r = new Ode.dMatrix3( new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f } ); Ode.dMatrix3 r2 = new Ode.dMatrix3( new float[] { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f } ); Ode.dBodySetRotation(newBodyId, r); r2 = Ode.dBodyGetRotation(newBodyId); Assert.AreEqual(r, r2, "Assigned and returned rotation matrix values are not equal"); }
public void dBodySetRotationTest() { IntPtr newWorldId = Ode.dWorldCreate(); IntPtr newBodyId = Ode.dBodyCreate(newWorldId); Ode.dMatrix3 r = new Ode.dMatrix3( new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f } ); try { Ode.dBodySetRotation(newBodyId, r); } catch (Exception e) { Assert.Fail("dBodySetRotation failed with exception: " + e.GetType()); } }