MVertexBufferDescriptor Class Reference

#include <MHWGeometry.h>

Class Description

Public Member Functions

 MVertexBufferDescriptor ()
 Constructor.
 
 MVertexBufferDescriptor (const MString &name, MGeometry::Semantic semantic, MGeometry::DataType dataType, int dimension)
 Constructor. More...
 
 MVertexBufferDescriptor (const MString &name, MGeometry::Semantic semantic, const MString &semanticName, MGeometry::DataType dataType, int dimension)
 Constructor. More...
 
 ~MVertexBufferDescriptor ()
 Destructor.
 
 MVertexBufferDescriptor (const MVertexBufferDescriptor &other)
 NO SCRIPT SUPPORT. More...
 
MVertexBufferDescriptoroperator= (const MVertexBufferDescriptor &other)
 NO SCRIPT SUPPORT. More...
 
MString name () const
 Get the name of the buffer. More...
 
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. More...
 
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. More...
 
void setSemantic (MGeometry::Semantic s)
 Set the semantic of the buffer. More...
 
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. More...
 
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. More...
 
MGeometry::DataType dataType () const
 Get the data type of the buffer. More...
 
void setDataType (MGeometry::DataType d)
 Set the data type of the buffer. More...
 
unsigned int dataTypeSize () const
 Get the size in bytes of the data type of the buffer. More...
 
int dimension () const
 Get the dimension of the buffer. More...
 
void setDimension (int d)
 Set the dimension of the buffer. More...
 
int offset () const
 Get the offset of the vertex buffer. More...
 
void setOffset (int o)
 Set the offset of the vertex element in an interleaved vertex buffer. More...
 
int stride () const
 Get the stride of the vertex buffer. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Friends

class MGeometryRequirements
 

Constructor & Destructor Documentation

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

Constructor.

Parameters
[in]nameThe name of the buffer
[in]semanticThe semantic of the buffer
[in]typeThe data type of the buffer
[in]dimensionThe dimension of the data type
MVertexBufferDescriptor ( const MString name,
MGeometry::Semantic  semantic,
const MString semanticName,
MGeometry::DataType  type,
int  dimension 
)

Constructor.

Parameters
[in]nameThe name of the buffer
[in]semanticThe semantic of the buffer
[in]semanticNameThe name that uniquely identifies the buffer
[in]typeThe data type of the buffer
[in]dimensionThe dimension of the data type

NO SCRIPT SUPPORT.

Copy constructor.

Parameters
[in]otherThe descriptor to copy

Member Function Documentation

MVertexBufferDescriptor & operator= ( const MVertexBufferDescriptor other)

NO SCRIPT SUPPORT.

Assignment operator.

Parameters
[in]otherThe descriptor to copy
Returns
Reference to this
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.

Parameters
[in]nThe new name
+ Examples:
void setSemantic ( MGeometry::Semantic  s)

Set the semantic of the buffer.

Parameters
[in]sThe new semantic
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.

Returns
The custom semantic name assigned to the buffer
+ Examples:
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.

Parameters
[in]nThe new semantic name to assign to the buffer
+ Examples:
void setDataType ( MGeometry::DataType  d)

Set the data type of the buffer.

Parameters
[in]dThe new dataType
unsigned int dataTypeSize ( ) const

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:
void setDimension ( int  d)

Set the dimension of the buffer.

Parameters
[in]dThe new dimension
int offset ( ) const

Get the offset of the vertex buffer.

The value returned by this method is currently only valid in the context of MPxShaderOverride::draw().

Returns
The offset of the vertex buffer.
+ Examples:
void setOffset ( int  o)

Set the offset of the vertex element in an interleaved vertex buffer.

User-setting of this value is only supported when using custom client buffers via resourceHandle(void*).

Vertex fields in shared, interleaved vertex buffers should be given the same resourceHandle pointer. Interleaved vertex formats must be close-packed, with no extra space in between defined fields.

Parameters
[in]oThe new offset of the vertex field, in number of 4-byte words (floats).
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().

Returns
The stride of the vertex buffer.
+ Examples:
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MHWGeometry.h
  • MHWGeometry.cpp