Describes properties of a vertex buffer.
This class gives a complete description of a vertex buffer and is used by MGeometry, MVertexBuffer and MGeometryRequirements to simplify management of vertex buffer attributes.
Note that not all combinations of semantics, data types and dimensions are currently supported. Attempts to create vertex buffers with unsupported attributes will fail.
cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.
#include <MHWGeometry.h>
Public Member Functions |
|
MVertexBufferDescriptor () | |
Constructor. |
|
MVertexBufferDescriptor (const MString &name, MGeometry::Semantic semantic, MGeometry::DataType dataType, int dimension) | |
Constructor. |
|
~MVertexBufferDescriptor () | |
Destructor. |
|
MVertexBufferDescriptor (const MVertexBufferDescriptor &other) | |
NO SCRIPT SUPPORT. |
|
MVertexBufferDescriptor & | operator= (const MVertexBufferDescriptor &other) |
NO SCRIPT SUPPORT. |
|
MString | name () const |
Get the name of the buffer. |
|
void | setName (const MString &n) |
Set the name of the buffer. |
|
MGeometry::Semantic | semantic () const |
Get the semantic of the buffer. |
|
void | setSemantic (MGeometry::Semantic s) |
Set the semantic of the buffer. |
|
MGeometry::DataType | dataType () const |
Get the data type of the buffer. |
|
void | setDataType (MGeometry::DataType d) |
Set the semantic of the buffer. |
|
unsigned int | dataTypeSize () const |
Get the size in bytes of the data type of
the buffer. |
|
int | dimension () const |
Get the dimension of the buffer. |
|
void | setDimension (int d) |
Set the dimension of the buffer. |
|
int | offset () const |
Get the offset of the vertex buffer.
|
|
int | stride () const |
Get the stride of the vertex buffer.
|
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
MVertexBufferDescriptor | ( | const MString & | name, |
MGeometry::Semantic | semantic, | ||
MGeometry::DataType | type, | ||
int | dimension | ||
) |
Constructor.
[in] | name | The name of the buffer |
[in] | semantic | The semantic of the buffer |
[in] | type | The data type of the buffer |
[in] | dimension | The dimension of the data type |
MVertexBufferDescriptor | ( | const MVertexBufferDescriptor & | other | ) |
NO SCRIPT SUPPORT.
Copy constructor.
[in] | other | The descriptor to copy |
MVertexBufferDescriptor & operator= | ( | const MVertexBufferDescriptor & | other | ) |
NO SCRIPT SUPPORT.
Assignment operator.
[in] | other | The descriptor to copy |
MString name | ( | ) | const |
Get the name of the buffer.
void setName | ( | const MString & | n | ) |
MGeometry::Semantic semantic | ( | ) | const |
Get the semantic of the buffer.
void setSemantic | ( | MGeometry::Semantic | s | ) |
MGeometry::DataType dataType | ( | ) | const |
void setDataType | ( | MGeometry::DataType | d | ) |
unsigned int dataTypeSize | ( | ) | const |
Get the size in bytes of the data type of the buffer.
int dimension | ( | ) | const |
Get the dimension of the buffer.
void setDimension | ( | int | d | ) |
int offset | ( | ) | const |
Get the offset of the vertex buffer.
Note user-setting of this value is not currently supported. The value returned by this method is currently only valid in the context of MPxShaderOverride::draw().
int stride | ( | ) | const |
Get the stride of the vertex buffer.
Note user-setting of this value is not currently supported. The value returned by this method is currently only valid in the context of MPxShaderOverride::draw().
const char * className | ( | ) | [static] |