This reference page is linked to from the following overview topics: データ クラス(Data Classes).
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 The buffer name is used to determine which render item this buffer belongs to. | |
MGeometry::Semantic | semantic () const |
Get the semantic of the buffer The semantic is used by the hardware effects system and must be one of the predefined types. | |
void | setSemantic (MGeometry::Semantic s) |
Set the semantic of the buffer. | |
MString | semanticName () const |
Get the semantic name of the buffer The semanticName is used to identify a custom vertex stream request in order to fill the stream with the appropriate data requested by a shader override. | |
void | setSemanticName (const MString &n) |
Set the semantic name of the buffer The semanticName is used to identify a custom vertex stream request in order to fill the stream with the appropriate data requested by a shader override. | |
MGeometry::DataType | dataType () const |
Get the data type of the buffer. | |
void | setDataType (MGeometry::DataType d) |
Set the data type 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. | |
Friends | |
class | MGeometryRequirements |
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 | ) |
Set the name of the buffer The buffer name is used to determine which render item this buffer belongs to.
This name is typically set by the evaluator of the geometry.
[in] | n | The new name |
MGeometry::Semantic semantic | ( | ) | const |
Get the semantic of the buffer The semantic is used by the hardware effects system and must be one of the predefined types.
void setSemantic | ( | MGeometry::Semantic | s | ) |
MString semanticName | ( | ) | const |
Get the semantic name of the buffer The semanticName is used to identify a custom vertex stream request in order to fill the stream with the appropriate data requested by a shader override.
void setSemanticName | ( | const MString & | n | ) |
Set the semantic name of the buffer The semanticName is used to identify a custom vertex stream request in order to fill the stream with the appropriate data requested by a shader override.
[in] | n | The new semantic name to assign to the buffer |
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] |