- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Friends

# MVertexBufferDescriptor Class Reference
OpenMayaRender - API module for rendering

This reference page is linked to from the following overview topics: データ クラス(Data Classes).

Search for all occurrences

## Detailed Description

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.

Examples:

  cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

`#include <MHWGeometry.h>`

List of all members.

## 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 Search for all occurrences

## Constructor & Destructor Documentation

MVertexBufferDescriptor | ( | const MString & | name,
|  | MGeometry::Semantic | semantic,
|  | MGeometry::DataType | type,
|  | int | dimension
| ) |  |

Constructor.

Parameters:

  [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.

Parameters:

  [in] | other | The descriptor to copy

## Member Function Documentation

MVertexBufferDescriptor & operator= | ( | const MVertexBufferDescriptor & | other | ) |

NO SCRIPT SUPPORT.

Assignment operator.

Parameters:

  [in] | other | The descriptor to copy

Returns:
  Reference to this

MString name | ( |  | ) | const

Search for all occurrences

Get the name of the buffer.

Returns:
  The name of the buffer

Examples:
  cgfxShaderNode.cpp, and hwPhongShader.cpp.

void setName | ( | const MString & | n | ) |

Search for all occurrences

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.

Parameters:

  [in] | n | The new name

MGeometry::Semantic semantic | ( |  | ) | const

Search for all occurrences

Get the semantic of the buffer The semantic is used by the hardware effects system and must be one of the predefined types.

Returns:
  The semantic of the buffer

Examples:
  cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

void setSemantic | ( | MGeometry::Semantic | s | ) |

Search for all occurrences

Set the semantic of the buffer.

Parameters:

  [in] | s | The new semantic

MString semanticName | ( |  | ) | const

Search for all occurrences

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.

Returns:
  The custom semantic name assigned to the buffer

void setSemanticName | ( | const MString & | n | ) |

Search for all occurrences

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.

Parameters:

  [in] | n | The new semantic name to assign to the buffer

MGeometry::DataType dataType | ( |  | ) | const

Search for all occurrences

Get the data type of the buffer.

Returns:
  The data type of the buffer

Examples:
  hwPhongShader.cpp.

void setDataType | ( | MGeometry::DataType | d | ) |

Search for all occurrences

Set the data type of the buffer.

Parameters:

  [in] | d | The new dataType

unsigned int dataTypeSize | ( |  | ) | const

Search for all occurrences

Get the size in bytes of the data type of the buffer.

Returns:
  the size in bytes of the data type of the buffer

Examples:
  cgfxShaderNode.cpp.

int dimension | ( |  | ) | const

Search for all occurrences

Get the dimension of the buffer.

Returns:
  The dimension of the buffer

Examples:
  cgfxShaderNode.cpp, and hwPhongShader.cpp.

void setDimension | ( | int | d | ) |

Search for all occurrences

Set the dimension of the buffer.

Parameters:

  [in] | d | The new dimension

int offset | ( |  | ) | const

Search for all occurrences

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().

Returns:
  The offset of the vertex buffer.

Examples:
  cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

int stride | ( |  | ) | const

Search for all occurrences

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().

Returns:
  The stride of the vertex buffer.

Examples:
  cgfxShaderNode.cpp, hwColorPerVertexShader.cpp, and hwPhongShader.cpp.

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor
MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor MVertexBufferDescriptor