示例#1
0
        public void ConstrainedAlignAxis(int nAxis, Vector3d vTo, Vector3d vAround)
        {
            Vector3d    axis   = GetAxis(nAxis);
            double      fAngle = MathUtil.PlaneAngleSignedD(axis, vTo, vAround);
            Quaterniond rot    = Quaterniond.AxisAngleD(vAround, fAngle);

            Rotate(rot);
        }
示例#2
0
        public static Quaterniond FromToConstrained(Vector3d vFrom, Vector3d vTo, Vector3d vAround)
        {
            double fAngle = MathUtil.PlaneAngleSignedD(vFrom, vTo, vAround);

            return(Quaterniond.AxisAngleD(vAround, fAngle));
        }