20 lines
456 B
C#
20 lines
456 B
C#
using Microsoft.Xna.Framework;
|
|
|
|
namespace Kav.Data
|
|
{
|
|
public struct UVData
|
|
{
|
|
public Vector2 Offset { get; }
|
|
public Vector2 Percentage { get; }
|
|
|
|
public UVData(
|
|
Vector2 positionInAtlas,
|
|
Vector2 subTextureDimensions,
|
|
Vector2 atlasDimensions
|
|
) {
|
|
Percentage = subTextureDimensions / atlasDimensions;
|
|
Offset = positionInAtlas / atlasDimensions;
|
|
}
|
|
}
|
|
}
|