MPxVertexBufferMutator Class Reference

#include <MPxVertexBufferMutator.h>

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

+ Examples:

Public Member Functions

 MPxVertexBufferMutator ()
 Construct an MPxVertexBufferMutator.
virtual ~MPxVertexBufferMutator ()
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...

Member Function Documentation

void modifyVertexStream ( const MObject object,
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.

[in]objectThe 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 ( )

Returns the name of this class.

Name of this class.

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