blob: a6617927e02e056cdbd47bd96fb74ab851ab90c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
|