summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-13 12:08:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-13 12:08:23 +0200
commit07bbf7bf7ef31d412f47363b7346ec890495a4fb (patch)
tree8a8bbb0fd3ec07d2caf2badb1ba691d805b3cbd9 /src
parent0409fbdd696780ee86f297283c70b63740dae8dc (diff)
add comments
Diffstat (limited to 'src')
-rw-r--r--src/anim-atlas.cpp4
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 };