Skip to content

Commit

Permalink
Update docs w/ assets and instancer classes
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Apr 12, 2024
1 parent 4da0b1a commit 9197499
Show file tree
Hide file tree
Showing 17 changed files with 783 additions and 305 deletions.
72 changes: 62 additions & 10 deletions doc/api/class_terrain3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Properties
.. table::
:widths: auto

+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DAssets<class_Terrain3DAssets>` | :ref:`assets<class_Terrain3D_property_assets>` | |
+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
| :ref:`bool<class_bool>` | :ref:`collision_enabled<class_Terrain3D_property_collision_enabled>` | ``true`` |
+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
Expand All @@ -42,6 +44,8 @@ Properties
+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
| :ref:`bool<class_bool>` | :ref:`debug_show_collision<class_Terrain3D_property_debug_show_collision>` | ``false`` |
+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` | :ref:`instancer<class_Terrain3D_property_instancer>` | |
+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DMaterial<class_Terrain3DMaterial>` | :ref:`material<class_Terrain3D_property_material>` | |
+---------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
| :ref:`int<class_int>` | :ref:`mesh_lods<class_Terrain3D_property_mesh_lods>` | ``7`` |
Expand Down Expand Up @@ -100,37 +104,49 @@ Methods
Signals
-------

.. _class_Terrain3D_signal_material_changed:
.. _class_Terrain3D_signal_assets_changed:

.. rst-class:: classref-signal

**material_changed** **(** **)**
**assets_changed** **(** **)**

Emitted when :ref:`material<class_Terrain3D_property_material>` is changed.
Emitted when :ref:`assets<class_Terrain3D_property_assets>` is changed.

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

----

.. _class_Terrain3D_signal_storage_changed:
.. _class_Terrain3D_signal_instancer_changed:

.. rst-class:: classref-signal

**storage_changed** **(** **)**
**instancer_changed** **(** **)**

Emitted when :ref:`storage<class_Terrain3D_property_storage>` is changed.
Emitted when :ref:`instancer<class_Terrain3D_property_instancer>` is changed.

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

----

.. _class_Terrain3D_signal_texture_list_changed:
.. _class_Terrain3D_signal_material_changed:

.. rst-class:: classref-signal

**texture_list_changed** **(** **)**
**material_changed** **(** **)**

Emitted when :ref:`material<class_Terrain3D_property_material>` is changed.

Emitted when :ref:`texture_list<class_Terrain3D_property_texture_list>` is changed.
.. rst-class:: classref-item-separator

----

.. _class_Terrain3D_signal_storage_changed:

.. rst-class:: classref-signal

**storage_changed** **(** **)**

Emitted when :ref:`storage<class_Terrain3D_property_storage>` is changed.

.. rst-class:: classref-section-separator

Expand All @@ -141,6 +157,23 @@ Emitted when :ref:`texture_list<class_Terrain3D_property_texture_list>` is chang
Property Descriptions
---------------------

.. _class_Terrain3D_property_assets:

.. rst-class:: classref-property

:ref:`Terrain3DAssets<class_Terrain3DAssets>` **assets**

.. rst-class:: classref-property-setget

- void **set_assets** **(** :ref:`Terrain3DAssets<class_Terrain3DAssets>` value **)**
- :ref:`Terrain3DAssets<class_Terrain3DAssets>` **get_assets** **(** **)**

The list of texture files used by Terrain3D. You can optionally save this as an external ``.tres`` text file if you wish to share it with instances of Terrain3D in other scenes.

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

----

.. _class_Terrain3D_property_collision_enabled:

.. rst-class:: classref-property
Expand Down Expand Up @@ -243,6 +276,25 @@ If collision is enabled, this generates collision in the editor and in game. It

----

.. _class_Terrain3D_property_instancer:

.. rst-class:: classref-property

:ref:`Terrain3DInstancer<class_Terrain3DInstancer>` **instancer**

.. rst-class:: classref-property-setget

- void **set_instancer** **(** :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` value **)**
- :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` **get_instancer** **(** **)**

.. container:: contribute

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!

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

----

.. _class_Terrain3D_property_material:

.. rst-class:: classref-property
Expand Down Expand Up @@ -419,7 +471,7 @@ The object that houses all Terrain3D region, height, control, and color maps. Ma
- void **set_texture_list** **(** :ref:`Terrain3DTextureList<class_Terrain3DTextureList>` value **)**
- :ref:`Terrain3DTextureList<class_Terrain3DTextureList>` **get_texture_list** **(** **)**

The list of texture files used by Terrain3D. You can optionally save this as an external ``.tres`` text file if you wish to share it with instances of Terrain3D in other scenes.
Deprecated. See :ref:`assets<class_Terrain3D_property_assets>`.

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

Expand Down
167 changes: 167 additions & 0 deletions doc/api/class_terrain3dassetlist.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
:github_url: hide

.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/../_plugins/Terrain3D/doc/classes/Terrain3DAssetList.xml.
.. _class_Terrain3DAssetList:

Terrain3DAssetList
==================

**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

.. rst-class:: classref-introduction-group

Description
-----------

This class contains an array of ``Terrain3DTexture`` objects in 32 slots. It is a savable resource, so you can save it to disk and use the same texture list in multiple scenes that use Terrain3D. The amount of data is small, so it can be saved as a git-friendly, text based .tres file or left within the scene file.

.. rst-class:: classref-reftable-group

Properties
----------

.. table::
:widths: auto

+---------------------------------------------------+-------------------------------------------------------------+--------+
| :ref:`Terrain3DTexture[]<class_Terrain3DTexture>` | :ref:`textures<class_Terrain3DAssetList_property_textures>` | ``[]`` |
+---------------------------------------------------+-------------------------------------------------------------+--------+

.. rst-class:: classref-reftable-group

Methods
-------

.. table::
:widths: auto

+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Terrain3DTexture<class_Terrain3DTexture>` | :ref:`get_texture<class_Terrain3DAssetList_method_get_texture>` **(** :ref:`int<class_int>` index **)** |
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_texture_count<class_Terrain3DAssetList_method_get_texture_count>` **(** **)** |
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`save<class_Terrain3DAssetList_method_save>` **(** **)** |
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_texture<class_Terrain3DAssetList_method_set_texture>` **(** :ref:`int<class_int>` index, :ref:`Terrain3DTexture<class_Terrain3DTexture>` texture **)** |
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

.. rst-class:: classref-section-separator

----

.. rst-class:: classref-descriptions-group

Signals
-------

.. _class_Terrain3DAssetList_signal_textures_changed:

.. rst-class:: classref-signal

**textures_changed** **(** **)**

Emitted when this list is updated due to changes in the texture slots, or the files or settings in any of the Terrain3DTextures.

.. rst-class:: classref-section-separator

----

.. rst-class:: classref-descriptions-group

Constants
---------

.. _class_Terrain3DAssetList_constant_MAX_TEXTURES:

.. rst-class:: classref-constant

**MAX_TEXTURES** = ``32``

Hard coded maximum number of textures, with IDs in the range of 0-31.

.. rst-class:: classref-section-separator

----

.. rst-class:: classref-descriptions-group

Property Descriptions
---------------------

.. _class_Terrain3DAssetList_property_textures:

.. rst-class:: classref-property

:ref:`Terrain3DTexture[]<class_Terrain3DTexture>` **textures** = ``[]``

.. rst-class:: classref-property-setget

- void **set_textures** **(** :ref:`Terrain3DTexture[]<class_Terrain3DTexture>` value **)**
- :ref:`Terrain3DTexture[]<class_Terrain3DTexture>` **get_textures** **(** **)**

The array of Terrain3DTextures.

.. rst-class:: classref-section-separator

----

.. rst-class:: classref-descriptions-group

Method Descriptions
-------------------

.. _class_Terrain3DAssetList_method_get_texture:

.. rst-class:: classref-method

:ref:`Terrain3DTexture<class_Terrain3DTexture>` **get_texture** **(** :ref:`int<class_int>` index **)**

Returns the Terrain3DTexture with the requested ID.

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

----

.. _class_Terrain3DAssetList_method_get_texture_count:

.. rst-class:: classref-method

:ref:`int<class_int>` **get_texture_count** **(** **)**

Returns the number of texture slots used.

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

----

.. _class_Terrain3DAssetList_method_save:

.. rst-class:: classref-method

void **save** **(** **)**

Saves this texture list resource to disk, if saved as an external ``.tres`` or ``.res`` resource file.

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

----

.. _class_Terrain3DAssetList_method_set_texture:

.. rst-class:: classref-method

void **set_texture** **(** :ref:`int<class_int>` index, :ref:`Terrain3DTexture<class_Terrain3DTexture>` texture **)**

Adds a Terrain3DTexture at the specified ID slot. The texture can be null to clear the slot, or remove it if its the last in the list. If the specified slot is full, it will be swapped with the source texture ID, or will find the next available ID.

.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
Loading

0 comments on commit 9197499

Please sign in to comment.