Convex Polygon Shape for 2D physics.
    public class ConvexPolygonShape2D : Shape2D

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.

Inheritance Chain

Constructors

    public ConvexPolygonShape2D()

Properties

    public Vector2[] Points { get; set; }

The polygon’s list of vertices. Can be in either clockwise or counterclockwise order.

Methods

    public Vector2[] GetPoints()

Getter for Points

    public void SetPointCloud(Vector2[] pointCloud)

Currently, this method does nothing.

    public void SetPoints(Vector2[] points)

Setter for Points

Tags: