class_rectangleshape2d.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_RectangleShape2D:
  4. RectangleShape2D
  5. ================
  6. **Inherits:** :ref:`Shape2D<class_shape2d>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Rectangle Shape for 2D Physics.
  11. Member Functions
  12. ----------------
  13. +--------------------------------+------------------------------------------------------------------------------------------------------------+
  14. | :ref:`Vector2<class_vector2>` | :ref:`get_extents<class_RectangleShape2D_get_extents>` **(** **)** const |
  15. +--------------------------------+------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`set_extents<class_RectangleShape2D_set_extents>` **(** :ref:`Vector2<class_vector2>` extents **)** |
  17. +--------------------------------+------------------------------------------------------------------------------------------------------------+
  18. Description
  19. -----------
  20. Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects.
  21. Member Function Description
  22. ---------------------------
  23. .. _class_RectangleShape2D_get_extents:
  24. - :ref:`Vector2<class_vector2>` **get_extents** **(** **)** const
  25. Return the half extents, the actual width and height of this shape is twice the half extents.
  26. .. _class_RectangleShape2D_set_extents:
  27. - void **set_extents** **(** :ref:`Vector2<class_vector2>` extents **)**
  28. Set the half extents, the actual width and height of this shape is twice the half extents.