Example #1
0
 /// <summary>
 /// Sets the values of this matrix to one that represents a rotation around an
 /// axis.
 /// </summary>
 /// <param name="c">   Cosine of the angle of the rotation.</param>
 /// <param name="s">   Sine of the angle of the rotation.</param>
 /// <param name="axis">
 /// <see cref="Vector3"/> object that represents axis of rotation.
 /// </param>
 /// <param name="t">   Optional translation vector.</param>
 public void SetRotationAroundAxis(float c, float s, Vector3 axis, Vector3 t = default(Vector3))
 {
     this = new Matrix34(Matrix33.CreateRotationAroundAxis(c, s, axis))
     {
         M03 = t.X,
         M13 = t.Y,
         M23 = t.Z
     };
 }
Example #2
0
        /// <summary>
        /// Sets the values of this matrix to one that represents a rotation around an
        /// axis.
        /// </summary>
        /// <param name="rot">
        /// <see cref="Vector3"/> object which length represents an angle of rotation and
        /// which direction represents an axis of rotation.
        /// </param>
        /// <param name="t">  Optional translation vector.</param>
        public void SetRotationAroundAxis(Vector3 rot, Vector3 t = default(Vector3))
        {
            this = new Matrix34(Matrix33.CreateRotationAroundAxis(rot));

            this.SetTranslation(t);
        }
Example #3
0
        /// <summary>
        /// Sets the values of this matrix to one that represents a rotation around an
        /// axis.
        /// </summary>
        /// <param name="rad"> Angle of rotation in radians.</param>
        /// <param name="axis">Normalized vector that represents axis of rotation.</param>
        /// <param name="t">   Optional translation vector.</param>
        public void SetRotationAroundAxis(float rad, Vector3 axis, Vector3 t = default(Vector3))
        {
            this = new Matrix34(Matrix33.CreateRotationAroundAxis(rad, axis));

            this.SetTranslation(t);
        }