C# Class Danmaku_no_Kyojin.Shapes.PolygonShape

Datei anzeigen Open project: Noxalus/Danmaku-no-Kyojin Class Usage Examples

Public Methods

Method Description
Draw ( Matrix viewMatrix, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale ) : void
GetArea ( ) : float
GetCenter ( ) : Vector2
GetSize ( ) : Vector2
PolygonShape ( DnK game, Vector2 vertices ) : System

A Polygon object that you will be able to draw. Animations are being implemented as we speak.

UpdateVertices ( Vector2 vertices ) : void

Private Methods

Method Description
ComputeArea ( ) : void
ComputeCenter ( ) : void
ComputeSize ( ) : void
Triangulate ( ) : void

Triangulate the set of VertexPositionColors so it will be drawn properly

Method Details

Draw() public method

public Draw ( Matrix viewMatrix, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale ) : void
viewMatrix Matrix
position Vector2
color Color
rotation float
origin Vector2
scale Vector2
return void

GetArea() public method

public GetArea ( ) : float
return float

GetCenter() public method

public GetCenter ( ) : Vector2
return Vector2

GetSize() public method

public GetSize ( ) : Vector2
return Vector2

PolygonShape() public method

A Polygon object that you will be able to draw. Animations are being implemented as we speak.
public PolygonShape ( DnK game, Vector2 vertices ) : System
game DnK
vertices Vector2 The vertices in a clockwise order
return System

UpdateVertices() public method

public UpdateVertices ( Vector2 vertices ) : void
vertices Vector2
return void