Geometry requirements.
This class is used to describe the geometry requirements to be fulfilled by an implementation of MPxGeometryOverride. It represents the union of all vertex requirements from all shaders assigned to the object being evaluated by the MPxGeometryOverride instance.
There are two parts to the requirements. First, the vertex requirements are accessed through the vertexRequirements() method. For each such requirement, implementations of MPxGeometryOverride should create a vertex buffer on the MGeometry instance which matches the vertex buffer descriptor from the requirement and fill it with data. Second, the indexing requirements are accessed through the indexingRequirements() method. This list is populated when making geometry requests using classes like MGeometryExtractor.
#include <MHWGeometry.h>
Public Member Functions | |
MGeometryRequirements () | |
Constructor. | |
~MGeometryRequirements () | |
Destructor. | |
void | addVertexRequirement (const MVertexBufferDescriptor descriptor) |
Add a new vertex requirement to the list of vertex requirements. | |
void | addIndexingRequirement (const MIndexBufferDescriptor descriptor) |
Add a new indexing requirement to the list of indexing requirements. | |
const MVertexBufferDescriptorList & | vertexRequirements () const |
Get a descriptor list with descriptors that specify the vertex geometry requirements of this object. | |
const MIndexBufferDescriptorList & | indexingRequirements () const |
Get a descriptor list with descriptors that specify the geometry indexing requirements of an object. | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. |
void addVertexRequirement | ( | const MVertexBufferDescriptor | descriptor | ) |
Add a new vertex requirement to the list of vertex requirements.
[in] | descriptor | The descriptor to add as a requirement |
void addIndexingRequirement | ( | const MIndexBufferDescriptor | descriptor | ) |
Add a new indexing requirement to the list of indexing requirements.
[in] | descriptor | The descriptor to add as a requirement |
const MVertexBufferDescriptorList & vertexRequirements | ( | ) | const |
Get a descriptor list with descriptors that specify the vertex geometry requirements of this object.
This list is formed by taking the union of all vertex geometry requirements from all render items generated for the associated Maya object. Satisfying this list will satisfy the requirements of all render items. To access per-render item geometry requirements call MRenderItem::requiredVertexBuffers() on the render items returned by MGeometryRequirements::renderItemList().
const MIndexBufferDescriptorList & indexingRequirements | ( | ) | const |
Get a descriptor list with descriptors that specify the geometry indexing requirements of an object.
This list defines the list of MRenderItems required by an effect or the format of the index streams returned by a MGeometryExtractor.
const char * className | ( | ) | [static] |