class MGeometryPrimitive

Jump to documentation

Geometric index container (OpenMayaRender) (OpenMayaRender.py)

public members:

enum DrawPrimitiveType
Specifies the data primitive type constructed by the indexing array
kInvalidIndexType
Default value is not valid
kPoints
Corresponds to GL_POINTS in OpenGL
kLines
Corresponds to GL_LINES in OpenGL (individual unconnected line segments)
kLineStrip
Corresponds to GL_LINE_STRIP in OpenGL
kLineLoop
Corresponds to GL_LINE_LOOP in OpenGL (non-filled, connected line segments)
kTriangles
Corresponds to GL_TRIANGLES In OpenGL
kTriangleStrip
Corresponds to GL_TRIANGLE_STRIP in OpenGL
kTriangleFan
Corresponds to GL_TRIANGLE_FAN in OpenGL
kQuads
Corresponds to GL_QUADS in OpenGL
kQuadStrip
Corresponds to GL_QUAD_STRIP in OpenGL
kPolygon
Corresponds to GL_POLYGON in OpenGL
~MGeometryPrimitive ()
Destructor
int uniqueID () const
DrawPrimitiveType drawPrimitiveType () const
unsigned int elementCount () const
MGeometryData::ElementType dataType () const
const void * data () const

Documentation

This class is a geometric index container
Description

MGeometryPrimitive is a class describes the topology used for accessing MGeometryData.

Topology is specified as a set of index values which references into data elements in an MGeometryData. Index values can be assumed to be stored in contiguous memory.

A "draw primitive type" indicates the format of the indexing as follows:

Internal Maya data which is passed to the user via this class is always assumed to be non-modifiable. If modified, stability cannot be ensured.

Functions

MGeometryPrimitive:: ~MGeometryPrimitive ()

Description

Class destructor.

MGeometryPrimitive::DrawPrimitiveType MGeometryPrimitive:: drawPrimitiveType () const

Description

Get the data type for the data.

Arguments

  • None

Return Value

  • Geometry data type. MGeometryPrimitive::kInvalid on error.

int MGeometryPrimitive:: uniqueID () const

Description

Return the per session unique identifier

Arguments

  • None

Return Value

  • Unique data identifier.

unsigned int MGeometryPrimitive:: elementCount () const

Description

Return element count.

Arguments

  • None

Return Value

  • Element count. 0 is returned on error.

MGeometryData::ElementType MGeometryPrimitive:: dataType () const

Description

Return element data type.

Arguments

  • None

Return Value

  • Element type. MGeometryData::kInvalidElementType is returned on error.

const void * MGeometryPrimitive:: data () const

Description

Retrive a pointer to the internal data

Arguments

  • None

Return Value

  • Void pointer to the data. Pointer is NULL on error.

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright