Skip to content

Commit

Permalink
Update Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtarsia authored and TokisanGames committed May 23, 2024
1 parent af19490 commit 32ccfbf
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 20 deletions.
26 changes: 21 additions & 5 deletions doc/api/class_terrain3deditor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,43 +174,59 @@ Paint on the color map.

Paint a roughness modifier, aka wetness.

.. _class_Terrain3DEditor_constant_ANGLE:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **ANGLE** = ``4``

Paint textures rotated by an angle.

.. _class_Terrain3DEditor_constant_SCALE:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **SCALE** = ``5``

Paint textures scaled by a value.

.. _class_Terrain3DEditor_constant_AUTOSHADER:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **AUTOSHADER** = ``4``
:ref:`Tool<enum_Terrain3DEditor_Tool>` **AUTOSHADER** = ``6``

Paint where the shader automatically textures.

.. _class_Terrain3DEditor_constant_HOLES:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **HOLES** = ``5``
:ref:`Tool<enum_Terrain3DEditor_Tool>` **HOLES** = ``7``

Paint where vertices will be invalidated to leave holes.

.. _class_Terrain3DEditor_constant_NAVIGATION:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **NAVIGATION** = ``6``
:ref:`Tool<enum_Terrain3DEditor_Tool>` **NAVIGATION** = ``8``

Paint where navigation will be generated.

.. _class_Terrain3DEditor_constant_REGION:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **REGION** = ``7``
:ref:`Tool<enum_Terrain3DEditor_Tool>` **REGION** = ``9``

Add/remove regions.

.. _class_Terrain3DEditor_constant_TOOL_MAX:

.. rst-class:: classref-enumeration-constant

:ref:`Tool<enum_Terrain3DEditor_Tool>` **TOOL_MAX** = ``8``
:ref:`Tool<enum_Terrain3DEditor_Tool>` **TOOL_MAX** = ``10``

The number of elements in this enum.

Expand Down
28 changes: 28 additions & 0 deletions doc/api/class_terrain3dstorage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Methods
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`force_update_maps<class_Terrain3DStorage_method_force_update_maps>`\ (\ map_type\: :ref:`MapType<enum_Terrain3DStorage_MapType>` = 3\ ) |
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_angle<class_Terrain3DStorage_method_get_angle>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_color<class_Terrain3DStorage_method_get_color>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_control<class_Terrain3DStorage_method_get_control>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
Expand All @@ -86,6 +88,8 @@ Methods
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_roughness<class_Terrain3DStorage_method_get_roughness>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_scale<class_Terrain3DStorage_method_get_scale>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`get_texture_id<class_Terrain3DStorage_method_get_texture_id>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
+--------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_region<class_Terrain3DStorage_method_has_region>`\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ ) |
Expand Down Expand Up @@ -512,6 +516,18 @@ Regenerates the TextureArrays that house the requested map types. Using the defa

----

.. _class_Terrain3DStorage_method_get_angle:

.. rst-class:: classref-method

:ref:`float<class_float>` **get_angle**\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ )

Returns the angle, aka uv rotation, painted on the control map at the requested position. Values are fixed to 22.5 degree intervals, for a maximum of 16 angles. 360 / 16 = 22.5. Calls :ref:`get_pixel<class_Terrain3DStorage_method_get_pixel>`.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DStorage_method_get_color:

.. rst-class:: classref-method
Expand Down Expand Up @@ -682,6 +698,18 @@ Returns the roughness modifier (wetness) on the color map alpha channel associat

----

.. _class_Terrain3DStorage_method_get_scale:

.. rst-class:: classref-method

:ref:`float<class_float>` **get_scale**\ (\ global_position\: :ref:`Vector3<class_Vector3>`\ )

Returns the uv scale painted on the control map at the requested position. The value is a percentage difference from 100% scale. Eg. +20% or -40%. Calls :ref:`get_pixel<class_Terrain3DStorage_method_get_pixel>`.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DStorage_method_get_texture_id:

.. rst-class:: classref-method
Expand Down
62 changes: 60 additions & 2 deletions doc/api/class_terrain3dutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ Or you can instance the class for a shorter alias:

::

var bits: int = util.enc_base(base_id) | util.enc_overlay(over_id) | util.enc_blend(blend) | \
util.enc_auto(autoshader) | util.enc_nav(navigation) | util.enc_hole(hole)
var bits: int = util.enc_base(base_id) | util.enc_overlay(over_id) | \
util.enc_blend(blend) | util.enc_uv_rotation(uvrotation) | \
util.enc_uv_scale(uvscale) | util.enc_auto(autoshader) | \
util.enc_nav(navigation) | util.enc_hole(hole)
var color: Color = Color(util.as_float(bits), 0., 0., 1.)
storage.set_control(global_pos, color)

Expand Down Expand Up @@ -64,6 +66,10 @@ Methods
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`enc_overlay<class_Terrain3DUtil_method_enc_overlay>`\ (\ overlay\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`enc_uv_rotation<class_Terrain3DUtil_method_enc_uv_rotation>`\ (\ rotation\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`enc_uv_scale<class_Terrain3DUtil_method_enc_uv_scale>`\ (\ scale\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_base<class_Terrain3DUtil_method_get_base>`\ (\ pixel\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_blend<class_Terrain3DUtil_method_get_blend>`\ (\ pixel\: :ref:`int<class_int>`\ ) |static| |
Expand All @@ -76,6 +82,10 @@ Methods
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Image<class_Image>` | :ref:`get_thumbnail<class_Terrain3DUtil_method_get_thumbnail>`\ (\ image\: :ref:`Image<class_Image>`, size\: :ref:`Vector2i<class_Vector2i>` = Vector2i(256, 256)\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_uv_rotation<class_Terrain3DUtil_method_get_uv_rotation>`\ (\ pixel\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_uv_scale<class_Terrain3DUtil_method_get_uv_scale>`\ (\ pixel\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_auto<class_Terrain3DUtil_method_is_auto>`\ (\ pixel\: :ref:`int<class_int>`\ ) |static| |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_hole<class_Terrain3DUtil_method_is_hole>`\ (\ pixel\: :ref:`int<class_int>`\ ) |static| |
Expand Down Expand Up @@ -216,6 +226,30 @@ Returns a control map uint with the overlay texture ID encoded. See the top desc

----

.. _class_Terrain3DUtil_method_enc_uv_rotation:

.. rst-class:: classref-method

:ref:`int<class_int>` **enc_uv_rotation**\ (\ rotation\: :ref:`int<class_int>`\ ) |static|

Returns a control map uint with the texture rotation encoded. See the top description for usage. See :ref:`get_uv_rotation<class_Terrain3DUtil_method_get_uv_rotation>` for values.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DUtil_method_enc_uv_scale:

.. rst-class:: classref-method

:ref:`int<class_int>` **enc_uv_scale**\ (\ scale\: :ref:`int<class_int>`\ ) |static|

Returns a control map uint with the texture scale encoded. See the top description for usage. See :ref:`get_uv_scale<class_Terrain3DUtil_method_get_uv_scale>` for values.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DUtil_method_get_base:

.. rst-class:: classref-method
Expand Down Expand Up @@ -298,6 +332,30 @@ Returns an Image normalized and converted to RGB8. Used for creating a human vie

----

.. _class_Terrain3DUtil_method_get_uv_rotation:

.. rst-class:: classref-method

:ref:`int<class_int>` **get_uv_rotation**\ (\ pixel\: :ref:`int<class_int>`\ ) |static|

Returns the texture rotation from a control map pixel. Values are 0 - 15, which provides degrees when multiplied by 22.5. (360/16).

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DUtil_method_get_uv_scale:

.. rst-class:: classref-method

:ref:`int<class_int>` **get_uv_scale**\ (\ pixel\: :ref:`int<class_int>`\ ) |static|

Returns the texture scale modification from a control map pixel. Values are an index into the array `{ 0, 20, 40, 60, 80, -60, -40, -20 }`. 0 indicates no scale modification. Index 2 indicates a 40% increase in texture scale at that pixel. Index -1 or 7 indicates a -20% texture scale change.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DUtil_method_is_auto:

.. rst-class:: classref-method
Expand Down
16 changes: 11 additions & 5 deletions doc/classes/Terrain3DEditor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,25 @@
<constant name="ROUGHNESS" value="3" enum="Tool">
Paint a roughness modifier, aka wetness.
</constant>
<constant name="AUTOSHADER" value="4" enum="Tool">
<constant name="ANGLE" value="4" enum="Tool">
Paint textures rotated by an angle.
</constant>
<constant name="SCALE" value="5" enum="Tool">
Paint textures scaled by a value.
</constant>
<constant name="AUTOSHADER" value="6" enum="Tool">
Paint where the shader automatically textures.
</constant>
<constant name="HOLES" value="5" enum="Tool">
<constant name="HOLES" value="7" enum="Tool">
Paint where vertices will be invalidated to leave holes.
</constant>
<constant name="NAVIGATION" value="6" enum="Tool">
<constant name="NAVIGATION" value="8" enum="Tool">
Paint where navigation will be generated.
</constant>
<constant name="REGION" value="7" enum="Tool">
<constant name="REGION" value="9" enum="Tool">
Add/remove regions.
</constant>
<constant name="TOOL_MAX" value="8" enum="Tool">
<constant name="TOOL_MAX" value="10" enum="Tool">
The number of elements in this enum.
</constant>
</constants>
Expand Down
Loading

0 comments on commit 32ccfbf

Please sign in to comment.