44 lines
2.0 KiB
XML
44 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="VoxelToolTerrain" inherits="VoxelTool" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
|
<brief_description>
|
|
Implementation of [VoxelTool] specialized for uses on [VoxelTerrain].
|
|
</brief_description>
|
|
<description>
|
|
It's not a class to instantiate alone, you may get it from [VoxelTerrain] using the `get_voxel_tool()` method.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="do_hemisphere">
|
|
<return type="void" />
|
|
<param index="0" name="center" type="Vector3" />
|
|
<param index="1" name="radius" type="float" />
|
|
<param index="2" name="flat_direction" type="Vector3" />
|
|
<param index="3" name="smoothness" type="float" default="0.0" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="for_each_voxel_metadata_in_area">
|
|
<return type="void" />
|
|
<param index="0" name="voxel_area" type="AABB" />
|
|
<param index="1" name="callback" type="Callable" />
|
|
<description>
|
|
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.
|
|
</description>
|
|
</method>
|
|
<method name="run_blocky_random_tick" qualifiers="const">
|
|
<return type="void" />
|
|
<param index="0" name="area" type="AABB" />
|
|
<param index="1" name="voxel_count" type="int" />
|
|
<param index="2" name="callback" type="Callable" />
|
|
<param index="3" name="batch_count" type="int" default="16" />
|
|
<description>
|
|
Picks random voxels within the specified area and executes a function on them. This only works for terrains using [VoxelMesherBlocky]. Only voxels where [member Voxel.random_tickable] is [code]true[/code] will be picked.
|
|
The given callback takes two arguments: voxel position (Vector3i), voxel value (int).
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
</class>
|