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

Public Member Functions

def __init__ ()
 
def addIndexBuffer ()
 
def addVertexBuffer ()
 
def createIndexBuffer ()
 
def createVertexBuffer ()
 
def deleteIndexBuffer ()
 
def deleteVertexBuffer ()
 
def indexBuffer ()
 
def indexBufferCount ()
 
def vertexBuffer ()
 
def vertexBufferCount ()
 

Static Public Member Functions

def __new__ ()
 
def dataTypeString ()
 
def drawModeString ()
 
def primitiveString ()
 
def semanticString ()
 

Static Public Attributes

int kAdjacentLineStrip = 9
 
int kAdjacentLines = 8
 
int kAdjacentTriangleStrip = 7
 
int kAdjacentTriangles = 6
 
int kAll = 15
 
int kBitangent = 6
 
int kBoundingBox = 8
 
int kChar = 3
 
int kColor = 4
 
int kDouble = 2
 
int kFloat = 1
 
int kInt16 = 5
 
int kInt32 = 7
 
int kInvalidPrimitive = 0
 
int kInvalidSemantic = 0
 
int kInvalidType = 0
 
int kLineStrip = 3
 
int kLines = 2
 
int kNormal = 2
 
int kPatch = 10
 
int kPoints = 1
 
int kPosition = 1
 
int kSelectionHighlighting = 32
 
int kSelectionOnly = 16
 
int kShaded = 2
 
int kTangent = 5
 
int kTangentWithSign = 7
 
int kTexture = 3
 
int kTextured = 4
 
int kTriangleStrip = 5
 
int kTriangles = 4
 
int kUnsignedChar = 4
 
int kUnsignedInt16 = 6
 
int kUnsignedInt32 = 8
 
int kWireframe = 1
 

Detailed Description

Class for working with geometric structures used to draw objects.

Constructor & Destructor Documentation

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

Member Function Documentation

def OpenMayaRender.MGeometry.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaRender.MGeometry.addIndexBuffer ( )
addIndexBuffer(MIndexBuffer) -> bool

Buffers cannot be added to the same object twice.Adds a index buffer to this MGeometry object.
The buffer can only be added to this object once but may be added to others.
def OpenMayaRender.MGeometry.addVertexBuffer ( )
addVertexBuffer(MVertexBuffer) -> bool

Adds a vertex buffer to this MGeometry object.
The buffer can only be added to this object once but may be added to others.
def OpenMayaRender.MGeometry.createIndexBuffer ( )
createIndexBuffer(int) -> MIndexBuffer

Creates a index buffer which is bound to this MGeometry object and cannot be used with any other.
The buffer is automatically added to the MGeometry object so there is no need to call addIndexBuffer().
See MGeometry.dataTypeString() for a list of valid data types.
def OpenMayaRender.MGeometry.createVertexBuffer ( )
createVertexBuffer(MVertexBufferDescriptor) -> MVertexBuffer

Creates a vertex buffer which is bound to this MGeometry object and cannot be used with any other.
The buffer is automatically added to the MGeometry object so there is no need to call addVertexBuffer().
def OpenMayaRender.MGeometry.dataTypeString ( )
static
dataTypeString(int) -> string

Get the string name (e.g. 'Unsigned Char') for the following data type values:

  kInvalidType     Invalid element type (default value)
  kFloat           IEEE single precision floating point
  kDouble          IEEE double precision floating point
  kChar            Signed char
  kUnsignedChar    Unsigned char
  kInt16           Signed 16-bit integer
  kUnsignedInt16   Unsigned 16-bit integer
  kInt32           Signed 32-bit integer
  kUnsignedInt32   Unsigned 32-bit integer
def OpenMayaRender.MGeometry.deleteIndexBuffer ( )
deleteIndexBuffer(int) -> bool

Remove a index buffer from this object.
If the buffer was bound to this object (see createIndexBuffer()) then it will become inactive and any attempt to call any of its methods will result in an exception.
def OpenMayaRender.MGeometry.deleteVertexBuffer ( )
deleteVertexBuffer(int) -> bool

Remove a vertex buffer from this object.
If the buffer was bound to this object (see createVertexBuffer()) then it will become inactive and any attempt to call any of its methods will result in an exception.
def OpenMayaRender.MGeometry.drawModeString ( )
static
drawModeString(int) -> string

Get the string name (e.g. 'Wireframe, Shaded, Textured') for a combination of the following draw mode values:

  kWireframe      Draw in wireframe mode
  kShaded         Draw in shaded mode
  kTextured       Draw in textured mode
  kBoundingBox    Draw in bounding box mode
  kSelectionOnly  Draw only in selection mode

The draw mode value kAll is a combination of the following modes: kWireframe, kShaded, kTextured, and kBoundingBox
def OpenMayaRender.MGeometry.indexBuffer ( )
indexBuffer(int) -> MIndexBuffer

Get the index buffer stored at the given index.
def OpenMayaRender.MGeometry.indexBufferCount ( )
indexBufferCount() -> int

Get the number of index buffers contained in this MGeometry object.
def OpenMayaRender.MGeometry.primitiveString ( )
static
primitiveString(int) -> string

Get the string name (e.g. 'Triangles') for the following primitive values:

  kInvalidPrimitive        Default value is not valid
  kPoints                  List of points
  kLines                   List of lines
  kLineStrip               A line strip
  kTriangles               List of triangles
  kTriangleStrip           A triangle strip
  kAdjacentTriangles       A list of triangle with adjacency
  kAdjacentTriangleStrip   A triangle strip with adjacency
  kAdjacentLines           A list of lines with adjacency
  kAdjacentLineStrip       A line strip with adjacency
  kPatch                   A patch
def OpenMayaRender.MGeometry.semanticString ( )
static
semanticString(int) -> string

Get the string name (e.g. 'Color') for the following semantic values:

  kInvalidSemantic    Invalid data type (default value)
  kPosition           Position vector
  kNormal             Normal vector
  kTexture            Texture coordinate tuple
  kColor              Color tuple
  kTangent            Tangent vector
  kBitangent          Bi-normal vector
  kTangentWithSign    Tangent vector with winding order sign
def OpenMayaRender.MGeometry.vertexBuffer ( )
vertexBuffer(int) -> MVertexBuffer

Get the vertex buffer stored at the given index.
def OpenMayaRender.MGeometry.vertexBufferCount ( )
vertexBufferCount() -> int

Get the number of vertex buffers contained in this MGeometry object.