classref: Sync with latest 4.0-dev

This commit is contained in:
Rémi Verschelde
2021-10-05 16:09:21 +02:00
parent 6952796767
commit f6f6c1bf19
958 changed files with 113054 additions and 52009 deletions

View File

@@ -0,0 +1,302 @@
:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the PhysicalBone3D.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_PhysicalBone3D:
PhysicalBone3D
==============
**Inherits:** :ref:`PhysicsBody3D<class_PhysicsBody3D>` **<** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Properties
----------
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` | ``-1.0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Transform3D<class_Transform3D>` | :ref:`body_offset<class_PhysicalBone3D_property_body_offset>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`bounce<class_PhysicalBone3D_property_bounce>` | ``0.0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`can_sleep<class_PhysicalBone3D_property_can_sleep>` | ``true`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`friction<class_PhysicalBone3D_property_friction>` | ``1.0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`gravity_scale<class_PhysicalBone3D_property_gravity_scale>` | ``1.0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Transform3D<class_Transform3D>` | :ref:`joint_offset<class_PhysicalBone3D_property_joint_offset>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`joint_rotation<class_PhysicalBone3D_property_joint_rotation>` | ``Vector3(0, 0, 0)`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`JointType<enum_PhysicalBone3D_JointType>` | :ref:`joint_type<class_PhysicalBone3D_property_joint_type>` | ``0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` | ``-1.0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`mass<class_PhysicalBone3D_property_mass>` | ``1.0`` |
+-------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+
Methods
-------
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_central_impulse<class_PhysicalBone3D_method_apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>` **(** **)** |const| |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_simulate_physics<class_PhysicalBone3D_method_get_simulate_physics>` **(** **)** |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone3D_method_is_simulating_physics>` **(** **)** |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Enumerations
------------
.. _enum_PhysicalBone3D_JointType:
.. _class_PhysicalBone3D_constant_JOINT_TYPE_NONE:
.. _class_PhysicalBone3D_constant_JOINT_TYPE_PIN:
.. _class_PhysicalBone3D_constant_JOINT_TYPE_CONE:
.. _class_PhysicalBone3D_constant_JOINT_TYPE_HINGE:
.. _class_PhysicalBone3D_constant_JOINT_TYPE_SLIDER:
.. _class_PhysicalBone3D_constant_JOINT_TYPE_6DOF:
enum **JointType**:
- **JOINT_TYPE_NONE** = **0**
- **JOINT_TYPE_PIN** = **1**
- **JOINT_TYPE_CONE** = **2**
- **JOINT_TYPE_HINGE** = **3**
- **JOINT_TYPE_SLIDER** = **4**
- **JOINT_TYPE_6DOF** = **5**
Property Descriptions
---------------------
.. _class_PhysicalBone3D_property_angular_damp:
- :ref:`float<class_float>` **angular_damp**
+-----------+-------------------------+
| *Default* | ``-1.0`` |
+-----------+-------------------------+
| *Setter* | set_angular_damp(value) |
+-----------+-------------------------+
| *Getter* | get_angular_damp() |
+-----------+-------------------------+
Damps the body's rotation if greater than ``0``.
----
.. _class_PhysicalBone3D_property_body_offset:
- :ref:`Transform3D<class_Transform3D>` **body_offset**
+-----------+-----------------------------------------------------+
| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
+-----------+-----------------------------------------------------+
| *Setter* | set_body_offset(value) |
+-----------+-----------------------------------------------------+
| *Getter* | get_body_offset() |
+-----------+-----------------------------------------------------+
Sets the body's transform.
----
.. _class_PhysicalBone3D_property_bounce:
- :ref:`float<class_float>` **bounce**
+-----------+-------------------+
| *Default* | ``0.0`` |
+-----------+-------------------+
| *Setter* | set_bounce(value) |
+-----------+-------------------+
| *Getter* | get_bounce() |
+-----------+-------------------+
The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness).
----
.. _class_PhysicalBone3D_property_can_sleep:
- :ref:`bool<class_bool>` **can_sleep**
+-----------+----------------------+
| *Default* | ``true`` |
+-----------+----------------------+
| *Setter* | set_can_sleep(value) |
+-----------+----------------------+
| *Getter* | is_able_to_sleep() |
+-----------+----------------------+
If ``true``, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force.
----
.. _class_PhysicalBone3D_property_friction:
- :ref:`float<class_float>` **friction**
+-----------+---------------------+
| *Default* | ``1.0`` |
+-----------+---------------------+
| *Setter* | set_friction(value) |
+-----------+---------------------+
| *Getter* | get_friction() |
+-----------+---------------------+
The body's friction, from ``0`` (frictionless) to ``1`` (max friction).
----
.. _class_PhysicalBone3D_property_gravity_scale:
- :ref:`float<class_float>` **gravity_scale**
+-----------+--------------------------+
| *Default* | ``1.0`` |
+-----------+--------------------------+
| *Setter* | set_gravity_scale(value) |
+-----------+--------------------------+
| *Getter* | get_gravity_scale() |
+-----------+--------------------------+
This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
----
.. _class_PhysicalBone3D_property_joint_offset:
- :ref:`Transform3D<class_Transform3D>` **joint_offset**
+-----------+-----------------------------------------------------+
| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
+-----------+-----------------------------------------------------+
| *Setter* | set_joint_offset(value) |
+-----------+-----------------------------------------------------+
| *Getter* | get_joint_offset() |
+-----------+-----------------------------------------------------+
Sets the joint's transform.
----
.. _class_PhysicalBone3D_property_joint_rotation:
- :ref:`Vector3<class_Vector3>` **joint_rotation**
+-----------+---------------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+---------------------------+
| *Setter* | set_joint_rotation(value) |
+-----------+---------------------------+
| *Getter* | get_joint_rotation() |
+-----------+---------------------------+
Sets the joint's rotation in radians.
----
.. _class_PhysicalBone3D_property_joint_type:
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **joint_type**
+-----------+-----------------------+
| *Default* | ``0`` |
+-----------+-----------------------+
| *Setter* | set_joint_type(value) |
+-----------+-----------------------+
| *Getter* | get_joint_type() |
+-----------+-----------------------+
Sets the joint type. See :ref:`JointType<enum_PhysicalBone3D_JointType>` for possible values.
----
.. _class_PhysicalBone3D_property_linear_damp:
- :ref:`float<class_float>` **linear_damp**
+-----------+------------------------+
| *Default* | ``-1.0`` |
+-----------+------------------------+
| *Setter* | set_linear_damp(value) |
+-----------+------------------------+
| *Getter* | get_linear_damp() |
+-----------+------------------------+
Damps the body's movement if greater than ``0``.
----
.. _class_PhysicalBone3D_property_mass:
- :ref:`float<class_float>` **mass**
+-----------+-----------------+
| *Default* | ``1.0`` |
+-----------+-----------------+
| *Setter* | set_mass(value) |
+-----------+-----------------+
| *Getter* | get_mass() |
+-----------+-----------------+
The body's mass.
Method Descriptions
-------------------
.. _class_PhysicalBone3D_method_apply_central_impulse:
- void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)**
----
.. _class_PhysicalBone3D_method_apply_impulse:
- void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)**
----
.. _class_PhysicalBone3D_method_get_bone_id:
- :ref:`int<class_int>` **get_bone_id** **(** **)** |const|
----
.. _class_PhysicalBone3D_method_get_simulate_physics:
- :ref:`bool<class_bool>` **get_simulate_physics** **(** **)**
----
.. _class_PhysicalBone3D_method_is_simulating_physics:
- :ref:`bool<class_bool>` **is_simulating_physics** **(** **)**
.. |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.)`