class_physics2dshapequeryparameters.rst 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Physics2DShapeQueryParameters:
  4. Physics2DShapeQueryParameters
  5. =============================
  6. **Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Parameters to be sent to a 2D shape physics query.
  11. Member Functions
  12. ----------------
  13. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`Array<class_array>` | :ref:`get_exclude<class_Physics2DShapeQueryParameters_get_exclude>` **(** **)** const |
  15. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_layer_mask<class_Physics2DShapeQueryParameters_get_layer_mask>` **(** **)** const |
  17. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`float<class_float>` | :ref:`get_margin<class_Physics2DShapeQueryParameters_get_margin>` **(** **)** const |
  19. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`Vector2<class_vector2>` | :ref:`get_motion<class_Physics2DShapeQueryParameters_get_motion>` **(** **)** const |
  21. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_object_type_mask<class_Physics2DShapeQueryParameters_get_object_type_mask>` **(** **)** const |
  23. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`RID<class_rid>` | :ref:`get_shape_rid<class_Physics2DShapeQueryParameters_get_shape_rid>` **(** **)** const |
  25. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Matrix32<class_matrix32>` | :ref:`get_transform<class_Physics2DShapeQueryParameters_get_transform>` **(** **)** const |
  27. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`set_exclude<class_Physics2DShapeQueryParameters_set_exclude>` **(** :ref:`Array<class_array>` exclude **)** |
  29. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`set_layer_mask<class_Physics2DShapeQueryParameters_set_layer_mask>` **(** :ref:`int<class_int>` layer_mask **)** |
  31. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`set_margin<class_Physics2DShapeQueryParameters_set_margin>` **(** :ref:`float<class_float>` margin **)** |
  33. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`set_motion<class_Physics2DShapeQueryParameters_set_motion>` **(** :ref:`Vector2<class_vector2>` motion **)** |
  35. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`set_object_type_mask<class_Physics2DShapeQueryParameters_set_object_type_mask>` **(** :ref:`int<class_int>` object_type_mask **)** |
  37. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`set_shape<class_Physics2DShapeQueryParameters_set_shape>` **(** :ref:`Shape2D<class_shape2d>` shape **)** |
  39. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`set_shape_rid<class_Physics2DShapeQueryParameters_set_shape_rid>` **(** :ref:`RID<class_rid>` shape **)** |
  41. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`set_transform<class_Physics2DShapeQueryParameters_set_transform>` **(** :ref:`Matrix32<class_matrix32>` transform **)** |
  43. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  44. Description
  45. -----------
  46. This class contains the shape and other parameters for intersection/collision queries.
  47. Member Function Description
  48. ---------------------------
  49. .. _class_Physics2DShapeQueryParameters_get_exclude:
  50. - :ref:`Array<class_array>` **get_exclude** **(** **)** const
  51. Return the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
  52. .. _class_Physics2DShapeQueryParameters_get_layer_mask:
  53. - :ref:`int<class_int>` **get_layer_mask** **(** **)** const
  54. Return the physics layer(s) the shape belongs to.
  55. .. _class_Physics2DShapeQueryParameters_get_margin:
  56. - :ref:`float<class_float>` **get_margin** **(** **)** const
  57. Return the collision margin for the shape.
  58. .. _class_Physics2DShapeQueryParameters_get_motion:
  59. - :ref:`Vector2<class_vector2>` **get_motion** **(** **)** const
  60. Return the current movement speed of the shape.
  61. .. _class_Physics2DShapeQueryParameters_get_object_type_mask:
  62. - :ref:`int<class_int>` **get_object_type_mask** **(** **)** const
  63. Return the type of object the shape belongs to.
  64. .. _class_Physics2DShapeQueryParameters_get_shape_rid:
  65. - :ref:`RID<class_rid>` **get_shape_rid** **(** **)** const
  66. Return the :ref:`RID<class_rid>` of the shape queried.
  67. .. _class_Physics2DShapeQueryParameters_get_transform:
  68. - :ref:`Matrix32<class_matrix32>` **get_transform** **(** **)** const
  69. Return the transform matrix of the shape queried.
  70. .. _class_Physics2DShapeQueryParameters_set_exclude:
  71. - void **set_exclude** **(** :ref:`Array<class_array>` exclude **)**
  72. Set the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
  73. .. _class_Physics2DShapeQueryParameters_set_layer_mask:
  74. - void **set_layer_mask** **(** :ref:`int<class_int>` layer_mask **)**
  75. Set the physics layer(s) the shape belongs to.
  76. .. _class_Physics2DShapeQueryParameters_set_margin:
  77. - void **set_margin** **(** :ref:`float<class_float>` margin **)**
  78. 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.
  79. .. _class_Physics2DShapeQueryParameters_set_motion:
  80. - void **set_motion** **(** :ref:`Vector2<class_vector2>` motion **)**
  81. Set the current movement speed of the shape.
  82. .. _class_Physics2DShapeQueryParameters_set_object_type_mask:
  83. - void **set_object_type_mask** **(** :ref:`int<class_int>` object_type_mask **)**
  84. Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK\_\*).
  85. .. _class_Physics2DShapeQueryParameters_set_shape:
  86. - void **set_shape** **(** :ref:`Shape2D<class_shape2d>` shape **)**
  87. Set the :ref:`Shape2D<class_shape2d>` that will be used for collision/intersection queries.
  88. .. _class_Physics2DShapeQueryParameters_set_shape_rid:
  89. - void **set_shape_rid** **(** :ref:`RID<class_rid>` shape **)**
  90. Set the :ref:`RID<class_rid>` of the shape to be used in queries.
  91. .. _class_Physics2DShapeQueryParameters_set_transform:
  92. - void **set_transform** **(** :ref:`Matrix32<class_matrix32>` transform **)**
  93. Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.