generated from nathanfranke/gdextension
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6205e56
commit 8e957a7
Showing
12 changed files
with
636 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,328 @@ | ||
: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/doc_classes/Terrain3DCollision.xml. | ||
.. _class_Terrain3DCollision: | ||
|
||
Terrain3DCollision | ||
================== | ||
|
||
**Inherits:** ``Object`` | ||
|
||
.. rst-class:: classref-introduction-group | ||
|
||
Description | ||
----------- | ||
|
||
This class manages collision. | ||
|
||
.. rst-class:: classref-reftable-group | ||
|
||
Properties | ||
---------- | ||
|
||
.. table:: | ||
:widths: auto | ||
|
||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
| ``int`` | :ref:`layer<class_Terrain3DCollision_property_layer>` | ``1`` | | ||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
| ``int`` | :ref:`mask<class_Terrain3DCollision_property_mask>` | ``1`` | | ||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
| :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` | :ref:`mode<class_Terrain3DCollision_property_mode>` | ``1`` | | ||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
| ``float`` | :ref:`priority<class_Terrain3DCollision_property_priority>` | ``1.0`` | | ||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
| ``int`` | :ref:`radius<class_Terrain3DCollision_property_radius>` | ``64`` | | ||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
| ``int`` | :ref:`shape_size<class_Terrain3DCollision_property_shape_size>` | ``16`` | | ||
+-------------------------------------------------------------+-----------------------------------------------------------------+---------+ | ||
|
||
.. rst-class:: classref-reftable-group | ||
|
||
Methods | ||
------- | ||
|
||
.. table:: | ||
:widths: auto | ||
|
||
+----------+---------------------------------------------------------------------------------------+ | ||
| |void| | :ref:`build<class_Terrain3DCollision_method_build>`\ (\ ) | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
| |void| | :ref:`destroy<class_Terrain3DCollision_method_destroy>`\ (\ ) | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
| ``RID`` | :ref:`get_rid<class_Terrain3DCollision_method_get_rid>`\ (\ ) |const| | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
| ``bool`` | :ref:`is_dynamic_mode<class_Terrain3DCollision_method_is_dynamic_mode>`\ (\ ) |const| | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
| ``bool`` | :ref:`is_editor_mode<class_Terrain3DCollision_method_is_editor_mode>`\ (\ ) |const| | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
| ``bool`` | :ref:`is_enabled<class_Terrain3DCollision_method_is_enabled>`\ (\ ) |const| | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
| |void| | :ref:`update<class_Terrain3DCollision_method_update>`\ (\ force\: ``bool`` = false\ ) | | ||
+----------+---------------------------------------------------------------------------------------+ | ||
|
||
.. rst-class:: classref-section-separator | ||
|
||
---- | ||
|
||
.. rst-class:: classref-descriptions-group | ||
|
||
Enumerations | ||
------------ | ||
|
||
.. _enum_Terrain3DCollision_CollisionMode: | ||
|
||
.. rst-class:: classref-enumeration | ||
|
||
enum **CollisionMode**: :ref:`🔗<enum_Terrain3DCollision_CollisionMode>` | ||
|
||
.. _class_Terrain3DCollision_constant_DISABLED: | ||
|
||
.. rst-class:: classref-enumeration-constant | ||
|
||
:ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **DISABLED** = ``0`` | ||
|
||
No collision shapes will be generated. | ||
|
||
.. _class_Terrain3DCollision_constant_DYNAMIC_GAME: | ||
|
||
.. rst-class:: classref-enumeration-constant | ||
|
||
:ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **DYNAMIC_GAME** = ``1`` | ||
|
||
Collision shapes are generated around the camera as it moves; in game only. | ||
|
||
.. _class_Terrain3DCollision_constant_DYNAMIC_EDITOR: | ||
|
||
.. rst-class:: classref-enumeration-constant | ||
|
||
:ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **DYNAMIC_EDITOR** = ``2`` | ||
|
||
Collision shapes are generated around the camera as it moves; in the editor and in game. Enable ``View Gizmos`` in the viewport menu to see them. | ||
|
||
.. _class_Terrain3DCollision_constant_FULL_GAME: | ||
|
||
.. rst-class:: classref-enumeration-constant | ||
|
||
:ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **FULL_GAME** = ``3`` | ||
|
||
Collision shapes are generated for all regions in game only. | ||
|
||
.. _class_Terrain3DCollision_constant_FULL_EDITOR: | ||
|
||
.. rst-class:: classref-enumeration-constant | ||
|
||
:ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **FULL_EDITOR** = ``4`` | ||
|
||
Collision shapes are generated for all regions in the editor and in game. This mode is necessary for some 3rd party plugins to detect the terrain using collision. Enable ``View Gizmos`` in the viewport menu to see the collision mesh. | ||
|
||
.. rst-class:: classref-section-separator | ||
|
||
---- | ||
|
||
.. rst-class:: classref-descriptions-group | ||
|
||
Property Descriptions | ||
--------------------- | ||
|
||
.. _class_Terrain3DCollision_property_layer: | ||
|
||
.. rst-class:: classref-property | ||
|
||
``int`` **layer** = ``1`` :ref:`🔗<class_Terrain3DCollision_property_layer>` | ||
|
||
.. rst-class:: classref-property-setget | ||
|
||
- |void| **set_layer**\ (\ value\: ``int``\ ) | ||
- ``int`` **get_layer**\ (\ ) | ||
|
||
The physics layers the terrain lives on. Sets ``CollisionObject3D.collision_layer``. Also see :ref:`mask<class_Terrain3DCollision_property_mask>`. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_property_mask: | ||
|
||
.. rst-class:: classref-property | ||
|
||
``int`` **mask** = ``1`` :ref:`🔗<class_Terrain3DCollision_property_mask>` | ||
|
||
.. rst-class:: classref-property-setget | ||
|
||
- |void| **set_mask**\ (\ value\: ``int``\ ) | ||
- ``int`` **get_mask**\ (\ ) | ||
|
||
The physics layers the physics body scans for colliding objects. Sets ``CollisionObject3D.collision_mask``. Also see :ref:`layer<class_Terrain3DCollision_property_layer>`. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_property_mode: | ||
|
||
.. rst-class:: classref-property | ||
|
||
:ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **mode** = ``1`` :ref:`🔗<class_Terrain3DCollision_property_mode>` | ||
|
||
.. rst-class:: classref-property-setget | ||
|
||
- |void| **set_mode**\ (\ value\: :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>`\ ) | ||
- :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **get_mode**\ (\ ) | ||
|
||
The selected mode determines if collision is generated and how. See :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` for details. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_property_priority: | ||
|
||
.. rst-class:: classref-property | ||
|
||
``float`` **priority** = ``1.0`` :ref:`🔗<class_Terrain3DCollision_property_priority>` | ||
|
||
.. rst-class:: classref-property-setget | ||
|
||
- |void| **set_priority**\ (\ value\: ``float``\ ) | ||
- ``float`` **get_priority**\ (\ ) | ||
|
||
The priority with which the physics server uses to solve collisions. The higher the priority, the lower the penetration of a colliding object. Sets ``CollisionObject3D.collision_priority``. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_property_radius: | ||
|
||
.. rst-class:: classref-property | ||
|
||
``int`` **radius** = ``64`` :ref:`🔗<class_Terrain3DCollision_property_radius>` | ||
|
||
.. rst-class:: classref-property-setget | ||
|
||
- |void| **set_radius**\ (\ value\: ``int``\ ) | ||
- ``int`` **get_radius**\ (\ ) | ||
|
||
If :ref:`mode<class_Terrain3DCollision_property_mode>` is Dynamic, this is the distance range within which collision shapes will be generated. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_property_shape_size: | ||
|
||
.. rst-class:: classref-property | ||
|
||
``int`` **shape_size** = ``16`` :ref:`🔗<class_Terrain3DCollision_property_shape_size>` | ||
|
||
.. rst-class:: classref-property-setget | ||
|
||
- |void| **set_shape_size**\ (\ value\: ``int``\ ) | ||
- ``int`` **get_shape_size**\ (\ ) | ||
|
||
If :ref:`mode<class_Terrain3DCollision_property_mode>` is Dynamic, this is the size of each collision shape. | ||
|
||
.. rst-class:: classref-section-separator | ||
|
||
---- | ||
|
||
.. rst-class:: classref-descriptions-group | ||
|
||
Method Descriptions | ||
------------------- | ||
|
||
.. _class_Terrain3DCollision_method_build: | ||
|
||
.. rst-class:: classref-method | ||
|
||
|void| **build**\ (\ ) :ref:`🔗<class_Terrain3DCollision_method_build>` | ||
|
||
Creates collision shapes and calls :ref:`update<class_Terrain3DCollision_method_update>` to shape them. Calls :ref:`destroy<class_Terrain3DCollision_method_destroy>` first, so it is safe to call this to fully rebuild collision any time. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_method_destroy: | ||
|
||
.. rst-class:: classref-method | ||
|
||
|void| **destroy**\ (\ ) :ref:`🔗<class_Terrain3DCollision_method_destroy>` | ||
|
||
Removes all collision shapes and frees any memory used. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_method_get_rid: | ||
|
||
.. rst-class:: classref-method | ||
|
||
``RID`` **get_rid**\ (\ ) |const| :ref:`🔗<class_Terrain3DCollision_method_get_rid>` | ||
|
||
Returns the RID of the active StaticBody. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_method_is_dynamic_mode: | ||
|
||
.. rst-class:: classref-method | ||
|
||
``bool`` **is_dynamic_mode**\ (\ ) |const| :ref:`🔗<class_Terrain3DCollision_method_is_dynamic_mode>` | ||
|
||
Returns true if :ref:`mode<class_Terrain3DCollision_property_mode>` is ``Dynamic / Editor`` or ``Dynamic / Game``. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_method_is_editor_mode: | ||
|
||
.. rst-class:: classref-method | ||
|
||
``bool`` **is_editor_mode**\ (\ ) |const| :ref:`🔗<class_Terrain3DCollision_method_is_editor_mode>` | ||
|
||
Returns true if :ref:`mode<class_Terrain3DCollision_property_mode>` is ``Full / Editor`` or ``Dynamic / Editor``. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_method_is_enabled: | ||
|
||
.. rst-class:: classref-method | ||
|
||
``bool`` **is_enabled**\ (\ ) |const| :ref:`🔗<class_Terrain3DCollision_method_is_enabled>` | ||
|
||
Returns true if :ref:`mode<class_Terrain3DCollision_property_mode>` is not ``Disabled``. | ||
|
||
.. rst-class:: classref-item-separator | ||
|
||
---- | ||
|
||
.. _class_Terrain3DCollision_method_update: | ||
|
||
.. rst-class:: classref-method | ||
|
||
|void| **update**\ (\ force\: ``bool`` = false\ ) :ref:`🔗<class_Terrain3DCollision_method_update>` | ||
|
||
- If :ref:`mode<class_Terrain3DCollision_property_mode>` is Full, updates the existing collision shapes. If regions have been added or removed, set ``force`` to true or call :ref:`build<class_Terrain3DCollision_method_build>` instead. Can be slow. | ||
|
||
- If :ref:`mode<class_Terrain3DCollision_property_mode>` is Dynamic, repositions collision shapes around the camera and recalculated ones not already in place, skipping those that are. Set ``force`` to true to recalculate all shapes. This is very fast, and can be updated at 60fps for little cost. | ||
|
||
.. |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.)` | ||
.. |void| replace:: :abbr:`void (No return value.)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.