Table of Contents

Class PolygonCollider

Namespace
Stride.CommunityToolkit.Bepu
Assembly
Stride.CommunityToolkit.Bepu.dll

Builds the convex hull collider of a flat polygon extruded along Z: the prism a 2D polygon shape collides as.

public static class PolygonCollider
Inheritance
PolygonCollider

Methods

Create(PolygonShape, float)

Creates the collider of polygon, extruded depth along Z.

public static ConvexHullCollider Create(Primitive2D.PolygonShape polygon, float depth = 1)

Parameters

polygon Primitive2D.PolygonShape
depth float

Returns

ConvexHullCollider

Create(RegularPolygonShape, float)

Creates the collider of polygon, extruded depth along Z.

public static ConvexHullCollider Create(Primitive2D.RegularPolygonShape polygon, float depth = 1)

Parameters

polygon Primitive2D.RegularPolygonShape
depth float

Returns

ConvexHullCollider

Create(Vector2[], float)

Creates the collider of the convex polygon with the given corners, in order around the outline, extruded depth along Z.

public static ConvexHullCollider Create(Vector2[] vertices, float depth = 1)

Parameters

vertices Vector2[]
depth float

Returns

ConvexHullCollider

Create(float, int, float)

Creates the collider of a regular polygon with sides corners on a circle of radius, extruded depth along Z.

public static ConvexHullCollider Create(float radius, int sides, float depth = 1)

Parameters

radius float
sides int
depth float

Returns

ConvexHullCollider