#ifndef PARADISO_SPRITE_HPP #define PARADISO_SPRITE_HPP #include "bitmap.hpp" #include "matrix.hpp" #include "vector.hpp" #include namespace paradiso { struct Sprite final { using ChangeCountType = std::uint64_t; static constexpr Sprite create() noexcept { return {}; } Vector2 pivot{Vector2::zero()}; std::array indices{0, 3, 2, 2, 1, 0}; std::array, 4> vertices{ Vector3::make(-1.0f, -1.0f, 0.0f), Vector3::make(-1.0f, +1.0f, 0.0f), Vector3::make(+1.0f, +1.0f, 0.0f), Vector3::make(+1.0f, -1.0f, 0.0f)}; std::array, 4> normals{ Vector3::z_axis(), Vector3::z_axis(), Vector3::z_axis(), Vector3::z_axis()}; std::array, 4> texture_coordinates{ Vector2::make(0.0f, 0.0f), /// 0 Vector2::make(0.0f, 1.0f), /// 1 Vector2::make(1.0f, 1.0f), /// 2 Vector2::make(1.0f, 0.0f) /// 3 }; ChangeCountType change_count{}; }; } // namespace paradiso #endif