public void TestFromRotationAboutCenter() { var rnd = new Random(0); var rotation = RandomUtil.UnitQuaternion(rnd); var center = RandomUtil.Vector3(rnd); RigidTransform transform = RigidTransform.FromRotation(rotation, center); var testPoint = RandomUtil.Vector3(rnd); MathAssert.AreEqual( Vector3.Transform(testPoint - center, rotation) + center, transform.Transform(testPoint), Acc); }
private RigidTransform GetObjectCenteredRotationTransform(RigidBoneSystemInputs inputs) { Quaternion rotation = GetRotation(inputs); return(RigidTransform.FromRotation(rotation, centerPoint)); }