godot_voxel/edition/voxel_tool_lod_terrain.h

29 lines
714 B
C
Raw Normal View History

2019-09-03 14:54:40 -07:00
#ifndef VOXEL_TOOL_LOD_TERRAIN_H
#define VOXEL_TOOL_LOD_TERRAIN_H
2019-09-05 11:43:25 -07:00
#include "voxel_tool.h"
2019-09-03 14:54:40 -07:00
class VoxelLodTerrain;
2019-09-05 11:43:25 -07:00
class VoxelMap;
2019-09-03 14:54:40 -07:00
class VoxelToolLodTerrain : public VoxelTool {
GDCLASS(VoxelToolLodTerrain, VoxelTool)
public:
VoxelToolLodTerrain(VoxelLodTerrain *terrain, Ref<VoxelMap> map);
bool is_area_editable(const Rect3i &box) const override;
protected:
2020-08-06 11:54:47 -07:00
uint64_t _get_voxel(Vector3i pos) override;
2019-09-03 14:54:40 -07:00
float _get_voxel_f(Vector3i pos) override;
2020-08-06 11:54:47 -07:00
void _set_voxel(Vector3i pos, uint64_t v) override;
2019-09-03 14:54:40 -07:00
void _set_voxel_f(Vector3i pos, float v) override;
void _post_edit(const Rect3i &box) override;
private:
VoxelLodTerrain *_terrain = nullptr;
Ref<VoxelMap> _map;
};
#endif // VOXEL_TOOL_LOD_TERRAIN_H