OpenMayaRender.MGeometry Class Reference

Class Description

Class for working with geometric structures used to draw objects.
+ Inheritance diagram for OpenMayaRender.MGeometry:

Public Member Functions

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

Static Public Member Functions

dataTypeString ()
 
drawModeString ()
 
primitiveString ()
 
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 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
 

Constructor & Destructor Documentation

OpenMayaRender.MGeometry.__init__ ( )
x.__init__(...) initializes x; see help(type(x)) for signature

Member Function Documentation

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.
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.
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.
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().
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
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.
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.
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
OpenMayaRender.MGeometry.indexBuffer ( )
indexBuffer(int) -> MIndexBuffer

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

Get the number of index buffers contained in this MGeometry object.
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
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
OpenMayaRender.MGeometry.vertexBuffer ( )
vertexBuffer(int) -> MVertexBuffer

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

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