C# Class Project290.Physics.Common.TextureConverter

ファイルを表示 Open project: scastle/Solitude Class Usage Examples

Public Methods

Method Description
DetectVertices ( uint data, int width, int height, float hullTolerance, byte alphaTolerance, bool multiPartDetection, bool holeDetection ) : List

Detects the vertices of the supplied texture data.

DetectVertices ( uint data, int width, int height ) : Vertices

Detects the vertices of the supplied texture data.

DetectVertices ( uint data, int width, int height, bool holeDetection ) : Vertices

Detects the vertices of the supplied texture data.

Private Methods

Method Description
CreateSimplePolygon ( PolygonCreationAssistance pca, Vector2 entrance, Vector2 last ) : Vertices
DetectVertices ( PolygonCreationAssistance &pca ) : List
DistanceToHullAcceptable ( PolygonCreationAssistance pca, Vertices polygon, Vector2 point, bool higherDetail ) : bool
GetBottomMostCoord ( Vertices vertices ) : float
GetCrossingEdges ( Vertices polygon, EdgeAlignment edgeAlign, int checkLine ) : List
GetHoleHullEntrance ( PolygonCreationAssistance pca, Vertices polygon, Vector2 startVertex ) : Vector2?
GetHullEntrance ( PolygonCreationAssistance pca, Vector2 &entrance ) : bool
GetIndexOfFirstPixelToCheck ( Vector2 &last, Vector2 &current ) : int
GetNextHullEntrance ( PolygonCreationAssistance pca, Vector2 start, Vector2 &entrance ) : bool
GetNextHullPoint ( PolygonCreationAssistance pca, Vector2 &last, Vector2 &current, Vector2 &next ) : bool
GetTopMostCoord ( Vertices vertices ) : float
GetTopMostVertex ( Vertices vertices ) : Vector2?
InPolygon ( PolygonCreationAssistance pca, Vertices polygon, Vector2 point ) : bool
IsNearPixel ( PolygonCreationAssistance pca, Vector2 &current, Vector2 &near ) : bool
SearchForOutstandingVertex ( Vertices hullArea, float hullTolerance, Vector2 &outstanding ) : bool
SearchNearPixels ( PolygonCreationAssistance pca, bool searchingForSolidPixel, Vector2 &current, Vector2 &foundPixel ) : bool
SplitPolygonEdge ( Vertices polygon, EdgeAlignment edgeAlign, Vector2 coordInsideThePolygon, int &vertex1Index, int &vertex2Index ) : bool

Method Details

DetectVertices() public static method

Detects the vertices of the supplied texture data.
public static DetectVertices ( uint data, int width, int height, float hullTolerance, byte alphaTolerance, bool multiPartDetection, bool holeDetection ) : List
data uint The texture data.
width int The texture width.
height int The texture height.
hullTolerance float The hull tolerance.
alphaTolerance byte The alpha tolerance.
multiPartDetection bool if set to true it will perform multi part detection.
holeDetection bool if set to true it will perform hole detection.
return List

DetectVertices() public static method

Detects the vertices of the supplied texture data.
public static DetectVertices ( uint data, int width, int height ) : Vertices
data uint The texture data.
width int The texture width.
height int The texture height.
return Vertices

DetectVertices() public static method

Detects the vertices of the supplied texture data.
public static DetectVertices ( uint data, int width, int height, bool holeDetection ) : Vertices
data uint The texture data.
width int The texture width.
height int The texture height.
holeDetection bool if set to true it will perform hole detection.
return Vertices