Exemplo n.º 1
0
 /// <summary>
 /// Creates a translation matrix from the given vector.
 /// </summary>
 /// <param name="position">The translation position.</param>
 /// <returns>A translation matrix.</returns>
 public static Matrix CreateTranslation(Vector2D position)
 {
     return CreateTranslation(position.X, position.Y);
 }
Exemplo n.º 2
0
 public Vector2D(Vector2D u)
 {
     this.X = u.X;
     this.Y = u.Y;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a scale matrix from the given vector scale.
 /// </summary>
 /// <param name="scales">The scale to use.</param>
 /// <returns>A scaling matrix.</returns>
 public static Matrix CreateScale(Vector2D scales)
 {
     return new Matrix(scales.X, 0, 0, scales.Y, 0, 0);
 }