MGeometryRequirements Class Reference

#include <MHWGeometry.h>

Class Description

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.

+ Examples:

Public Member Functions

 MGeometryRequirements ()
 Constructor.
 
 ~MGeometryRequirements ()
 Destructor.
 
void addVertexRequirement (const MVertexBufferDescriptor &descriptor)
 Add a new vertex requirement to the list of vertex requirements. More...
 
void addIndexingRequirement (const MIndexBufferDescriptor &descriptor)
 Add a new indexing requirement to the list of indexing requirements. More...
 
const MVertexBufferDescriptorListvertexRequirements () const
 Get a descriptor list with descriptors that specify the vertex geometry requirements of this object. More...
 
const MIndexBufferDescriptorListindexingRequirements () const
 Get a descriptor list with descriptors that specify the geometry indexing requirements of an object. More...
 

Static Public Member Functions

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

Member Function Documentation

void addVertexRequirement ( const MVertexBufferDescriptor descriptor)

Add a new vertex requirement to the list of vertex requirements.

Parameters
[in]descriptorThe descriptor to add as a requirement
+ Examples:
void addIndexingRequirement ( const MIndexBufferDescriptor descriptor)

Add a new indexing requirement to the list of indexing requirements.

Parameters
[in]descriptorThe descriptor to add as a requirement
+ Examples:
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().

Returns
A const reference to the list of descriptors
+ Examples:
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.

Returns
A const reference to the list of descriptors
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

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