Formatting
parent
581dda484b
commit
d848da3a6f
|
@ -186,7 +186,7 @@ void VoxelTool::do_sphere(Vector3 center, float radius) {
|
|||
|
||||
void VoxelTool::do_box(Vector3i begin, Vector3i end) {
|
||||
Vector3i::sort_min_max(begin, end);
|
||||
Rect3i box = Rect3i::from_min_max(begin, end + Vector3i(1,1,1));
|
||||
Rect3i box = Rect3i::from_min_max(begin, end + Vector3i(1, 1, 1));
|
||||
|
||||
if (!is_area_editable(box)) {
|
||||
PRINT_VERBOSE("Area not editable");
|
||||
|
@ -254,7 +254,7 @@ void VoxelTool::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_voxel", "pos", "v"), &VoxelTool::_b_set_voxel);
|
||||
ClassDB::bind_method(D_METHOD("set_voxel_f", "pos", "v"), &VoxelTool::_b_set_voxel_f);
|
||||
ClassDB::bind_method(D_METHOD("do_point", "pos"), &VoxelTool::_b_do_point);
|
||||
ClassDB::bind_method(D_METHOD("do_sphere", "center", "radius"), &VoxelTool::_b_do_sphere);
|
||||
ClassDB::bind_method(D_METHOD("do_sphere", "center", "radius"), &VoxelTool::_b_do_sphere);
|
||||
ClassDB::bind_method(D_METHOD("do_box", "begin", "end"), &VoxelTool::_b_do_box);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_voxel_metadata", "pos", "meta"), &VoxelTool::_b_set_voxel_metadata);
|
||||
|
|
|
@ -21,6 +21,7 @@ bool VoxelToolTerrain::is_area_editable(const Rect3i &box) const {
|
|||
|
||||
Ref<VoxelRaycastResult> VoxelToolTerrain::raycast(Vector3 pos, Vector3 dir, float max_distance, uint32_t collision_mask) {
|
||||
// TODO Transform input if the terrain is rotated (in the future it can be made a Spatial node)
|
||||
// TODO Optimize using a broad phase on blocks
|
||||
|
||||
struct RaycastPredicate {
|
||||
const VoxelTerrain &terrain;
|
||||
|
|
Loading…
Reference in New Issue