Ctrl+K

CuttingTools

Declaration

public static class tainicom.Aether.Physics2D.Common.PolygonManipulation.CuttingTools

Methods

SplitShape static

Split a fixture into 2 vertice collections using the given entry and exit-point.

void SplitShape(Fixture fixture, Vector2 entryPoint, Vector2 exitPoint, out Vertices first, out Vertices second)

Parameters:

Name Type Description
fixture tainicom.Aether.Physics2D.Dynamics.Fixture The Fixture to split
entryPoint Strawberry.Math.Vector2 The entry point - The start point
exitPoint Strawberry.Math.Vector2 The exit point - The end point
first out tainicom.Aether.Physics2D.Common.Vertices The first collection of vertexes
second out tainicom.Aether.Physics2D.Common.Vertices The second collection of vertexes

Cut static

This is a high-level function to cuts fixtures inside the given world, using the start and end points. Note: We don't support cutting when the start or end is inside a shape.

bool Cut(World world, Vector2 start, Vector2 end)

Parameters:

Name Type Description
world tainicom.Aether.Physics2D.Dynamics.World The world.
start Strawberry.Math.Vector2 The startpoint.
end Strawberry.Math.Vector2 The endpoint.

Returns: True if the cut was performed.