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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# MIndexBufferDescriptor Class Reference
OpenMayaRender - API module for rendering

Search for all occurrences

## Detailed Description

MIndexBufferDescriptor describes an indexing scheme.

This class represents a description of an indexing scheme. It provides the indexing type (including custom named types), primitive type, primitive stride (for use with patch primitives), and component information.

`#include <MHWGeometry.h>`

List of all members.

## Public Member Functions
| MIndexBufferDescriptor ()
| Constructor.
| MIndexBufferDescriptor (MIndexBufferDescriptor::IndexType type, MString &name, MGeometry::Primitive primitive, unsigned int primitiveStride=0, MObject component=MObject::kNullObj, MGeometry::DataType dataType=MGeometry::kUnsignedInt32)
| Constructor with arguments.
| ~MIndexBufferDescriptor ()
| Destructor.
MString | name () const
| Get the name used to describe the type when the type() returns kCustom.
void | setName (MString &val)
| Set the name used to describe the type when the type() is set to kCustom.
MIndexBufferDescriptor::IndexType | indexType () const
| Get the indexing type describing what the buffer is used for.
void | setIndexType (MIndexBufferDescriptor::IndexType val)
| Set the indexing type describing what the buffer is used for.
MGeometry::Primitive | primitive () const
| Get the primitive describing the input layout for each drawable.
void | setPrimitive (MGeometry::Primitive val)
| Set the primitive describing the input layout for each drawable.
unsigned int | primitiveStride () const
| Get the number of points per primitive.
void | setPrimitiveStride (unsigned int id)
| Set the number of control points used for patch primitives.
MObject | component () const
| Get the components associated with the index buffer.
void | setComponent (MObject component)
| Set the components to use when building the index buffer.
MGeometry::DataType | dataType () const
| Get the type of data expected to be in the index buffer.
void | dataType (MGeometry::DataType dataType)
| Set the type of data expected to be in the index buffer.

## Constructor & Destructor Documentation

MIndexBufferDescriptor | ( | MIndexBufferDescriptor::IndexType | type,
|  | MString & | name,
|  | MGeometry::Primitive | primitive,
|  | unsigned int | primitiveStride = `0`,
|  | MObject | component = `MObject::kNullObj`,
|  | MGeometry::DataType | dataType = `MGeometry::kUnsignedInt32`
| ) |  |

Constructor with arguments.

Parameters:

  [in] | type | The indexing type describing what the buffer is used for.
  [in] | name | Used to describe the type when the type argument is kCustom.
  [in] | primitive | A description of the input layout for each drawable.
  [in] | primitiveStride | The number of control points per patch when the primitive type is kPatch.
  [in] | component | The components to use when building the index buffer. If this is MObject::kNullObj the index buffer represents the whole object.
  [in] | dataType | The data type the buffer will hold.

## Member Function Documentation

MString name | ( |  | ) | const

Search for all occurrences

Get the name used to describe the type when the type() returns kCustom.

Returns:
  The name to use as the custom type.

void setName | ( | MString & | val | ) |

Search for all occurrences

Set the name used to describe the type when the type() is set to kCustom.

Parameters:

  [in] | val | The name to use as the custom type.

MIndexBufferDescriptor::IndexType indexType | ( |  | ) | const

Search for all occurrences

Get the indexing type describing what the buffer is used for.

Returns:
  The indexing type describing what the buffer is used for.

void setIndexType | ( | MIndexBufferDescriptor::IndexType | val | ) |

Search for all occurrences

Set the indexing type describing what the buffer is used for.

Parameters:

  [in] | val | The indexing type describing what the buffer is used for.

MGeometry::Primitive primitive | ( |  | ) | const

Search for all occurrences

Get the primitive describing the input layout for each drawable.

Returns:
  The primitive describing the input layout for each drawable.

void setPrimitive | ( | MGeometry::Primitive | val | ) |

Search for all occurrences

Set the primitive describing the input layout for each drawable.

Parameters:

  [in] | val | The primitive describing the input layout for each drawable.

unsigned int primitiveStride | ( |  | ) | const

Search for all occurrences

Get the number of points per primitive.

Returns:
  The stride of the primitive;

void setPrimitiveStride | ( | unsigned int | stride | ) |

Search for all occurrences

Set the number of control points used for patch primitives.

Setting this value is only meaningful when primitive() is set to kPatch.

Parameters:

  [in] | stride | The stride of the patch primitive;

MObject component | ( |  | ) | const

Search for all occurrences

Get the components associated with the index buffer.

Note that only one type of component (edge, face, etc) can be associated with a given index buffer.

if ( component.hasFn(MFn::kSingleIndexedComponent) ) { MFnSingleIndexedComponent fnVtxComp( component ); int len = fnVtxComp.elementCount(); for ( int i = 0; i < len; i++ ) { int idx = fnVtxComp.element(i); } }

Returns:
  The component. If this returns MObject::kNullObj the index buffer represents the whole object.

void setComponent | ( | MObject | component | ) |

Search for all occurrences

Set the components to use when building the index buffer.

Parameters:

  [in] | component | The component. If this is MObject::kNullObj the index buffer represents the whole object.

MGeometry::DataType dataType | ( |  | ) | const

Search for all occurrences

Get the type of data expected to be in the index buffer.

Returns:
  The type of data the buffer is to contain.

void dataType | ( | MGeometry::DataType | dataType | ) |

Search for all occurrences

Set the type of data expected to be in the index buffer.

Parameters:

  [in] | dataType | The type of data to fill the buffer with.

MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor
MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor MIndexBufferDescriptor