Skip to content

Commit

Permalink
Add documentation for VoxelModifier classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Piratux committed Jun 15, 2024
1 parent f7b9af9 commit 12c89fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/classes/VoxelModifier.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VoxelModifier" inherits="Node3D" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Base class for voxel modifiers.
</brief_description>
<description>
Modifiers are meant to be as an extension to terrain's generator that non-destructively affect limited volume. Stacks with other modifiers. Runtime edits from [VoxelTool] override modifier values.
Note 1: Only works with [VoxelLodTerrain].
Note 2: Only works with smooth terrain (SDF).
</description>
<tutorials>
</tutorials>
<members>
<member name="operation" type="int" setter="set_operation" getter="get_operation" enum="VoxelModifier.Operation" default="0">
An operation modifier performs on the terrain or to other modifiers.
</member>
<member name="smoothness" type="float" setter="set_smoothness" getter="get_smoothness" default="0.0">
Increasing this value makes the shape "merge" with its surroundings across a more or less large distance.
Expand All @@ -16,8 +21,10 @@
</members>
<constants>
<constant name="OPERATION_ADD" value="0" enum="Operation">
Performs SDF union.
</constant>
<constant name="OPERATION_REMOVE" value="1" enum="Operation">
Performs SDF subtraction.
</constant>
</constants>
</class>
3 changes: 3 additions & 0 deletions doc/classes/VoxelModifierMesh.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VoxelModifierMesh" inherits="VoxelModifier" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Voxel modifier that uses [VoxelMeshSDF].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="isolevel" type="float" setter="set_isolevel" getter="get_isolevel" default="0.0">
Offsets isolevel of SDF mesh. Increasing this value makes object appear thicker and vice versa.
</member>
<member name="mesh_sdf" type="VoxelMeshSDF" setter="set_mesh_sdf" getter="get_mesh_sdf">
SDF mesh that is used for modifier.
</member>
</members>
</class>
2 changes: 2 additions & 0 deletions doc/classes/VoxelModifierSphere.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VoxelModifierSphere" inherits="VoxelModifier" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Voxel modifier that uses sphere shape.
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
Radius of the sphere.
</member>
</members>
</class>

0 comments on commit 12c89fe

Please sign in to comment.