Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Aug 4, 2024
1 parent e7665f5 commit 8a45d61
Show file tree
Hide file tree
Showing 31 changed files with 572 additions and 346 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Private & Public:

Other formatting:
* One blank line between functions
* All code passed through clang-format. See below
* All code passed through clang-format. See above


## Documentation
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Cory Petkovsek, Roope Palmroos, and Contributors.
Copyright (c) 2024 Cory Petkovsek, Roope Palmroos, and Contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion Terrain3D.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
<None Include="AUTHORS.md" />
<None Include="CONTRIBUTING.md" />
<None Include="doc\conf.py" />
<None Include="doc\docs\collision.md" />
<None Include="doc\docs\double_precision.md" />
<None Include="doc\docs\games.md" />
<None Include="doc\docs\instancer.md" />
Expand Down Expand Up @@ -213,7 +214,7 @@
<Text Include=".readthedocs.yaml" />
<Text Include="doc\docs\project_status.md" />
<Text Include="doc\docs\import_export.md" />
<Text Include="doc\docs\integrating.md" />
<Text Include="doc\docs\programming_languages.md" />
<Text Include="doc\docs\occlusion_culling.md" />
<Text Include="doc\docs\shader_design.md" />
<Text Include="doc\docs\system_architecture.md" />
Expand Down
3 changes: 2 additions & 1 deletion Terrain3D.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
<None Include=".github\ISSUE_TEMPLATE\feature_request.yml">
<Filter>1. Project Files</Filter>
</None>
<None Include="doc\docs\collision.md" />
</ItemGroup>
<ItemGroup>
<Text Include=".readthedocs.yaml">
Expand All @@ -237,7 +238,7 @@
<Text Include="doc\docs\import_export.md">
<Filter>2. Docs</Filter>
</Text>
<Text Include="doc\docs\integrating.md">
<Text Include="doc\docs\programming_languages.md">
<Filter>2. Docs</Filter>
</Text>
<Text Include="doc\docs\occlusion_culling.md">
Expand Down
80 changes: 61 additions & 19 deletions doc/api/class_terrain3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,27 @@ Methods
.. table::
:widths: auto

+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Mesh<class_Mesh>` | :ref:`bake_mesh<class_Terrain3D_method_bake_mesh>`\ (\ lod\: :ref:`int<class_int>`, filter\: :ref:`HeightFilter<enum_Terrain3DStorage_HeightFilter>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`generate_nav_mesh_source_geometry<class_Terrain3D_method_generate_nav_mesh_source_geometry>`\ (\ global_aabb\: :ref:`AABB<class_AABB>`, require_nav\: :ref:`bool<class_bool>` = true\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Camera3D<class_Camera3D>` | :ref:`get_camera<class_Terrain3D_method_get_camera>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`get_intersection<class_Terrain3D_method_get_intersection>`\ (\ src_pos\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorPlugin<class_EditorPlugin>` | :ref:`get_plugin<class_Terrain3D_method_get_plugin>`\ (\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_camera<class_Terrain3D_method_set_camera>`\ (\ camera\: :ref:`Camera3D<class_Camera3D>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_plugin<class_Terrain3D_method_set_plugin>`\ (\ plugin\: :ref:`EditorPlugin<class_EditorPlugin>`\ ) |
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Mesh<class_Mesh>` | :ref:`bake_mesh<class_Terrain3D_method_bake_mesh>`\ (\ lod\: :ref:`int<class_int>`, filter\: :ref:`HeightFilter<enum_Terrain3DStorage_HeightFilter>`\ ) |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`generate_nav_mesh_source_geometry<class_Terrain3D_method_generate_nav_mesh_source_geometry>`\ (\ global_aabb\: :ref:`AABB<class_AABB>`, require_nav\: :ref:`bool<class_bool>` = true\ ) |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Camera3D<class_Camera3D>` | :ref:`get_camera<class_Terrain3D_method_get_camera>`\ (\ ) |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`get_collision_rid<class_Terrain3D_method_get_collision_rid>`\ (\ ) |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Terrain3DEditor<class_Terrain3DEditor>` | :ref:`get_editor<class_Terrain3D_method_get_editor>`\ (\ ) |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`get_intersection<class_Terrain3D_method_get_intersection>`\ (\ src_pos\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorPlugin<class_EditorPlugin>` | :ref:`get_plugin<class_Terrain3D_method_get_plugin>`\ (\ ) |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_camera<class_Terrain3D_method_set_camera>`\ (\ camera\: :ref:`Camera3D<class_Camera3D>`\ ) |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_editor<class_Terrain3D_method_set_editor>`\ (\ editor\: :ref:`Terrain3DEditor<class_Terrain3DEditor>`\ ) |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_plugin<class_Terrain3D_method_set_plugin>`\ (\ plugin\: :ref:`EditorPlugin<class_EditorPlugin>`\ ) |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

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

Expand Down Expand Up @@ -485,7 +491,7 @@ Method Descriptions

.. rst-class:: classref-method

:ref:`Mesh<class_Mesh>` **bake_mesh**\ (\ lod\: :ref:`int<class_int>`, filter\: :ref:`HeightFilter<enum_Terrain3DStorage_HeightFilter>`\ ) :ref:`🔗<class_Terrain3D_method_bake_mesh>`
:ref:`Mesh<class_Mesh>` **bake_mesh**\ (\ lod\: :ref:`int<class_int>`, filter\: :ref:`HeightFilter<enum_Terrain3DStorage_HeightFilter>`\ ) |const| :ref:`🔗<class_Terrain3D_method_bake_mesh>`

Generates a static ArrayMesh for the terrain.

Expand All @@ -501,7 +507,7 @@ Generates a static ArrayMesh for the terrain.

.. rst-class:: classref-method

:ref:`PackedVector3Array<class_PackedVector3Array>` **generate_nav_mesh_source_geometry**\ (\ global_aabb\: :ref:`AABB<class_AABB>`, require_nav\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Terrain3D_method_generate_nav_mesh_source_geometry>`
:ref:`PackedVector3Array<class_PackedVector3Array>` **generate_nav_mesh_source_geometry**\ (\ global_aabb\: :ref:`AABB<class_AABB>`, require_nav\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Terrain3D_method_generate_nav_mesh_source_geometry>`

Generates source geometry faces for input to nav mesh baking. Geometry is only generated where there are no holes and the terrain has been painted as navigable.

Expand All @@ -517,14 +523,38 @@ Generates source geometry faces for input to nav mesh baking. Geometry is only g

.. rst-class:: classref-method

:ref:`Camera3D<class_Camera3D>` **get_camera**\ (\ ) :ref:`🔗<class_Terrain3D_method_get_camera>`
:ref:`Camera3D<class_Camera3D>` **get_camera**\ (\ ) |const| :ref:`🔗<class_Terrain3D_method_get_camera>`

Returns the camera the terrain is currently snapping to.

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

----

.. _class_Terrain3D_method_get_collision_rid:

.. rst-class:: classref-method

:ref:`RID<class_RID>` **get_collision_rid**\ (\ ) |const| :ref:`🔗<class_Terrain3D_method_get_collision_rid>`

Returns the RID of the active StaticBody.

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

----

.. _class_Terrain3D_method_get_editor:

.. rst-class:: classref-method

:ref:`Terrain3DEditor<class_Terrain3DEditor>` **get_editor**\ (\ ) |const| :ref:`🔗<class_Terrain3D_method_get_editor>`

Returns the current Terrain3DEditor instance, if it has been set.

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

----

.. _class_Terrain3D_method_get_intersection:

.. rst-class:: classref-method
Expand Down Expand Up @@ -555,7 +585,7 @@ It does require the use of an editor render layer (21-32) that should be dedicat

.. rst-class:: classref-method

:ref:`EditorPlugin<class_EditorPlugin>` **get_plugin**\ (\ ) :ref:`🔗<class_Terrain3D_method_get_plugin>`
:ref:`EditorPlugin<class_EditorPlugin>` **get_plugin**\ (\ ) |const| :ref:`🔗<class_Terrain3D_method_get_plugin>`

Returns the EditorPlugin connected to Terrain3D.

Expand All @@ -575,6 +605,18 @@ Sets the camera the terrain snaps to.

----

.. _class_Terrain3D_method_set_editor:

.. rst-class:: classref-method

|void| **set_editor**\ (\ editor\: :ref:`Terrain3DEditor<class_Terrain3DEditor>`\ ) :ref:`🔗<class_Terrain3D_method_set_editor>`

Sets the current Terrain3DEditor instance.

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

----

.. _class_Terrain3D_method_set_plugin:

.. rst-class:: classref-method
Expand Down
Loading

0 comments on commit 8a45d61

Please sign in to comment.