diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-26 18:19:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-26 18:28:37 +0200 |
commit | 05dee8a02773141cbe6cbfb1c0557018210ced05 (patch) | |
tree | 25e1e9fd68a05912c146ccc45ceb07c3d6f99ae4 /src/chunk-scenery.hpp | |
parent | 50273c040e605b6dbee3389c0c2adce2b8d85701 (diff) |
a
Diffstat (limited to 'src/chunk-scenery.hpp')
-rw-r--r-- | src/chunk-scenery.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/chunk-scenery.hpp b/src/chunk-scenery.hpp new file mode 100644 index 00000000..0e24f6ff --- /dev/null +++ b/src/chunk-scenery.hpp @@ -0,0 +1,30 @@ +#pragma once +#include "chunk.hpp" +#include <Corrade/Containers/Array.h> +#include <Magnum/Math/Vector2.h> + +namespace floormat { + +struct chunk::topo_sort_data +{ + Vector2i min, max, center; + float slope = 0, ord; + bool visited : 1 = false; + bool is_character : 1; + + bool intersects(const topo_sort_data& other) const; + friend bool operator<(const topo_sort_data& a, const topo_sort_data& b); +}; +struct chunk::draw_entity +{ + entity* e; + float ord; + topo_sort_data data; +}; +struct chunk::scenery_mesh_tuple { + GL::Mesh& mesh; + ArrayView<draw_entity> array; + size_t size; +}; + +} // namespace floormat |