Main Page   Modules   Class Hierarchy   Compound List   Compound Members  

GAUGE3D::GModel::RenderInfo::RenderSet Struct Reference

Contains all of the data needed to render a model. More...

#include <gauge3d/graphics/model.h>

List of all members.

Public Types

enum  tDynamicFlags { STATIC = 0, VERTEX_POSITION = 1 << 0, VERTEX_TEXCOORD = 1 << 1, INDEX_LIST = 1 << 16 }
 Specifies which properties of the model are dynamic. More...

enum  tIndexType { POINTS, LINES, TRIANGLES }
 Specifies how to make geometry out of the indices. More...


Public Methods

void SetDefaults ()
 Called by the renderer to reset the RenderSet. More...


Public Attributes

int mDynamicFlags
 One or more of tDynamicFlags.

int mNumVertices
 Number of elements in each of the arrays.

GVectormVertices
 Array of vertex positions.

GVectormNormals
 Array of normal vectors. Must be unit vectors!

GVectormTexCoords
 Array of texture coordinates. Can be NULL if texturing is not supported.

int mIndexType
 One of the values in tIndexType.

int mNumIndices
 The number of elements in the index array.

uint16mIndices
 Pointer to an array of indices.


Detailed Description

Contains all of the data needed to render a model.

A RenderSet contains a list of all of the vertices in a GModel. For each vertex, it gives the position, surface normal, and texture coordinates. These lists are all strided arrays and can be interleaved. Interleaving your arrays can increase performance.

The RenderSet also contains a list of indices forming triangles, lines, or points.


Member Enumeration Documentation

enum GAUGE3D::GModel::RenderInfo::RenderSet::tDynamicFlags
 

Specifies which properties of the model are dynamic.

Remarks:
Typically, vertex positions and normals are dynamic (if anything).
Enumeration values:
STATIC   Model is not dynamic.
VERTEX_POSITION   Vertex positions (and normals) are dynamic.
VERTEX_TEXCOORD   Vertex texture coordinates are dynamic.
INDEX_LIST   Index list is dynamic.

enum GAUGE3D::GModel::RenderInfo::RenderSet::tIndexType
 

Specifies how to make geometry out of the indices.

Enumeration values:
POINTS   Every indice is a point / particle.
LINES   Every two indices make one line segment.
TRIANGLES   Every three indices make one triangle.


Member Function Documentation

void GAUGE3D::GModel::RenderInfo::RenderSet::SetDefaults ( ) [inline]
 

Called by the renderer to reset the RenderSet.

Remarks:
The idea is that older model plugins may not support newer RenderSet data fields. In order to make sure the renderer does not read uninitialized data from those fields, they are set to some default value. This is all for binary and source code backwards compatibility, but also makes writing model plugins easier.


The documentation for this struct was generated from the following file:
Generated at Tue Jan 30 17:07:34 2001 for gauge3d by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000