C# Class SFML.Graphics.VertexArray

Define a set of one or more 2D primitives
Inheritance: ObjectBase, Drawable
Mostra file Open project: SFML/SFML.Net Class Usage Examples

Public Methods

Method Description
Append ( Vertex vertex ) : void

Add a vertex to the array

Clear ( ) : void

Clear the vertex array

Draw ( RenderTarget target, RenderStates states ) : void

Draw the vertex array to a render target

Resize ( uint vertexCount ) : void

Resize the vertex array If \a vertexCount is greater than the current size, the previous vertices are kept and new (default-constructed) vertices are added. If \a vertexCount is less than the current size, existing vertices are removed from the array.

VertexArray ( ) : System

Default constructor

VertexArray ( PrimitiveType type ) : System

Construct the vertex array with a type

VertexArray ( PrimitiveType type, uint vertexCount ) : System

Construct the vertex array with a type and an initial number of vertices

VertexArray ( VertexArray copy ) : System

Construct the vertex array from another vertex array

this ( uint index ) : Vertex

Read-write access to vertices by their index. This function doesn't check index, it must be in range [0, VertexCount - 1]. The behaviour is undefined otherwise.

Protected Methods

Method Description
Destroy ( bool disposing ) : void

Handle the destruction of the object

Private Methods

Method Description
sfRenderTexture_drawVertexArray ( IntPtr CPointer, IntPtr VertexArray, RenderStates &states ) : void
sfRenderWindow_drawVertexArray ( IntPtr CPointer, IntPtr VertexArray, RenderStates &states ) : void
sfVertexArray_append ( IntPtr CPointer, Vertex vertex ) : void
sfVertexArray_clear ( IntPtr CPointer ) : void
sfVertexArray_copy ( IntPtr CPointer ) : IntPtr
sfVertexArray_create ( ) : IntPtr
sfVertexArray_destroy ( IntPtr CPointer ) : void
sfVertexArray_getBounds ( IntPtr CPointer ) : FloatRect
sfVertexArray_getPrimitiveType ( IntPtr CPointer ) : PrimitiveType
sfVertexArray_getVertex ( IntPtr CPointer, uint index ) : Vertex*
sfVertexArray_getVertexCount ( IntPtr CPointer ) : uint
sfVertexArray_resize ( IntPtr CPointer, uint vertexCount ) : void
sfVertexArray_setPrimitiveType ( IntPtr CPointer, PrimitiveType type ) : void

Method Details

Append() public method

Add a vertex to the array
public Append ( Vertex vertex ) : void
vertex Vertex Vertex to add
return void

Clear() public method

Clear the vertex array
public Clear ( ) : void
return void

Destroy() protected method

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
return void

Draw() public method

Draw the vertex array to a render target
public Draw ( RenderTarget target, RenderStates states ) : void
target RenderTarget Render target to draw to
states RenderStates Current render states
return void

Resize() public method

Resize the vertex array If \a vertexCount is greater than the current size, the previous vertices are kept and new (default-constructed) vertices are added. If \a vertexCount is less than the current size, existing vertices are removed from the array.
public Resize ( uint vertexCount ) : void
vertexCount uint New size of the array (number of vertices)
return void

VertexArray() public method

Default constructor
public VertexArray ( ) : System
return System

VertexArray() public method

Construct the vertex array with a type
public VertexArray ( PrimitiveType type ) : System
type PrimitiveType Type of primitives
return System

VertexArray() public method

Construct the vertex array with a type and an initial number of vertices
public VertexArray ( PrimitiveType type, uint vertexCount ) : System
type PrimitiveType Type of primitives
vertexCount uint Initial number of vertices in the array
return System

VertexArray() public method

Construct the vertex array from another vertex array
public VertexArray ( VertexArray copy ) : System
copy VertexArray Transformable to copy
return System

this() public method

Read-write access to vertices by their index. This function doesn't check index, it must be in range [0, VertexCount - 1]. The behaviour is undefined otherwise.
public this ( uint index ) : Vertex
index uint Index of the vertex to get
return Vertex