Python API 2.0 Reference
OpenMayaRender.MGeometryExtractor Class Reference
+ Inheritance diagram for OpenMayaRender.MGeometryExtractor:

Public Member Functions

def __init__ ()
 
def populateIndexBuffer ()
 
def populateVertexBuffer ()
 
def primitiveCount ()
 
def vertexCount ()
 

Static Public Member Functions

def __new__ ()
 
def minimumBufferSize ()
 

Static Public Attributes

int kPolyGeom_BaseMesh = 2
 
int kPolyGeom_Normal = 0
 
int kPolyGeom_NotSharing = 1
 

Detailed Description

Class for extracting renderable geometry.

Constructor & Destructor Documentation

def OpenMayaRender.MGeometryExtractor.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaRender.MGeometryExtractor.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaRender.MGeometryExtractor.minimumBufferSize ( )
static
minimumBufferSize(primitiveCount, primitive, primitiveStride=0) -> int

Get the minimum buffer size required by populateIndexBuffer().

* primitiveCount (int) - The number of primitives.
* primitive (int) - The primitive type. See MGeometry.primitiveString() for list of primitive types.
* primitiveStride (int) - The number of control points in a patch when the type is kPatch.
def OpenMayaRender.MGeometryExtractor.populateIndexBuffer ( )
populateIndexBuffer(data, primitiveCount, indexDesc) -> self

Fill a buffer with geometry indexing data.
This method will use the information provided in the MIndexBufferDescriptor argument to populate the buffer with the desired indexing data.  The descriptor will describe the surface index type, the primitive type, and the data type.  The populateIndexBuffer method will generate a buffer that matches the request.
The length of the buffer should be at least the as big as the value returned by minimumBufferSize().

* data (buffer) - The buffer you want filled.
* primitiveCount (int) - The number of primitives you expect to be filled in the buffer.
* indexDesc (MIndexBufferDescriptor) - The description of the buffer you are requesting.
def OpenMayaRender.MGeometryExtractor.populateVertexBuffer ( )
populateVertexBuffer(data, vertexCount, bufferDesc) -> self

Fill a buffer with vertex data.
This method will use the information provided in the MVertexBufferDescriptor argument to populate the buffer with the desired vertex data.  The descriptor will describe the buffer's name, semantic, and data type.
The populateVertexBuffer method will supply a buffer that matches the request.  The length of the buffer should be at least (vertexCount * bufferDesc.stride()).
Values for normals, tangents and bitangents are all normalized.

* data (buffer) - The buffer you want filled.
* vertexCount (int) - The vertex count you expect to be filled in the buffer.
* bufferDesc (MVertexBufferDescriptor) - The description of the buffer you are requesting.
def OpenMayaRender.MGeometryExtractor.primitiveCount ( )
primitiveCount(indexDesc) -> int

Returns the number of primitives (triangles, lines, points, etc.) that will be produced for the given indexing requirements.
Call this method before calling populateIndexBuffer to determine the minimum size the buffer passed into populateIndexBuffer needs to be.

* indexDesc (MIndexBufferDescriptor) - The description of the index buffer you request the count for.
def OpenMayaRender.MGeometryExtractor.vertexCount ( )
vertexCount() -> int

Returns the number of vertices that will be produced for the vertex requirement.
Call this method before calling populateVertexBuffer to determine the minimum size the buffer passed into populateVertexBuffer needs to be.