diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/anim-atlas.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 }; |