godot/doc/classes/ConvexPolygonShape2D.xml
Rémi Verschelde 7adf4cc9b5
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00

29 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="ConvexPolygonShape2D" inherits="Shape2D" version="4.0">
<brief_description>
Convex polygon shape for 2D physics.
</brief_description>
<description>
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).
The main difference between a [ConvexPolygonShape2D] and a [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.
</description>
<tutorials>
</tutorials>
<methods>
<method name="set_point_cloud">
<return type="void" />
<argument index="0" name="point_cloud" type="PackedVector2Array" />
<description>
Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details.
</description>
</method>
</methods>
<members>
<member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()">
The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
</member>
</members>
<constants>
</constants>
</class>