class_physics2dshapequeryparameters.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Physics2DShapeQueryParameters.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Physics2DShapeQueryParameters:
  5. Physics2DShapeQueryParameters
  6. =============================
  7. **Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Parameters to be sent to a 2D shape physics query.
  12. Member Functions
  13. ----------------
  14. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_collision_layer<class_Physics2DShapeQueryParameters_get_collision_layer>` **(** **)** const |
  16. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Array<class_array>` | :ref:`get_exclude<class_Physics2DShapeQueryParameters_get_exclude>` **(** **)** const |
  18. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`get_margin<class_Physics2DShapeQueryParameters_get_margin>` **(** **)** const |
  20. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Vector2<class_vector2>` | :ref:`get_motion<class_Physics2DShapeQueryParameters_get_motion>` **(** **)** const |
  22. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`RID<class_rid>` | :ref:`get_shape_rid<class_Physics2DShapeQueryParameters_get_shape_rid>` **(** **)** const |
  24. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Transform2D<class_transform2d>` | :ref:`get_transform<class_Physics2DShapeQueryParameters_get_transform>` **(** **)** const |
  26. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_collision_layer<class_Physics2DShapeQueryParameters_set_collision_layer>` **(** :ref:`int<class_int>` collision_layer **)** |
  28. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_exclude<class_Physics2DShapeQueryParameters_set_exclude>` **(** :ref:`Array<class_array>` exclude **)** |
  30. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_margin<class_Physics2DShapeQueryParameters_set_margin>` **(** :ref:`float<class_float>` margin **)** |
  32. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_motion<class_Physics2DShapeQueryParameters_set_motion>` **(** :ref:`Vector2<class_vector2>` motion **)** |
  34. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_shape<class_Physics2DShapeQueryParameters_set_shape>` **(** :ref:`Resource<class_resource>` shape **)** |
  36. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_shape_rid<class_Physics2DShapeQueryParameters_set_shape_rid>` **(** :ref:`RID<class_rid>` shape **)** |
  38. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_transform<class_Physics2DShapeQueryParameters_set_transform>` **(** :ref:`Transform2D<class_transform2d>` transform **)** |
  40. +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  41. Description
  42. -----------
  43. This class contains the shape and other parameters for intersection/collision queries.
  44. Member Function Description
  45. ---------------------------
  46. .. _class_Physics2DShapeQueryParameters_get_collision_layer:
  47. - :ref:`int<class_int>` **get_collision_layer** **(** **)** const
  48. Return the physics layer the shape belongs to.
  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_margin:
  53. - :ref:`float<class_float>` **get_margin** **(** **)** const
  54. Return the collision margin for the shape.
  55. .. _class_Physics2DShapeQueryParameters_get_motion:
  56. - :ref:`Vector2<class_vector2>` **get_motion** **(** **)** const
  57. Return the current movement speed of the shape.
  58. .. _class_Physics2DShapeQueryParameters_get_shape_rid:
  59. - :ref:`RID<class_rid>` **get_shape_rid** **(** **)** const
  60. Return the :ref:`RID<class_rid>` of the shape queried.
  61. .. _class_Physics2DShapeQueryParameters_get_transform:
  62. - :ref:`Transform2D<class_transform2d>` **get_transform** **(** **)** const
  63. Return the transform matrix of the shape queried.
  64. .. _class_Physics2DShapeQueryParameters_set_collision_layer:
  65. - void **set_collision_layer** **(** :ref:`int<class_int>` collision_layer **)**
  66. Set the physics layer the shape belongs to.
  67. .. _class_Physics2DShapeQueryParameters_set_exclude:
  68. - void **set_exclude** **(** :ref:`Array<class_array>` exclude **)**
  69. Set the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
  70. .. _class_Physics2DShapeQueryParameters_set_margin:
  71. - void **set_margin** **(** :ref:`float<class_float>` margin **)**
  72. 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.
  73. .. _class_Physics2DShapeQueryParameters_set_motion:
  74. - void **set_motion** **(** :ref:`Vector2<class_vector2>` motion **)**
  75. Set the current movement speed of the shape.
  76. .. _class_Physics2DShapeQueryParameters_set_shape:
  77. - void **set_shape** **(** :ref:`Resource<class_resource>` shape **)**
  78. Set the :ref:`Shape2D<class_shape2d>` that will be used for collision/intersection queries.
  79. .. _class_Physics2DShapeQueryParameters_set_shape_rid:
  80. - void **set_shape_rid** **(** :ref:`RID<class_rid>` shape **)**
  81. Set the :ref:`RID<class_rid>` of the shape to be used in queries.
  82. .. _class_Physics2DShapeQueryParameters_set_transform:
  83. - void **set_transform** **(** :ref:`Transform2D<class_transform2d>` transform **)**
  84. Set the transformation matrix of the shape. This is necessary to set its position/rotation/scale.