MPxPrimitiveGenerator Class Reference
#include <MPxPrimitiveGenerator.h>
Base class for user defined primitive generators.
Implementations of MPxPrimitiveGenerator must be registered with Maya through MDrawRegistry .
MPxPrimitiveGenerators are registered with a unique primitive type name. The name signifies the name of the custom primitive the generator can produce. When an MPxShaderOverride or custom renderer uses an effect with custom input primitive they can provide a MIndexBufferDescriptor with the desired custom primitive name. A registered MPxPrimitiveGenerator will be used to produce the custom primitive.
unsigned int computeIndexCount
(
const MObject &
object ,
const MObject &
component
)
const
pure virtual
This function is called to allow the primitive generator to provide the number of vertices it will use.
Parameters
[in] object The object being evaluated.
[in] component The components to use.
This method gets called to allow the generator to fill in the data for a custom index stream.
Parameters
[in] object The object being evaluated.
[in] component The components to use when building the index buffer.
[in] sourceIndexing Vertex index mapping in the declared MComponentDataIndexing::MComponentType space.
[in] targetIndexing Vertex index mapping from targetIndexing.getComponentType() space to vertex buffer space.
[out] indexBuffer The index buffer to fill.
[out] primitiveStride The stride of the generated indexing, only valid when the returned primitive type is kPatch.
Returns The type of primitive of the generated indexing.
const char * className
(
)
static
Returns the name of this class.
Returns Name of this class.
The documentation for this class was generated from the following files:
MPxPrimitiveGenerator.h
MPxPrimitiveGenerator.cpp