13 class sprite_animation final {
15 using normalized_texture_coordinate_type = float;
16 using normalized_time_type = float;
17 using texel_coordinate_type = int;
20 texel_coordinate_type x;
21 texel_coordinate_type y;
22 texel_coordinate_type w;
23 texel_coordinate_type h;
27 normalized_texture_coordinate_type u;
28 normalized_texture_coordinate_type v;
29 normalized_texture_coordinate_type w;
30 normalized_texture_coordinate_type h;
32 using frame_collection_type = std::map<normalized_time_type, frame>;
36 const texel_coordinate_type aTextureWidth,
37 const texel_coordinate_type aTextureHeight)
const;
39 sprite_animation(frame_collection_type aFrameData);
42 std::map<normalized_time_type, frame> m_Frames;
normalized_frame at(const normalized_time_type aNormalizedTime, const texel_coordinate_type aTextureWidth, const texel_coordinate_type aTextureHeight) const
gets the active frame at the given time in normalized texture coordinates