Public Member Functions | Public Attributes

Tiny2D::Shape::DrawParams Struct Reference

Shape drawing parameters. More...

#include <Tiny2D.h>

List of all members.

Public Member Functions

 DrawParams ()
 Constructs empty (no vertex or index data) draw parameters.
void SetGeometryType (Geometry::Type type)
 Sets geometry type.
void SetIndices (int numIndices, const unsigned short *indices)
 Sets indices (optional - only when using indexed geometry)
void SetNumVerts (int numVerts)
 Sets number of vertices.
void SetPosition (const void *data, int stride=sizeof(float)*2, VertexFormat format=VertexFormat_Float32, int count=2)
 Sets position data; stride indicates number of bytes between 2 consecutive vertices.
void SetTexCoord (const void *data, int usageIndex=0, int stride=sizeof(float)*2, VertexFormat format=VertexFormat_Float32, int count=2)
 Sets texture coordinate data for a particular usage (index); stride indicates number of bytes between 2 consecutive vertices.
void SetColor (const void *data, int usageIndex=0, int stride=sizeof(float)*4, VertexFormat format=VertexFormat_Float32, int count=4)
 Sets color data for a particular usage (index); stride indicates number of bytes between 2 consecutive vertices.
void AddStream (const VertexStream &stream)
 Adds vertex stream data.

Public Attributes

Color color
 Color set to 'Color' material parameter just before rendering; defaults to Color::White.
Blending blending
 Blending; defaults to Blending_Default; not used when rendering using Material (in that case blending is taken from technique blending specified in material XML)
Geometry geometry
 Shape geometry data.

Detailed Description

Shape drawing parameters.


Constructor & Destructor Documentation

Tiny2D::Shape::DrawParams::DrawParams (  )

Constructs empty (no vertex or index data) draw parameters.


Member Function Documentation

void Tiny2D::Shape::DrawParams::AddStream ( const VertexStream stream ) [inline]

Adds vertex stream data.

void Tiny2D::Shape::DrawParams::SetColor ( const void *  data,
int  usageIndex = 0,
int  stride = sizeof(float) * 4,
VertexFormat  format = VertexFormat_Float32,
int  count = 4 
) [inline]

Sets color data for a particular usage (index); stride indicates number of bytes between 2 consecutive vertices.

void Tiny2D::Shape::DrawParams::SetGeometryType ( Geometry::Type  type ) [inline]

Sets geometry type.

void Tiny2D::Shape::DrawParams::SetIndices ( int  numIndices,
const unsigned short *  indices 
) [inline]

Sets indices (optional - only when using indexed geometry)

void Tiny2D::Shape::DrawParams::SetNumVerts ( int  numVerts ) [inline]

Sets number of vertices.

void Tiny2D::Shape::DrawParams::SetPosition ( const void *  data,
int  stride = sizeof(float) * 2,
VertexFormat  format = VertexFormat_Float32,
int  count = 2 
) [inline]

Sets position data; stride indicates number of bytes between 2 consecutive vertices.

void Tiny2D::Shape::DrawParams::SetTexCoord ( const void *  data,
int  usageIndex = 0,
int  stride = sizeof(float) * 2,
VertexFormat  format = VertexFormat_Float32,
int  count = 2 
) [inline]

Sets texture coordinate data for a particular usage (index); stride indicates number of bytes between 2 consecutive vertices.


Member Data Documentation

Blending; defaults to Blending_Default; not used when rendering using Material (in that case blending is taken from technique blending specified in material XML)

Color set to 'Color' material parameter just before rendering; defaults to Color::White.

Shape geometry data.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines