class_convexpolygonshape2d.rst 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ConvexPolygonShape2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ConvexPolygonShape2D:
  5. ConvexPolygonShape2D
  6. ====================
  7. **Inherits:** :ref:`Shape2D<class_shape2d>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Convex Polygon Shape for 2D physics.
  12. Member Functions
  13. ----------------
  14. +-------+--------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`set_point_cloud<class_ConvexPolygonShape2D_set_point_cloud>` **(** :ref:`PoolVector2Array<class_poolvector2array>` point_cloud **)** |
  16. +-------+--------------------------------------------------------------------------------------------------------------------------------------------+
  17. Member Variables
  18. ----------------
  19. .. _class_ConvexPolygonShape2D_points:
  20. - :ref:`PoolVector2Array<class_poolvector2array>` **points** - The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
  21. Description
  22. -----------
  23. Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
  24. The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D<class_concavepolygonshape2d>` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
  25. Member Function Description
  26. ---------------------------
  27. .. _class_ConvexPolygonShape2D_set_point_cloud:
  28. - void **set_point_cloud** **(** :ref:`PoolVector2Array<class_poolvector2array>` point_cloud **)**
  29. Currently, this method does nothing.