MPxVertexBufferMutator Class Reference

This reference page is linked to from the following overview topics: Extension for Autodesk Maya 2013, 4.3 Customizing Geometric Data for Shaders.



Detailed Description

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

#include <MPxVertexBufferMutator.h>

List of all members.

Public Member Functions

 MPxVertexBufferMutator ()
 Construct an MPxVertexBufferMutator.
virtual ~MPxVertexBufferMutator ()
 Destructor.
virtual void modifyVertexStream (const MDagPath &objPath, MVertexBuffer &vertexBuffer, const MComponentDataIndexing &targetIndexing) const =0
 This method gets called to allow the mutator to alter the data for a custom vertex stream.

Static Public Member Functions

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

Member Function Documentation

void modifyVertexStream ( const MDagPath objPath,
MVertexBuffer vertexBuffer,
const MComponentDataIndexing targetIndexing 
) const [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.

Parameters:
[in]objPathThe path to the object being evaluated.
[in,out]vertexBufferThe vertex buffer to alter.
[in]targetIndexingVertex index mapping from targetIndexing.getComponentType() space to vertex buffer space.
const char * className ( ) [static]

Returns the name of this class.

Returns:
Name of this class.

MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator
MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator MPxVertexBufferMutator