Added missing summeries #1
This commit is contained in:
parent
03d99ea28e
commit
8665b5b709
104 changed files with 1165 additions and 821 deletions
|
|
@ -1,20 +1,46 @@
|
|||
using System;
|
||||
#region usings
|
||||
|
||||
using OpenTK;
|
||||
using SM.Base.Types;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace SM.Base.Drawing
|
||||
{
|
||||
/// <summary>
|
||||
/// Stores transformations for the textures.
|
||||
/// </summary>
|
||||
public class TextureTransformation
|
||||
{
|
||||
/// <summary>
|
||||
/// The offset from the origin.
|
||||
/// </summary>
|
||||
public CVector2 Offset = new CVector2(0);
|
||||
public CVector2 Scale = new CVector2(1);
|
||||
/// <summary>
|
||||
/// The rotation of the texture.
|
||||
/// </summary>
|
||||
public CVector1 Rotation = new CVector1(0);
|
||||
/// <summary>
|
||||
/// The scale of the texture.
|
||||
/// </summary>
|
||||
public CVector2 Scale = new CVector2(1);
|
||||
|
||||
/// <summary>
|
||||
/// Get the texture matrix.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Matrix3 GetMatrix()
|
||||
{
|
||||
return CalculateMatrix(Offset, Scale, Rotation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates a texture matrix.
|
||||
/// </summary>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="scale"></param>
|
||||
/// <param name="rotation"></param>
|
||||
/// <returns></returns>
|
||||
public static Matrix3 CalculateMatrix(Vector2 offset, Vector2 scale, float rotation)
|
||||
{
|
||||
float radians = MathHelper.DegreesToRadians(rotation);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue