C# Class Nez.DeferredLighting.PolygonMesh

builds a Polygon from the passed in verts. Verts should be relative to 0,0 and contain the outer perimeter of the polygon. A center vert will be added and used to triangulate the polygon. If you need a transform matrix for the Polygon set the position/scale and then fetch the transformMatrix property.
Inheritance: IDisposable
Show file Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
PolygonMesh ( Vector2 points ) : System
createRectangle ( ) : PolygonMesh
createSymmetricalPolygon ( int vertCount ) : PolygonMesh

creates a circular polygon

createSymmetricalPolygon ( int vertCount, float radius ) : PolygonMesh

creates a circular polygon

render ( ) : void

Private Methods

Method Description
IDisposable ( ) : void
buildSymmetricalPolygon ( int vertCount, float radius ) : Vector2[]
generateVerts ( Vector2 points ) : Microsoft.Xna.Framework.Graphics.VertexPosition[]

Method Details

PolygonMesh() public method

public PolygonMesh ( Vector2 points ) : System
points Vector2
return System

createRectangle() public static method

public static createRectangle ( ) : PolygonMesh
return PolygonMesh

createSymmetricalPolygon() public static method

creates a circular polygon
public static createSymmetricalPolygon ( int vertCount ) : PolygonMesh
vertCount int Vert count.
return PolygonMesh

createSymmetricalPolygon() public static method

creates a circular polygon
public static createSymmetricalPolygon ( int vertCount, float radius ) : PolygonMesh
vertCount int Vert count.
radius float Radius.
return PolygonMesh

render() public method

public render ( ) : void
return void