mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
152 lines
9.0 KiB
ReStructuredText
152 lines
9.0 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
|
|
|
|
.. _class_Physics2DShapeQueryParameters:
|
|
|
|
Physics2DShapeQueryParameters
|
|
=============================
|
|
|
|
**Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Parameters to be sent to a 2D shape physics query.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_array>` | :ref:`get_exclude<class_Physics2DShapeQueryParameters_get_exclude>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_layer_mask<class_Physics2DShapeQueryParameters_get_layer_mask>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_margin<class_Physics2DShapeQueryParameters_get_margin>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_vector2>` | :ref:`get_motion<class_Physics2DShapeQueryParameters_get_motion>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_object_type_mask<class_Physics2DShapeQueryParameters_get_object_type_mask>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_rid>` | :ref:`get_shape_rid<class_Physics2DShapeQueryParameters_get_shape_rid>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Matrix32<class_matrix32>` | :ref:`get_transform<class_Physics2DShapeQueryParameters_get_transform>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_exclude<class_Physics2DShapeQueryParameters_set_exclude>` **(** :ref:`Array<class_array>` exclude **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_layer_mask<class_Physics2DShapeQueryParameters_set_layer_mask>` **(** :ref:`int<class_int>` layer_mask **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_margin<class_Physics2DShapeQueryParameters_set_margin>` **(** :ref:`float<class_float>` margin **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_motion<class_Physics2DShapeQueryParameters_set_motion>` **(** :ref:`Vector2<class_vector2>` motion **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_object_type_mask<class_Physics2DShapeQueryParameters_set_object_type_mask>` **(** :ref:`int<class_int>` object_type_mask **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_shape<class_Physics2DShapeQueryParameters_set_shape>` **(** :ref:`Shape2D<class_shape2d>` shape **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_shape_rid<class_Physics2DShapeQueryParameters_set_shape_rid>` **(** :ref:`RID<class_rid>` shape **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_transform<class_Physics2DShapeQueryParameters_set_transform>` **(** :ref:`Matrix32<class_matrix32>` transform **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Description
|
|
-----------
|
|
|
|
This class contains the shape and other parameters for intersection/collision queries.
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_exclude:
|
|
|
|
- :ref:`Array<class_array>` **get_exclude** **(** **)** const
|
|
|
|
Return the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_layer_mask:
|
|
|
|
- :ref:`int<class_int>` **get_layer_mask** **(** **)** const
|
|
|
|
Return the physics layer(s) the shape belongs to.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_margin:
|
|
|
|
- :ref:`float<class_float>` **get_margin** **(** **)** const
|
|
|
|
Return the collision margin for the shape.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_motion:
|
|
|
|
- :ref:`Vector2<class_vector2>` **get_motion** **(** **)** const
|
|
|
|
Return the current movement speed of the shape.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_object_type_mask:
|
|
|
|
- :ref:`int<class_int>` **get_object_type_mask** **(** **)** const
|
|
|
|
Return the type of object the shape belongs to.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_shape_rid:
|
|
|
|
- :ref:`RID<class_rid>` **get_shape_rid** **(** **)** const
|
|
|
|
Return the :ref:`RID<class_rid>` of the shape queried.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_get_transform:
|
|
|
|
- :ref:`Matrix32<class_matrix32>` **get_transform** **(** **)** const
|
|
|
|
Return the transform matrix of the shape queried.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_exclude:
|
|
|
|
- void **set_exclude** **(** :ref:`Array<class_array>` exclude **)**
|
|
|
|
Set the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_layer_mask:
|
|
|
|
- void **set_layer_mask** **(** :ref:`int<class_int>` layer_mask **)**
|
|
|
|
Set the physics layer(s) the shape belongs to.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_margin:
|
|
|
|
- void **set_margin** **(** :ref:`float<class_float>` margin **)**
|
|
|
|
Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_motion:
|
|
|
|
- void **set_motion** **(** :ref:`Vector2<class_vector2>` motion **)**
|
|
|
|
Set the current movement speed of the shape.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_object_type_mask:
|
|
|
|
- void **set_object_type_mask** **(** :ref:`int<class_int>` object_type_mask **)**
|
|
|
|
Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK\_\*).
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_shape:
|
|
|
|
- void **set_shape** **(** :ref:`Shape2D<class_shape2d>` shape **)**
|
|
|
|
Set the :ref:`Shape2D<class_shape2d>` that will be used for collision/intersection queries.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_shape_rid:
|
|
|
|
- void **set_shape_rid** **(** :ref:`RID<class_rid>` shape **)**
|
|
|
|
Set the :ref:`RID<class_rid>` of the shape to be used in queries.
|
|
|
|
.. _class_Physics2DShapeQueryParameters_set_transform:
|
|
|
|
- void **set_transform** **(** :ref:`Matrix32<class_matrix32>` transform **)**
|
|
|
|
Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.
|
|
|
|
|