- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# MGeometryRequirements Class Reference
OpenMayaRender - API module for rendering

Search for all occurrences

## Detailed 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.

`#include <MHWGeometry.h>`

List of all members.

## 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.

## Member Function Documentation

void addVertexRequirement | ( | const MVertexBufferDescriptor | descriptor | ) |

Search for all occurrences

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

Parameters:

  [in] | descriptor | The descriptor to add as a requirement

void addIndexingRequirement | ( | const MIndexBufferDescriptor | descriptor | ) |

Search for all occurrences

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

Parameters:

  [in] | descriptor | The descriptor to add as a requirement

const MVertexBufferDescriptorList & vertexRequirements | ( |  | ) | const

Search for all occurrences

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

const MIndexBufferDescriptorList & indexingRequirements | ( |  | ) | const

Search for all occurrences

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]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements
MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements MGeometryRequirements