VoxelToolTerrain

Inherits: VoxelTool

Implementation of VoxelTool specialized for uses on VoxelTerrain.

Description:

Functions in this class are specific to VoxelTerrain. For generic functions, you may also check VoxelTool.

It's not a class to instantiate alone, you may get it from VoxelTerrain using the get_voxel_tool() method.

Methods:

Return Signature
void do_hemisphere ( Vector3 center, float radius, Vector3 flat_direction, float smoothness=0.0 )
void for_each_voxel_metadata_in_area ( AABB voxel_area, Callable callback )
void run_blocky_random_tick ( AABB area, int voxel_count, Callable callback, int batch_count=16 )

Method Descriptions

void do_hemisphere( Vector3 center, float radius, Vector3 flat_direction, float smoothness=0.0 )

(This method has no documentation)

void for_each_voxel_metadata_in_area( AABB voxel_area, Callable callback )

Executes a function for each voxel holding metadata in the given area.

The given callback takes two arguments: voxel position (Vector3i), voxel metadata (Variant).

IMPORTANT: inserting new or removing metadata from inside this function is not allowed.

void run_blocky_random_tick( AABB area, int voxel_count, Callable callback, int batch_count=16 )

Picks random voxels within the specified area and executes a function on them. This only works for terrains using VoxelMesherBlocky. Only voxels where Voxel.random_tickable is true will be picked.

The given callback takes two arguments: voxel position (Vector3i), voxel value (int).

Generated on Apr 06, 2024