Property | Type | Description | |
---|---|---|---|
fixturePairs | ICollider2D>>.List |
Property | Type | Description | |
---|---|---|---|
GetIntersect | Vector2? | ||
IsClockwise | bool | ||
IsInside | bool | ||
IsLeftOf | bool? | ||
IsNearZero | bool | ||
IterateEdgesClockwise | IEnumerable |
||
Simulate2D_BeginCollision | void | ||
Simulate2D_EndCollision | void | ||
b2Cross | Vector2 |
Method | Description | |
---|---|---|
ComputeCentroid ( System.Vector2 vs, float &area ) : System.Vector2 |
Compute polygon centroid
|
|
GetIntersectedPolygon ( System.Vector2 subjectPoly, System.Vector2 clipPoly ) : System.Vector2[] |
This clips the subject polygon against the clip polygon (gets the intersection of the two polygons) Based on the psuedocode from: http://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman |
|
GetPolygonPoints ( ICollider2D collider ) : System.Vector2[] |
Get Polygon points of a physic collider
|
Method | Description | |
---|---|---|
DefaultValues ( ) : void |
Default values
|
|
Initialize ( ) : void |
Initialize method
|
|
Update ( TimeSpan gameTime ) : void |
Update method
|
Method | Description | |
---|---|---|
GetIntersect ( System.Vector2 line1From, System.Vector2 line1To, System.Vector2 line2From, System.Vector2 line2To ) : Vector2? |
Returns the intersection of the two lines (line segments are passed in, but they are treated like infinite lines) Got this here: http://stackoverflow.com/questions/14480124/how-do-i-detect-triangle-and-rectangle-intersection |
|
IsClockwise ( System.Vector2 polygon ) : bool | ||
IsInside ( System.Edge edge, System.Vector2 test ) : bool | ||
IsLeftOf ( System.Edge edge, System.Vector2 test ) : bool? |
Tells if the test Vector2 lies on the left side of the edge line
|
|
IsNearZero ( double testValue ) : bool | ||
IterateEdgesClockwise ( System.Vector2 polygon ) : IEnumerable |
This iterates through the edges of the polygon, always clockwise
|
|
Simulate2D_BeginCollision ( WaveEngine contact ) : void |
Begin collision world event
|
|
Simulate2D_EndCollision ( WaveEngine contact ) : void |
End collision world event
|
|
b2Cross ( float s, Vector2 &a ) : Vector2 |
public static ComputeCentroid ( System.Vector2 vs, float &area ) : System.Vector2 | ||
vs | System.Vector2 | polygon vertex |
area | float | polygon area |
return | System.Vector2 |
public static GetIntersectedPolygon ( System.Vector2 subjectPoly, System.Vector2 clipPoly ) : System.Vector2[] | ||
subjectPoly | System.Vector2 | Can be concave or convex |
clipPoly | System.Vector2 | Must be convex |
return | System.Vector2[] |
public static GetPolygonPoints ( ICollider2D collider ) : System.Vector2[] | ||
collider | ICollider2D | physic collider |
return | System.Vector2[] |
protected Update ( TimeSpan gameTime ) : void | ||
gameTime | TimeSpan | game time |
return | void |