C# Класс Project290.Physics.Common.PolygonManipulation.CuttingTools

Показать файл Открыть проект

Открытые методы

Метод Описание
Cut ( World world, Vector2 start, Vector2 end, float thickness ) : void

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.

SplitShape ( Fixture fixture, Vector2 entryPoint, Vector2 exitPoint, float splitSize, Vertices &first, Vertices &second ) : void

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

Приватные методы

Метод Описание
SanityCheck ( Vertices vertices ) : bool

Описание методов

Cut() публичный статический Метод

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.
public static Cut ( World world, Vector2 start, Vector2 end, float thickness ) : void
world Project290.Physics.Dynamics.World The world.
start Microsoft.Xna.Framework.Vector2 The startpoint.
end Microsoft.Xna.Framework.Vector2 The endpoint.
thickness float The thickness of the cut
Результат void

SplitShape() публичный статический Метод

Split a fixture into 2 vertice collections using the given entry and exit-point.
public static SplitShape ( Fixture fixture, Vector2 entryPoint, Vector2 exitPoint, float splitSize, Vertices &first, Vertices &second ) : void
fixture Project290.Physics.Dynamics.Fixture The Fixture to split
entryPoint Microsoft.Xna.Framework.Vector2 The entry point - The start point
exitPoint Microsoft.Xna.Framework.Vector2 The exit point - The end point
splitSize float The size of the split. Think of this as the laser-width
first Vertices The first collection of vertexes
second Vertices The second collection of vertexes
Результат void