diff options
| author | untodesu <kirill@untode.su> | 2025-09-11 18:18:08 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-11 18:18:08 +0500 |
| commit | 68694a9c9d7d27d3b79c7b96bb67f56db2f75c45 (patch) | |
| tree | fa306d55b8333ffdb184befd41386830af2c3945 /game/shared/world/voxels/generic.hh | |
| parent | 12947aafcc6a6eb362cc454e2149796ec9265743 (diff) | |
| download | voxelius-68694a9c9d7d27d3b79c7b96bb67f56db2f75c45.tar.bz2 voxelius-68694a9c9d7d27d3b79c7b96bb67f56db2f75c45.zip | |
Metadata voxels!
Diffstat (limited to 'game/shared/world/voxels/generic.hh')
| -rw-r--r-- | game/shared/world/voxels/generic.hh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/game/shared/world/voxels/generic.hh b/game/shared/world/voxels/generic.hh new file mode 100644 index 0000000..a661792 --- /dev/null +++ b/game/shared/world/voxels/generic.hh @@ -0,0 +1,27 @@ +#pragma once + +#include "shared/world/voxel.hh" + +namespace world::voxels +{ +class GenericCube final : public Voxel { +public: + template<typename... TexturesT> + requires(std::is_convertible_v<TexturesT, std::string_view> && ...) + explicit GenericCube(std::string_view name, VoxelRender render_mode, bool animated, VoxelMaterial surface_material, VoxelTouch touch, + const glm::fvec3& touch_values, TexturesT&&... textures) noexcept + { + set_name(name); + + set_shape(VoxelShape::CUBE); + set_render_mode(render_mode); + set_animated(animated); + + set_surface_material(surface_material); + set_touch_values(touch_values); + set_touch_type(touch); + + add_texture_default(std::forward<TexturesT>(textures)...); + } +}; +} // namespace world::voxels |
