C# 클래스 FarseerPhysics.Common.TextureTools.TextureConverter

파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
Initialize ( uint data, int width, byte alphaTolerance, float hullTolerance, bool holeDetection, bool multipartDetection, bool pixelOffsetOptimization, Matrix transform ) : void
TextureConverter ( ) : System
TextureConverter ( byte alphaTolerance, float hullTolerance, bool holeDetection, bool multipartDetection, bool pixelOffsetOptimization, Matrix transform ) : System
TextureConverter ( uint data, int width ) : System
TextureConverter ( uint data, int width, byte alphaTolerance, float hullTolerance, bool holeDetection, bool multipartDetection, bool pixelOffsetOptimization, Matrix transform ) : System
applyTransform ( List &detectedPolygons ) : void
applyTriangulationCompatibleWinding ( List &detectedPolygons ) : void
detectVertices ( ) : List
detectVertices ( uint data, int width, float hullTolerance, byte alphaTolerance, bool multiPartDetection, bool holeDetection ) : List

Detects the vertices of the supplied texture data.

detectVertices ( uint data, int width ) : Vertices

Detects the vertices of the supplied texture data. (PolygonDetectionType.Integrated)

detectVertices ( uint data, int width, bool holeDetection ) : Vertices

Detects the vertices of the supplied texture data.

inBounds ( Vector2 &coord ) : bool
isSolid ( Vector2 &v ) : bool
isSolid ( int &index ) : bool
isSolid ( int &x, int &y ) : bool
setTextureData ( uint data, int width ) : void

비공개 메소드들

메소드 설명
createSimplePolygon ( Vector2 entrance, Vector2 last ) : Vertices
distanceToHullAcceptable ( Vertices polygon, Vector2 point, bool higherDetail ) : bool
distanceToHullAcceptableHoles ( Vertices polygon, Vector2 point, bool higherDetail ) : bool
getBottomMostCoord ( Vertices vertices ) : float
getIndexOfFirstPixelToCheck ( Vector2 &last, Vector2 &current ) : int
getNextHullPoint ( Vector2 &last, Vector2 &current, Vector2 &next ) : bool
getTopMostCoord ( Vertices vertices ) : float
getTopMostVertex ( Vertices vertices ) : Vector2?
inPolygon ( Vertices polygon, Vector2 point ) : bool
isNearPixel ( Vector2 &current, Vector2 &near ) : bool
searchCrossingEdges ( Vertices polygon, int y ) : List

Searches the polygon for the x coordinates of the edges that cross the specified y coordinate.

searchCrossingEdgesHoles ( Vertices polygon, int y ) : List
searchForOutstandingVertex ( Vertices hullArea, Vector2 &outstanding ) : bool
searchHoleEntrance ( Vertices polygon, Vector2 lastHoleEntrance ) : Vector2?

Function to search for an entrance point of a hole in a polygon. It searches the polygon from top to bottom between the polygon edges.

searchHullEntrance ( Vector2 &entrance ) : bool
searchNearPixels ( bool searchingForSolidPixel, Vector2 &current, Vector2 &foundPixel ) : bool
searchNextHullEntrance ( List detectedPolygons, Vector2 start, Vector2 &entrance ) : bool

Searches for the next shape.

splitPolygonEdge ( Vertices polygon, Vector2 coordInsideThePolygon, int &vertex1Index, int &vertex2Index ) : bool

메소드 상세

Initialize() 공개 메소드

public Initialize ( uint data, int width, byte alphaTolerance, float hullTolerance, bool holeDetection, bool multipartDetection, bool pixelOffsetOptimization, Matrix transform ) : void
data uint
width int
alphaTolerance byte
hullTolerance float
holeDetection bool
multipartDetection bool
pixelOffsetOptimization bool
transform Matrix
리턴 void

TextureConverter() 공개 메소드

public TextureConverter ( ) : System
리턴 System

TextureConverter() 공개 메소드

public TextureConverter ( byte alphaTolerance, float hullTolerance, bool holeDetection, bool multipartDetection, bool pixelOffsetOptimization, Matrix transform ) : System
alphaTolerance byte
hullTolerance float
holeDetection bool
multipartDetection bool
pixelOffsetOptimization bool
transform Matrix
리턴 System

TextureConverter() 공개 메소드

public TextureConverter ( uint data, int width ) : System
data uint
width int
리턴 System

TextureConverter() 공개 메소드

public TextureConverter ( uint data, int width, byte alphaTolerance, float hullTolerance, bool holeDetection, bool multipartDetection, bool pixelOffsetOptimization, Matrix transform ) : System
data uint
width int
alphaTolerance byte
hullTolerance float
holeDetection bool
multipartDetection bool
pixelOffsetOptimization bool
transform Matrix
리턴 System

applyTransform() 공개 메소드

public applyTransform ( List &detectedPolygons ) : void
detectedPolygons List
리턴 void

applyTriangulationCompatibleWinding() 공개 메소드

public applyTriangulationCompatibleWinding ( List &detectedPolygons ) : void
detectedPolygons List
리턴 void

detectVertices() 공개 메소드

public detectVertices ( ) : List
리턴 List

detectVertices() 공개 정적인 메소드

Detects the vertices of the supplied texture data.
public static detectVertices ( uint data, int width, float hullTolerance, byte alphaTolerance, bool multiPartDetection, bool holeDetection ) : List
data uint The texture data.
width int The texture width.
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.
리턴 List

detectVertices() 공개 정적인 메소드

Detects the vertices of the supplied texture data. (PolygonDetectionType.Integrated)
public static detectVertices ( uint data, int width ) : Vertices
data uint The texture data.
width int The texture width.
리턴 Vertices

detectVertices() 공개 정적인 메소드

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

inBounds() 공개 메소드

public inBounds ( Vector2 &coord ) : bool
coord Vector2
리턴 bool

isSolid() 공개 메소드

public isSolid ( Vector2 &v ) : bool
v Vector2
리턴 bool

isSolid() 공개 메소드

public isSolid ( int &index ) : bool
index int
리턴 bool

isSolid() 공개 메소드

public isSolid ( int &x, int &y ) : bool
x int
y int
리턴 bool

setTextureData() 공개 메소드

public setTextureData ( uint data, int width ) : void
data uint
width int
리턴 void