#include <OgreRenderOperation.h>
Public Types | |
enum | OpType { OT_POINT_LIST, OT_LINE_LIST, OT_LINE_STRIP, OT_TRIANGLE_LIST, OT_TRIANGLE_STRIP, OT_TRIANGLE_FAN } |
enum | VertexOptions { VO_NORMALS = 1, VO_TEXTURE_COORDS = 2, VO_DIFFUSE_COLOURS = 4, VO_SPECULAR_COLOURS = 8, VO_BLEND_WEIGHTS = 16 } |
Vertex options - which elements to include. More... | |
Public Methods | |
RenderOperation () | |
Public Attributes | |
bool | useIndexes |
unsigned int | numVertices |
Number of vertices (applies to all components). More... | |
unsigned short | numBlendWeightsPerVertex |
The number of vertex blending weights per vertex, only applicable if VO_BLEND_WEIGHTS supplied. More... | |
Real * | pVertices |
Pointer to list of vertices (float {x, y z} * numVertices). More... | |
unsigned short | vertexStride |
The 'Stride' between sets of vertex data. 0 indicates data is packed with no gaps. More... | |
Real * | pNormals |
Optional vertex normals for vertices (float {x, y, z} * numVertices). More... | |
unsigned short | normalStride |
The 'Stride' between sets of normal data. 0 indicates data is packed with no gaps. More... | |
Real * | pTexCoords [OGRE_MAX_TEXTURE_COORD_SETS] |
Optional texture coordinates for vertices (float {u, [v], [w]} * numVertices). More... | |
unsigned short | texCoordStride [OGRE_MAX_TEXTURE_COORD_SETS] |
The 'Stride' between each set of texture data. 0 indicates data is packed with no gaps. More... | |
int | numTextureCoordSets |
Number of groups of u,[v],[w]. More... | |
int | numTextureDimensions [OGRE_MAX_TEXTURE_COORD_SETS] |
Number of dimensions in each corresponding texture coordinate set. More... | |
RGBA * | pDiffuseColour |
Optional pointer to a list of diffuse vertex colours (32-bit RGBA * numVertices). More... | |
unsigned short | diffuseStride |
The 'Stride' between sets of diffuse colour data. 0 indicates data is packed with no gaps. More... | |
RGBA * | pSpecularColour |
Optional pointer to a list of specular vertex colours (32-bit RGBA * numVertices). More... | |
unsigned short | specularStride |
The 'Stride' between sets of specular colour data. 0 indicates data is packed with no gaps. More... | |
VertexBlendData * | pBlendingWeights |
Optional pointer to a list of vertex blending details, organised in vertex order. More... | |
unsigned short * | pIndexes |
Pointer to a list of vertex indexes describing faces (only used if useIndexes is true). More... | |
unsigned int | numIndexes |
The number of vertex indexes (must be a multiple of 3). More... | |
int | vertexOptions |
Flags indicating vertex types. More... | |
OpType | operationType |
The type of rendering operation. More... |
Render options like filtering, z-buffer options etc are not provided here, but via, various 'set' methods of the RenderSystem class, since render state changes are typically expensive, so the assumption is that render states will remain fairly constant between rendering operations if possible.
Notes on indexed triangle lists: Vertices are not duplicated in the rendering pipeline where they are shared by multiple triangles. Be aware, however, that when sharing vertices ALL aspects are shared, including the vertex normal and texture coordinates which is not always appropriate (e.g. if you want a 'hard' edge to a join, or at the seam of a texture). You should pre-duplicate the vertices where this is a problem with the separate texture and normal values. The Ogre library does this automatically with imported models.
In all cases, remember that Ogre uses a right-handed world co-ordinate system, (hold your right-hand flat in the X-axis direction and curl your fingers toward the Y-Axis: your thumb points in the positive Z-axis direction). Note that in screen space this gets flipped so higher Z is into the screen. This is a standard system as used by most maths texts and modelling tools (and OpenGL, but not D3D). In addition, the FRONT of triangles is deemed to be the side where the vertices are in counter-clockwise in RH co-ords as viewed from the camera.
|
|
|
Vertex options - which elements to include.
|
|
|
|
The 'Stride' between sets of diffuse colour data. 0 indicates data is packed with no gaps.
|
|
The 'Stride' between sets of normal data. 0 indicates data is packed with no gaps.
|
|
The number of vertex blending weights per vertex, only applicable if VO_BLEND_WEIGHTS supplied.
|
|
The number of vertex indexes (must be a multiple of 3).
|
|
Number of groups of u,[v],[w].
|
|
Number of dimensions in each corresponding texture coordinate set.
|
|
Number of vertices (applies to all components).
|
|
The type of rendering operation.
|
|
Optional pointer to a list of vertex blending details, organised in vertex order. The number of weights per vertex is recorded in numBlendWeightsPerVertex - there must be this many for every vertex: set the weight to 0 for those vertices that don't use all the entries (if some vertices have more than others) |
|
Optional pointer to a list of diffuse vertex colours (32-bit RGBA * numVertices).
|
|
Pointer to a list of vertex indexes describing faces (only used if useIndexes is true).
|
|
Optional vertex normals for vertices (float {x, y, z} * numVertices).
|
|
Optional pointer to a list of specular vertex colours (32-bit RGBA * numVertices).
|
|
Optional texture coordinates for vertices (float {u, [v], [w]} * numVertices).
|
|
Pointer to list of vertices (float {x, y z} * numVertices).
|
|
The 'Stride' between sets of specular colour data. 0 indicates data is packed with no gaps.
|
|
The 'Stride' between each set of texture data. 0 indicates data is packed with no gaps.
|
|
|
|
Flags indicating vertex types.
|
|
The 'Stride' between sets of vertex data. 0 indicates data is packed with no gaps.
|
Copyright © 2002 by The OGRE Team