ToAxisAngle() public method

Convert this instance to an axis-angle representation.
public ToAxisAngle ( ) : OpenTK.Vector4d
return OpenTK.Vector4d
Example #1
0
        /// <summary>
        /// Build a rotation matrix from a quaternion
        /// </summary>
        /// <param name="q">the quaternion</param>
        /// <returns>A rotation matrix</returns>
        public static Matrix4d Rotate(Quaterniond q)
        {
            Vector3d axis;
            double   angle;

            q.ToAxisAngle(out axis, out angle);
            return(Rotate(axis, angle));
        }
Example #2
0
        /// <summary>
        /// Build a rotation matrix from the specified quaternion.
        /// </summary>
        /// <param name="q">Quaternion to translate.</param>
        /// <param name="result">Matrix result.</param>
        public static void CreateFromQuaternion(ref Quaterniond q, out Matrix3d result)
        {
            Vector3d axis;
            double   angle;

            q.ToAxisAngle(out axis, out angle);
            CreateFromAxisAngle(axis, angle, out result);
        }