Formatting

master
Marc Gilleron 2020-08-24 13:49:44 +01:00
parent 581dda484b
commit d848da3a6f
2 changed files with 3 additions and 2 deletions

View File

@ -186,7 +186,7 @@ void VoxelTool::do_sphere(Vector3 center, float radius) {
void VoxelTool::do_box(Vector3i begin, Vector3i end) { void VoxelTool::do_box(Vector3i begin, Vector3i end) {
Vector3i::sort_min_max(begin, 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)) { if (!is_area_editable(box)) {
PRINT_VERBOSE("Area not editable"); PRINT_VERBOSE("Area not editable");

View File

@ -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) { 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 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 { struct RaycastPredicate {
const VoxelTerrain &terrain; const VoxelTerrain &terrain;