From 07bbf7bf7ef31d412f47363b7346ec890495a4fb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 13 Apr 2023 12:08:23 +0200 Subject: add comments --- src/anim-atlas.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp index 54c12077..3679bc2a 100644 --- a/src/anim-atlas.cpp +++ b/src/anim-atlas.cpp @@ -86,6 +86,8 @@ auto anim_atlas::frame(rotation r, size_t frame) const -> const anim_frame& return g.frames[frame]; } +// get uv's for atlas frame +// ORDER: bottom left, top right, bottom left, top left auto anim_atlas::texcoords_for_frame(rotation r, size_t i, bool mirror) const noexcept -> texcoords { const auto f = frame(r, i); @@ -108,6 +110,8 @@ auto anim_atlas::texcoords_for_frame(rotation r, size_t i, bool mirror) const no }}; } +// get vertexes for atlas frame +// ORDER: bottom left, top right, bottom left, top left auto anim_atlas::frame_quad(const Vector3& center, rotation r, size_t i) const noexcept -> quad { enum : size_t { x, y, z }; -- cgit v1.2.3