C# 클래스 FarseerPhysics.Common.PolygonTools

파일 보기 프로젝트 열기: prime31/Nez

공개 메소드들

메소드 설명
createArc ( float radians, int sides, float radius ) : Vertices
createCapsule ( float height, float endRadius, int edges ) : Vertices

Creates an capsule with the specified height, radius and number of edges. A capsule has the same form as a pill capsule.

createCapsule ( float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges ) : Vertices

Creates an capsule with the specified height, radius and number of edges. A capsule has the same form as a pill capsule.

createCircle ( float radius, int numberOfEdges ) : Vertices

Creates a circle with the specified radius and number of edges.

createEllipse ( float xRadius, float yRadius, int numberOfEdges ) : Vertices

Creates a ellipse with the specified width, height and number of edges.

createGear ( float radius, int numberOfTeeth, float tipPercentage, float toothHeight ) : Vertices

Creates a gear shape with the specified radius and number of teeth.

createLine ( Vector2 start, Vector2 end ) : Vertices

Set this as a single edge.

createPolygonFromTextureData ( uint data, int width, float hullTolerance, byte alphaTolerance, bool multiPartDetection, bool holeDetection ) : List

Detects the vertices by analyzing the texture data.

createPolygonFromTextureData ( Nez subtexture ) : Vertices
createPolygonFromTextureData ( Texture2D texture ) : Vertices
createPolygonFromTextureData ( uint data, int width ) : Vertices

Detects the vertices by analyzing the texture data.

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

Detects the vertices by analyzing the texture data.

createRectangle ( float hx, float hy ) : Vertices

Build vertices to represent an axis-aligned box.

createRectangle ( float hx, float hy, Vector2 center, float angle ) : Vertices

Build vertices to represent an oriented box.

createRoundedRectangle ( float width, float height, float xRadius, float yRadius, int segments ) : Vertices

Creates a rounded rectangle with the specified width and height.

메소드 상세

createArc() 공개 정적인 메소드

public static createArc ( float radians, int sides, float radius ) : Vertices
radians float
sides int
radius float
리턴 Vertices

createCapsule() 공개 정적인 메소드

Creates an capsule with the specified height, radius and number of edges. A capsule has the same form as a pill capsule.
public static createCapsule ( float height, float endRadius, int edges ) : Vertices
height float Height (inner height + 2 * radius) of the capsule.
endRadius float Radius of the capsule ends.
edges int The number of edges of the capsule ends. The more edges, the more it resembles an capsule
리턴 Vertices

createCapsule() 공개 정적인 메소드

Creates an capsule with the specified height, radius and number of edges. A capsule has the same form as a pill capsule.
public static createCapsule ( float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges ) : Vertices
height float Height (inner height + radii) of the capsule.
topRadius float Radius of the top.
topEdges int The number of edges of the top. The more edges, the more it resembles an capsule
bottomRadius float Radius of bottom.
bottomEdges int The number of edges of the bottom. The more edges, the more it resembles an capsule
리턴 Vertices

createCircle() 공개 정적인 메소드

Creates a circle with the specified radius and number of edges.
public static createCircle ( float radius, int numberOfEdges ) : Vertices
radius float The radius.
numberOfEdges int The number of edges. The more edges, the more it resembles a circle
리턴 Vertices

createEllipse() 공개 정적인 메소드

Creates a ellipse with the specified width, height and number of edges.
public static createEllipse ( float xRadius, float yRadius, int numberOfEdges ) : Vertices
xRadius float Width of the ellipse.
yRadius float Height of the ellipse.
numberOfEdges int The number of edges. The more edges, the more it resembles an ellipse
리턴 Vertices

createGear() 공개 정적인 메소드

Creates a gear shape with the specified radius and number of teeth.
public static createGear ( float radius, int numberOfTeeth, float tipPercentage, float toothHeight ) : Vertices
radius float The radius.
numberOfTeeth int The number of teeth.
tipPercentage float The tip percentage.
toothHeight float Height of the tooth.
리턴 Vertices

createLine() 공개 정적인 메소드

Set this as a single edge.
public static createLine ( Vector2 start, Vector2 end ) : Vertices
start Vector2 The first point.
end Vector2 The second point.
리턴 Vertices

createPolygonFromTextureData() 공개 정적인 메소드

Detects the vertices by analyzing the texture data.
public static createPolygonFromTextureData ( 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

createPolygonFromTextureData() 공개 정적인 메소드

public static createPolygonFromTextureData ( Nez subtexture ) : Vertices
subtexture Nez
리턴 Vertices

createPolygonFromTextureData() 공개 정적인 메소드

public static createPolygonFromTextureData ( Texture2D texture ) : Vertices
texture Texture2D
리턴 Vertices

createPolygonFromTextureData() 공개 정적인 메소드

Detects the vertices by analyzing the texture data.
public static createPolygonFromTextureData ( uint data, int width ) : Vertices
data uint The texture data.
width int The texture width.
리턴 Vertices

createPolygonFromTextureData() 공개 정적인 메소드

Detects the vertices by analyzing the texture data.
public static createPolygonFromTextureData ( 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

createRectangle() 공개 정적인 메소드

Build vertices to represent an axis-aligned box.
public static createRectangle ( float hx, float hy ) : Vertices
hx float the half-width.
hy float the half-height.
리턴 Vertices

createRectangle() 공개 정적인 메소드

Build vertices to represent an oriented box.
public static createRectangle ( float hx, float hy, Vector2 center, float angle ) : Vertices
hx float the half-width.
hy float the half-height.
center Vector2 the center of the box in local coordinates.
angle float the rotation of the box in local coordinates.
리턴 Vertices

createRoundedRectangle() 공개 정적인 메소드

Creates a rounded rectangle with the specified width and height.
public static createRoundedRectangle ( float width, float height, float xRadius, float yRadius, int segments ) : Vertices
width float The width.
height float The height.
xRadius float The rounding X radius.
yRadius float The rounding Y radius.
segments int The number of segments to subdivide the edges.
리턴 Vertices