Пример #1
0
        /// <summary>
        /// Creates new quaternion that represents rotation by specified angle around given axis.
        /// </summary>
        /// <param name="cosha"> Cosine of angle of rotation. </param>
        /// <param name="sinha"> Sine of angle of rotation. </param>
        /// <param name="axis">  <see cref="Vector3" /> that represents an axis of rotation. </param>
        /// <returns> Quaternion that represents rotation by specified angle around given axis. </returns>
        public static Quaternion CreateRotationAngleAxis(float cosha, float sinha, Vector3 axis)
        {
            var q = new Quaternion();

            q.SetRotationAngleAxis(cosha, sinha, axis);
            return(q);
        }
Пример #2
0
        /// <summary>
        /// Creates new quaternion that represents rotation by specified angle around given axis.
        /// </summary>
        /// <param name="rad">  Angle in radians. </param>
        /// <param name="axis"> <see cref="Vector3" /> that represents an axis of rotation. </param>
        /// <returns> Quaternion that represents rotation by specified angle around given axis. </returns>
        public static Quaternion CreateRotationAngleAxis(float rad, Vector3 axis)
        {
            var q = new Quaternion();

            q.SetRotationAngleAxis(rad, axis);
            return(q);
        }
Пример #3
0
 /// <summary>
 /// Creates new quaternion that represents rotation by specified angle around given axis.
 /// </summary>
 /// <param name="cosha"> Cosine of angle of rotation. </param>
 /// <param name="sinha"> Sine of angle of rotation. </param>
 /// <param name="axis">  <see cref="Vector3" /> that represents an axis of rotation. </param>
 /// <returns> Quaternion that represents rotation by specified angle around given axis. </returns>
 public static Quaternion CreateRotationAngleAxis(float cosha, float sinha, Vector3 axis)
 {
     var q = new Quaternion();
     q.SetRotationAngleAxis(cosha, sinha, axis);
     return q;
 }
Пример #4
0
 /// <summary>
 /// Creates new quaternion that represents rotation by specified angle around given axis.
 /// </summary>
 /// <param name="rad">  Angle in radians. </param>
 /// <param name="axis"> <see cref="Vector3" /> that represents an axis of rotation. </param>
 /// <returns> Quaternion that represents rotation by specified angle around given axis. </returns>
 public static Quaternion CreateRotationAngleAxis(float rad, Vector3 axis)
 {
     var q = new Quaternion();
     q.SetRotationAngleAxis(rad, axis);
     return q;
 }