class_physics2dshapequeryresult.rst 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Physics2DShapeQueryResult.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Physics2DShapeQueryResult:
  6. Physics2DShapeQueryResult
  7. =========================
  8. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Result of a 2D shape query in :ref:`Physics2DServer<class_Physics2DServer>`.
  10. Description
  11. -----------
  12. The result of a 2D shape query in :ref:`Physics2DServer<class_Physics2DServer>`. See also :ref:`Physics2DShapeQueryParameters<class_Physics2DShapeQueryParameters>`.
  13. Methods
  14. -------
  15. +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_result_count<class_Physics2DShapeQueryResult_method_get_result_count>` **(** **)** |const| |
  17. +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`Object<class_Object>` | :ref:`get_result_object<class_Physics2DShapeQueryResult_method_get_result_object>` **(** :ref:`int<class_int>` idx **)** |const| |
  19. +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`get_result_object_id<class_Physics2DShapeQueryResult_method_get_result_object_id>` **(** :ref:`int<class_int>` idx **)** |const| |
  21. +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_result_object_shape<class_Physics2DShapeQueryResult_method_get_result_object_shape>` **(** :ref:`int<class_int>` idx **)** |const| |
  23. +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`RID<class_RID>` | :ref:`get_result_rid<class_Physics2DShapeQueryResult_method_get_result_rid>` **(** :ref:`int<class_int>` idx **)** |const| |
  25. +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  26. Method Descriptions
  27. -------------------
  28. .. _class_Physics2DShapeQueryResult_method_get_result_count:
  29. - :ref:`int<class_int>` **get_result_count** **(** **)** |const|
  30. Returns the number of objects that intersected with the shape.
  31. ----
  32. .. _class_Physics2DShapeQueryResult_method_get_result_object:
  33. - :ref:`Object<class_Object>` **get_result_object** **(** :ref:`int<class_int>` idx **)** |const|
  34. Returns the :ref:`Object<class_Object>` that intersected with the shape at index ``idx``.
  35. ----
  36. .. _class_Physics2DShapeQueryResult_method_get_result_object_id:
  37. - :ref:`int<class_int>` **get_result_object_id** **(** :ref:`int<class_int>` idx **)** |const|
  38. Returns the instance ID of the :ref:`Object<class_Object>` that intersected with the shape at index ``idx``.
  39. ----
  40. .. _class_Physics2DShapeQueryResult_method_get_result_object_shape:
  41. - :ref:`int<class_int>` **get_result_object_shape** **(** :ref:`int<class_int>` idx **)** |const|
  42. Returns the child index of the object's :ref:`Shape<class_Shape>` that intersected with the shape at index ``idx``.
  43. ----
  44. .. _class_Physics2DShapeQueryResult_method_get_result_rid:
  45. - :ref:`RID<class_RID>` **get_result_rid** **(** :ref:`int<class_int>` idx **)** |const|
  46. Returns the :ref:`RID<class_RID>` of the object that intersected with the shape at index ``idx``.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  49. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`