class_physics2dshapequeryparameters.rst 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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:`int<class_int>` | :ref:`get_object_type_mask<class_Physics2DShapeQueryParameters_get_object_type_mask>` **(** **)** const |
  24. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`RID<class_rid>` | :ref:`get_shape_rid<class_Physics2DShapeQueryParameters_get_shape_rid>` **(** **)** const |
  26. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Transform2D<class_transform2d>` | :ref:`get_transform<class_Physics2DShapeQueryParameters_get_transform>` **(** **)** const |
  28. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_collision_layer<class_Physics2DShapeQueryParameters_set_collision_layer>` **(** :ref:`int<class_int>` collision_layer **)** |
  30. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_exclude<class_Physics2DShapeQueryParameters_set_exclude>` **(** :ref:`Array<class_array>` exclude **)** |
  32. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_margin<class_Physics2DShapeQueryParameters_set_margin>` **(** :ref:`float<class_float>` margin **)** |
  34. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_motion<class_Physics2DShapeQueryParameters_set_motion>` **(** :ref:`Vector2<class_vector2>` motion **)** |
  36. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_object_type_mask<class_Physics2DShapeQueryParameters_set_object_type_mask>` **(** :ref:`int<class_int>` object_type_mask **)** |
  38. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_shape<class_Physics2DShapeQueryParameters_set_shape>` **(** :ref:`Resource<class_resource>` shape **)** |
  40. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_shape_rid<class_Physics2DShapeQueryParameters_set_shape_rid>` **(** :ref:`RID<class_rid>` shape **)** |
  42. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_transform<class_Physics2DShapeQueryParameters_set_transform>` **(** :ref:`Transform2D<class_transform2d>` transform **)** |
  44. +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
  45. Description
  46. -----------
  47. This class contains the shape and other parameters for intersection/collision queries.
  48. Member Function Description
  49. ---------------------------
  50. .. _class_Physics2DShapeQueryParameters_get_collision_layer:
  51. - :ref:`int<class_int>` **get_collision_layer** **(** **)** const
  52. Return the physics layer the shape belongs to.
  53. .. _class_Physics2DShapeQueryParameters_get_exclude:
  54. - :ref:`Array<class_array>` **get_exclude** **(** **)** const
  55. Return the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
  56. .. _class_Physics2DShapeQueryParameters_get_margin:
  57. - :ref:`float<class_float>` **get_margin** **(** **)** const
  58. Return the collision margin for the shape.
  59. .. _class_Physics2DShapeQueryParameters_get_motion:
  60. - :ref:`Vector2<class_vector2>` **get_motion** **(** **)** const
  61. Return the current movement speed of the shape.
  62. .. _class_Physics2DShapeQueryParameters_get_object_type_mask:
  63. - :ref:`int<class_int>` **get_object_type_mask** **(** **)** const
  64. Return the type of object the shape belongs to.
  65. .. _class_Physics2DShapeQueryParameters_get_shape_rid:
  66. - :ref:`RID<class_rid>` **get_shape_rid** **(** **)** const
  67. Return the :ref:`RID<class_rid>` of the shape queried.
  68. .. _class_Physics2DShapeQueryParameters_get_transform:
  69. - :ref:`Transform2D<class_transform2d>` **get_transform** **(** **)** const
  70. Return the transform matrix of the shape queried.
  71. .. _class_Physics2DShapeQueryParameters_set_collision_layer:
  72. - void **set_collision_layer** **(** :ref:`int<class_int>` collision_layer **)**
  73. Set the physics layer the shape belongs to.
  74. .. _class_Physics2DShapeQueryParameters_set_exclude:
  75. - void **set_exclude** **(** :ref:`Array<class_array>` exclude **)**
  76. Set the list of objects, or object :ref:`RID<class_rid>`\ s, that will be excluded from collisions.
  77. .. _class_Physics2DShapeQueryParameters_set_margin:
  78. - void **set_margin** **(** :ref:`float<class_float>` margin **)**
  79. 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.
  80. .. _class_Physics2DShapeQueryParameters_set_motion:
  81. - void **set_motion** **(** :ref:`Vector2<class_vector2>` motion **)**
  82. Set the current movement speed of the shape.
  83. .. _class_Physics2DShapeQueryParameters_set_object_type_mask:
  84. - void **set_object_type_mask** **(** :ref:`int<class_int>` object_type_mask **)**
  85. Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK\_\*).
  86. .. _class_Physics2DShapeQueryParameters_set_shape:
  87. - void **set_shape** **(** :ref:`Resource<class_resource>` shape **)**
  88. Set the :ref:`Shape2D<class_shape2d>` that will be used for collision/intersection queries.
  89. .. _class_Physics2DShapeQueryParameters_set_shape_rid:
  90. - void **set_shape_rid** **(** :ref:`RID<class_rid>` shape **)**
  91. Set the :ref:`RID<class_rid>` of the shape to be used in queries.
  92. .. _class_Physics2DShapeQueryParameters_set_transform:
  93. - void **set_transform** **(** :ref:`Transform2D<class_transform2d>` transform **)**
  94. Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.