Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for VoxelModifier classes #667

Merged
merged 2 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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://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 that the modifier performs on the terrain or on the 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://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. Positive value makes object appear thicker as well as smoother and negative value - thinner.
</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://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>
Loading