C# Class FlatRedBall.Math.Geometry.ShapeMerger

Mostra file Open project: vchelaru/FlatRedBall

Public Properties

Property Type Description
ShiftAmount float

Public Methods

Method Description
EliminateButts ( Polygon polygon, float maximumDistanceForSamePoint ) : void
Merge ( Polygon polygon, AxisAlignedRectangle rectangle ) : void
Merge ( Polygon polygon, Polygon otherPolygon ) : void

Modifies the first Polygon so that it is the result of both merged polygons. This method assumes that the polygons collide and that both are drawn clockwise.

MergePoints ( Polygon polygon, float maximumDistanceForMerge ) : void

Private Methods

Method Description
DoesContactPointsHaveOtherIndex ( int index, List contactPoints ) : bool
DoesContactPointsHaveThisIndex ( int index, List contactPoints ) : bool
GetAbsoluteVertices ( AxisAlignedRectangle rectangle ) : List
GetAbsoluteVertices ( Polygon polygon ) : List
GetAbsoluteVertices ( Segment segments ) : List
GetContactPointAtOtherIndex ( int index, List contactPoints, Vector3 closestPoint ) : ContactPoint
GetContactPointAtThisIndex ( int index, List contactPoints, Vector3 closestPoint ) : ContactPoint
GetContactPoints ( Polygon polygon, AxisAlignedRectangle rectangle ) : List
GetContactPoints ( Polygon firstPolygon, Polygon secondPolygon, Segment &firstSegments, Segment &secondSegments ) : List
GetContactPoints ( Segment firstSegments, Segment secondSegments ) : List
GetPointToStartAt ( Polygon polygon, AxisAlignedRectangle rectangle ) : int
GetPointToStartAt ( Polygon polygon, Polygon otherPolygon ) : int
GetSegments ( AxisAlignedRectangle rectangle ) : FlatRedBall.Math.Geometry.Segment[]
GetSegments ( Polygon polygon ) : FlatRedBall.Math.Geometry.Segment[]
GetShift ( Segment segmentsTestingAgainst, int index ) : Vector3
LoopPoint ( List points, int index ) : int
ReactToOddContactPointCount ( List contactPoints ) : void
SetPointsFromContactPointsAndVertices ( Polygon polygon, Polygon otherPolygon, List contactPoints, int polygonPointToStartAt, List thisVertices, List otherVertices ) : void
SetPolygonPoints ( Polygon polygon, List newPolygonPoints ) : void
ShiftEndpointsToEliminatePointOnSegment ( Segment firstSegments, Segment secondSegments ) : void

Method Details

EliminateButts() public static method

public static EliminateButts ( Polygon polygon, float maximumDistanceForSamePoint ) : void
polygon Polygon
maximumDistanceForSamePoint float
return void

Merge() public static method

public static Merge ( Polygon polygon, AxisAlignedRectangle rectangle ) : void
polygon Polygon
rectangle AxisAlignedRectangle
return void

Merge() public static method

Modifies the first Polygon so that it is the result of both merged polygons. This method assumes that the polygons collide and that both are drawn clockwise.
public static Merge ( Polygon polygon, Polygon otherPolygon ) : void
polygon Polygon The first polygon. This one will be modified.
otherPolygon Polygon The second polygon which will not be modified.
return void

MergePoints() public static method

public static MergePoints ( Polygon polygon, float maximumDistanceForMerge ) : void
polygon Polygon
maximumDistanceForMerge float
return void

Property Details

ShiftAmount public_oe static_oe property

public static float ShiftAmount
return float