MGeometryPrimitive Class Reference
[OpenMayaRender - API module for rendering]

#include <MGeometryPrimitive.h>

List of all members.


Detailed Description

Geometric index container.

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.
Examples:

D3DGeometryItem.cpp, hlslShader.cpp, and OpenGLViewportRenderer.cpp.


Public Types

enum  DrawPrimitiveType {
  kInvalidIndexType = 0, kPoints, kLines, kLineStrip,
  kLineLoop, kTriangles, kTriangleStrip, kTriangleFan,
  kQuads, kQuadStrip, kPolygon, kMaxDrawPrimitiveTypeIndex
}
 Specifies the data primitive type constructed by the indexing array. More...

Public Member Functions

 ~MGeometryPrimitive ()
 Destructor.
int uniqueID () const
DrawPrimitiveType drawPrimitiveType () const
unsigned int elementCount () const
MGeometryData::ElementType dataType () const
const void * data () const

Friends

class MGeometry
class MVaryingParameter
class MHardwareRenderer

Member Enumeration Documentation

Specifies the data primitive type constructed by the indexing array.

Enumerator:
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.
kMaxDrawPrimitiveTypeIndex  Number of primitive types.


Constructor & Destructor Documentation

MGeometryPrimitive::~MGeometryPrimitive (  ) 

Destructor.

Class destructor.


Member Function Documentation

int MGeometryPrimitive::uniqueID (  )  const

Return the per session unique identifier

Returns:
Unique data identifier.

MGeometryPrimitive::DrawPrimitiveType MGeometryPrimitive::drawPrimitiveType (  )  const

Get the data type for the data.

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

unsigned int MGeometryPrimitive::elementCount (  )  const

Return element count.

Returns:
Element count. 0 is returned on error.
Examples:

MGeometryData::ElementType MGeometryPrimitive::dataType (  )  const

Return element data type.

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

const void * MGeometryPrimitive::data (  )  const

Retrieve a pointer to the internal data

Returns:
Void pointer to the data. Pointer is NULL on error.
Examples:


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6