C# 클래스 Project290.Physics.Common.PolygonManipulation.CuttingTools

파일 보기 프로젝트 열기: scastle/Solitude

공개 메소드들

메소드 설명
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