C# 클래스 Nez.PrimitiveBatch

batcher that draws vertex colored triangles
상속: IDisposable
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void
PrimitiveBatch ( int bufferSize = 500 ) : System
addVertex ( Vector2 vertex, Color color, PrimitiveType primitiveType ) : void
begin ( ) : void

draws directly in screen space at full viewport size

begin ( Matrix &projection, Matrix &view ) : void

Begin is called to tell the PrimitiveBatch what kind of primitives will be drawn, and to prepare the graphics card to render those primitives. Use camera.projectionMatrix and camera.transformMatrix if the batch should be in camera space.

drawArrow ( Vector2 start, Vector2 end, float length, float width, bool drawStartIndicator, Color color ) : void
drawCircle ( Vector2 center, float radius, Color color, int circleSegments = 32 ) : void
drawPolygon ( Vector2 position, Vector2 vertices, Color color ) : void
drawPolygon ( Vector2 vertices, int count, Color color ) : void
drawRectangle ( Rectangle &rect, Color color ) : void
drawRectangle ( float x, float y, float width, float height, Color color ) : void
end ( ) : void

End is called once all the primitives have been drawn using AddVertex. it will call Flush to actually submit the draw call to the graphics card, and then tell the basic effect to end.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
flushLines ( ) : void
flushTriangles ( ) : void

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

PrimitiveBatch() 공개 메소드

public PrimitiveBatch ( int bufferSize = 500 ) : System
bufferSize int
리턴 System

addVertex() 공개 메소드

public addVertex ( Vector2 vertex, Color color, PrimitiveType primitiveType ) : void
vertex Vector2
color Color
primitiveType PrimitiveType
리턴 void

begin() 공개 메소드

draws directly in screen space at full viewport size
public begin ( ) : void
리턴 void

begin() 공개 메소드

Begin is called to tell the PrimitiveBatch what kind of primitives will be drawn, and to prepare the graphics card to render those primitives. Use camera.projectionMatrix and camera.transformMatrix if the batch should be in camera space.
public begin ( Matrix &projection, Matrix &view ) : void
projection Matrix The projection.
view Matrix The view.
리턴 void

drawArrow() 공개 메소드

public drawArrow ( Vector2 start, Vector2 end, float length, float width, bool drawStartIndicator, Color color ) : void
start Vector2
end Vector2
length float
width float
drawStartIndicator bool
color Color
리턴 void

drawCircle() 공개 메소드

public drawCircle ( Vector2 center, float radius, Color color, int circleSegments = 32 ) : void
center Vector2
radius float
color Color
circleSegments int
리턴 void

drawPolygon() 공개 메소드

public drawPolygon ( Vector2 position, Vector2 vertices, Color color ) : void
position Vector2
vertices Vector2
color Color
리턴 void

drawPolygon() 공개 메소드

public drawPolygon ( Vector2 vertices, int count, Color color ) : void
vertices Vector2
count int
color Color
리턴 void

drawRectangle() 공개 메소드

public drawRectangle ( Rectangle &rect, Color color ) : void
rect Microsoft.Xna.Framework.Rectangle
color Color
리턴 void

drawRectangle() 공개 메소드

public drawRectangle ( float x, float y, float width, float height, Color color ) : void
x float
y float
width float
height float
color Color
리턴 void

end() 공개 메소드

End is called once all the primitives have been drawn using AddVertex. it will call Flush to actually submit the draw call to the graphics card, and then tell the basic effect to end.
public end ( ) : void
리턴 void