#include "Sprite.hpp"

TSE::Sprite::Sprite(Texture *tex, Rect bounds)
{
    this->tex = tex;
    uvBounds = bounds;
}

TSE::Texture *TSE::Sprite::GetTexture()
{
    return tex;
}

TSE::Rect &TSE::Sprite::GetUVRect()
{
    return uvBounds;
}

void TSE::Sprite::GetUVs(std::vector<Vector2> &uvs)
{
    uvs.clear();
    uvs.push_back(Vector2(uvBounds.p1));
    uvs.push_back(Vector2(uvBounds.p2.x, uvBounds.p1.y));
    uvs.push_back(Vector2(uvBounds.p2));
    uvs.push_back(Vector2(uvBounds.p1.x, uvBounds.p2.y));
}
