MGeometryRequirements Class Reference


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 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 requirementDescriptors() method. For each such requirement, implementations of MPxGeometryOverride should create a vertex buffer on the MGeometry instance which matchs the vertex buffer descriptor from the requirement and fill it with data. Second, each item in the render item list requires an index buffer. The render item defines what type of primitive the index buffer should reference. For each render item, implementations of MPxGeometryOverride should create an index buffer on the MGeometry instance and fill it with data. Then MRenderItem::associateWithIndexBuffer() should be called on the item.

#include <MHWGeometry.h>

List of all members.

Public Member Functions

const MVertexBufferDescriptorList requirementDescriptors () const
  Get a descriptor list with descriptors that specify the vertex geometry requirements of this object.
const MRenderItemList renderItemList () const
  Return the render item list that generated this set of geometry requirements.

Static Public Member Functions

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

Member Function Documentation

const MVertexBufferDescriptorList & requirementDescriptors ( ) const

Get a descriptor list with descriptors that specify the vertex geometry requirements of this object.

This list 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 MRenderItemList & renderItemList ( ) const

Return the render item list that generated this set of geometry requirements.

MPxGeometryOverride::populateGeometry must generate an index buffer for each render item in the list and that index buffer must be associated to the render item with MRenderItem::associateWithIndexBuffer() in order for the render item to draw.

Returns:
The render item list that generated the requirements
const char * className ( ) [static]

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