mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Add inheritance path
Also fix parsing of [method (Class.)name]
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
CollisionPolygon2D
|
||||
==================
|
||||
|
||||
**Inherits:** :ref:`Node2D<class_node2d>`
|
||||
**Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
||||
|
||||
**Category:** Core
|
||||
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Editor-only class for easy editing of collision polygons.
|
||||
|
||||
Member Functions
|
||||
@@ -44,7 +47,7 @@ Member Function Description
|
||||
|
||||
Set the array of points forming the polygon.
|
||||
|
||||
When editing the point list via the editor, depending on :ref:`get_build_mode<CollisionPolygon2D_get_build_mode>`, it has to be a list of points (for ``build_mode``=0), or a list of lines (for ``build_mode``=1). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
|
||||
When editing the point list via the editor, depending on :ref:`get_build_mode<class_CollisionPolygon2D_get_build_mode>`, it has to be a list of points (for ``build_mode==0``), or a list of lines (for ``build_mode==1``). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
|
||||
|
||||
.. _class_CollisionPolygon2D_get_polygon:
|
||||
|
||||
@@ -56,13 +59,13 @@ Return the list of points that define the polygon.
|
||||
|
||||
- void **set_build_mode** **(** :ref:`int<class_int>` build_mode **)**
|
||||
|
||||
Set whether the polygon is to be a :ref:`ConvexPolygon2D<class_convexpolygon2d>` (``build_mode``=0), or a :ref:`ConcavePolygon2D<class_concavepolygon2d>` (``build_mode``=1).
|
||||
Set whether the polygon is to be a :ref:`ConvexPolygon2D<class_convexpolygon2d>` (``build_mode==0``), or a :ref:`ConcavePolygon2D<class_concavepolygon2d>` (``build_mode==1``).
|
||||
|
||||
.. _class_CollisionPolygon2D_get_build_mode:
|
||||
|
||||
- :ref:`int<class_int>` **get_build_mode** **(** **)** const
|
||||
|
||||
Return whether the polygon is a :ref:`ConvexPolygon2D<class_convexpolygon2d>` (``build_mode``=0), or a :ref:`ConcavePolygon2D<class_concavepolygon2d>` (``build_mode``=1).
|
||||
Return whether the polygon is a :ref:`ConvexPolygon2D<class_convexpolygon2d>` (``build_mode==0``), or a :ref:`ConcavePolygon2D<class_concavepolygon2d>` (``build_mode==1``).
|
||||
|
||||
.. _class_CollisionPolygon2D_set_trigger:
|
||||
|
||||
@@ -82,7 +85,7 @@ Return whether this polygon is a trigger.
|
||||
|
||||
Return the index of the first shape generated by the editor.
|
||||
|
||||
When ``build_mode`` is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the :ref:`Shape2D<class_shape2d>`s.
|
||||
When ``build_mode`` is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the :ref:`Shape2D<class_shape2d>`.
|
||||
|
||||
When ``build_mode`` is set to generate concave polygons, there is only one :ref:`Shape2D<class_shape2d>` generated, so the start index and the end index are the same.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user