#include <MPxVertexBufferMutator.h>
Base class for user defined vertex buffer generators.
Implementations of MPxVertexBufferMutator must be registered with Maya through MDrawRegistry.
MPxVertexBufferMutators are registered with a unique buffer name. The name signifies the name of the custom stream the mutator can alter. When an MPxShaderOverride or custom renderer uses an effect with custom input streams they can provide a unique name in the MVertexBufferDescriptor and a registered MPxVertexBufferMutator will be used to alter the custom stream for a given shape using the incoming requirements held in the MVertexBuffer.
modifyVertexStream() is called to allow the mutator to alter the vertex data Access the requirements for the requested stream through vertexBuffer.descriptor(). Populate the stream using vertexBuffer.acquire() and vertexBuffer.commit().
Public Member Functions | |
MPxVertexBufferMutator () | |
Construct an MPxVertexBufferMutator. | |
virtual | ~MPxVertexBufferMutator () |
Destructor. | |
virtual void | modifyVertexStream (const MObject &object, MVertexBuffer &vertexBuffer, const MComponentDataIndexing &targetIndexing) const =0 |
This method gets called to allow the mutator to alter the data for a custom vertex stream. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
|
pure virtual |
This method gets called to allow the mutator to alter the data for a custom vertex stream.
Use the requirements in the vertexBuffer to get the description of the stream. Use vertexBuffer.aquire() and vertexBuffer.commit() to fill the buffer.
[in] | object | The object being evaluated. |
[in,out] | vertexBuffer | The vertex buffer to alter. |
[in] | targetIndexing | Vertex index mapping from targetIndexing.getComponentType() space to vertex buffer space. |
|
static |
Returns the name of this class.