summaryrefslogtreecommitdiffhomepage
path: root/tile-atlas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tile-atlas.cpp')
-rw-r--r--tile-atlas.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/tile-atlas.cpp b/tile-atlas.cpp
index 35aaddac..0d751e2c 100644
--- a/tile-atlas.cpp
+++ b/tile-atlas.cpp
@@ -24,7 +24,7 @@ std::array<Vector2, 4> tile_atlas::texcoords_for_id(std::size_t id2) const
{
const auto tile_size_ = tile_size();
auto id_ = (int)id2;
- CORRADE_INTERNAL_ASSERT(id_ >= 0 && id_ < dims_.product());
+ ASSERT(id_ >= 0 && id_ < dims_.product());
Vector2i id = { id_ % dims_[0], id_ / dims_[0] };
auto p0 = Vector2(id * tile_size_) / Vector2(size_);
auto p1 = Vector2(tile_size_) / Vector2(size_);
@@ -37,39 +37,4 @@ std::array<Vector2, 4> tile_atlas::texcoords_for_id(std::size_t id2) const
}};
}
-using vertex_array_type = tile_atlas::vertex_array_type;
-
-vertex_array_type tile_atlas::floor_quad(const Vector3 center, const Vector2 size)
-{
- float x = size[0]*.5f, y = size[1]*.5f;
- return {{
- { x + center[0], -y + center[1], center[2]},
- { x + center[0], y + center[1], center[2]},
- {-x + center[0], -y + center[1], center[2]},
- {-x + center[0], y + center[1], center[2]},
- }};
-}
-
-vertex_array_type tile_atlas::wall_quad_W(const Vector3 center, const Vector3 size)
-{
- float x = size[0]*.5f, y = size[1]*.5f, z = size[2];
- return {{
- {-x + center[0], y + center[1], center[2] },
- {-x + center[0], y + center[1], z + center[2] },
- {-x + center[0], -y + center[1], center[2] },
- {-x + center[0], -y + center[1], z + center[2] },
- }};
-}
-
-vertex_array_type tile_atlas::wall_quad_N(const Vector3 center, const Vector3 size)
-{
- float x = size[0]*.5f, y = size[1]*.5f, z = size[2];
- return {{
- { x + center[0], -y + center[1], center[2] },
- { x + center[0], -y + center[1], z + center[2] },
- {-x + center[0], -y + center[1], center[2] },
- {-x + center[0], -y + center[1], z + center[2] },
- }};
-}
-
} // namespace Magnum::Examples