#pragma once

#include <types/base/types.h>
#include <types/math/vec2.h>

namespace extra2d {

struct Transform {
    Vec2 pos;
    Vec2 scale;
    float rot;

    Transform() : pos(0.0f, 0.0f), scale(1.0f, 1.0f), rot(0.0f) {}
    Transform(const Vec2& pos, const Vec2& scale, float rot)
        : pos(pos), scale(scale), rot(rot) {}

    void reset() {
        pos = Vec2(0.0f, 0.0f);
        scale = Vec2(1.0f, 1.0f);
        rot = 0.0f;
    }

    bool operator==(const Transform& o) const {
        return pos == o.pos && scale == o.scale && rot == o.rot;
    }
    bool operator!=(const Transform& o) const { return !(*this == o); }

    static const Transform Identity;
};

} // namespace extra2d
