class MGeometryList

Jump to documentation

Geometric data cache. (OpenMayaRender) (OpenMayaRender.py)

public members:

MGeometryList ( const MRenderingInfo & info, int initialCapacity = 1)
~MGeometryList ()
bool isDone () const
void next ()
void reset ()
int length () const
void setCurrentElement ( int i)
enum
kNone
No renderer setup is required for this element
kMatrices
Setup the model view matrix for this element
kFixedFunctionLighting
Setup the fixed function lighting state for this element
kCulling
Setup the back/front face culling state for this element
kAll
Setup all renderer state for this element
MGeometry & geometry ( int setupFlags = kAll)
const MMatrix & objectToWorldMatrix () const
const MMatrix & projectionMatrix () const
const MMatrix & viewMatrix () const
MDagPath path () const
typedef enum {///NocullingshouldbeperformedonthisgeometrykCullNone,///CullclockwisefaceswhenrenderingthisgeometrykCullCW,///Cullcounter-clockwisefaceswhenrenderingthisgeometrykCullCCW}MCullMode
MGeometryList::MCullMode cullMode () const
bool addLast ( const MDagPath & path , const MObject * components = NULL)
bool addLast ( const MGeometry & geometry , const MMatrix & matrix)

Documentation

This class holds the set of data elements which represent a Maya surface
Description

GeometryList provides iterated access to a list of geometry items, along with the rendering context require to render them (e.g. matrix, etc).

Functions

MGeometryList:: MGeometryList ( const MRenderingInfo & info, int initialCapacity)

Description

Create an emtpy GeometryIterator for the specified rendering context.

Arguments

  • info the rendering context the geometry in this iterator should use.
  • initialCapacity the number of elements to pre-allocate space for.

MGeometryList:: ~MGeometryList ()

Description

Class destructor.

bool MGeometryList:: isDone () const

Description

Tests to see if the iterator has reached the end of the elements it contains. Once this method returns true, you should not call any further methods on the iterator.

Arguments

  • None

Return Value

  • true if the iterator has no further elements, false if there are more elements remaining.

void MGeometryList:: next ()

Description

Advance to the next element in the iterator. This should only be called if the iterator indicates it has more elements through the isDone() method.

Arguments

  • None

Return Value

  • None

void MGeometryList:: reset ()

Description

Reset this iterator to the first element. This allows you to iterate multiple times through the list.

Arguments

  • None

Return Value

  • None

int MGeometryList:: length () const

Description

Query the total number of elements available through this iterator.

Arguments

  • None

Return Value

  • the total number of elements in the iterator.

void MGeometryList:: setCurrentElement ( int i)

Description

Randomly access the ith element in the iterator.

Arguments

  • the index of the element you want to access

Return Value

  • None

MGeometry & MGeometryList:: geometry ( int setupFlags)

Description

Get the geometry for the current element in the iterator.

Arguments

  • setupFlags the parts of the rendering pipeline your shader needs setup in order to render. This can be any combination of kMatrices, kFixedFunctionLighting, kCulling, or kAll. For efficiency, you can avoid the overhead of setting up parts of the rendering pipeline not used by your shader (e.g. fixed function lighting).

Return Value

  • the geometry for the current element

const MMatrix & MGeometryList:: objectToWorldMatrix () const

Description

Get the object to world matrix for the current element in the iterator.

Arguments

  • None

Return Value

  • the matrix for the current element

const MMatrix & MGeometryList:: projectionMatrix () const

Description

Get the camera project matrix for the current element in the iterator.

Arguments

  • None

Return Value

  • the matrix for the current element

const MMatrix & MGeometryList:: viewMatrix () const

Description

Get the camera view matrix for the current element in the iterator.

Arguments

  • None

Return Value

  • the matrix for the current element

MDagPath MGeometryList:: path () const

Description

Get the dag path for the current element in the iterator.

Arguments

  • None

Return Value

  • the dag path for the current element

MGeometryList::MCullMode MGeometryList:: cullMode () const

Description

Get the rendering cull mode to use for current element in the iterator.

Arguments

  • None

Return Value

  • the cull mode for the current element

bool MGeometryList:: addLast ( const MDagPath & path , const MObject * components)

Description

Add the geometry representing a shape to this geometry iterator. Note that you are only able to add geometry items to MGeometryLists you have created using the public constructor. Trying to add elements to an iterator passed to you from Maya (e.g. in a shader render call) will fail. Arguments

  • path The DAG path for the shape to add
  • components The optional set of components (faces) to include in the geometry. A NULL value indicates the whole object should be added

  • true if the element was added to the iterator, false otherwise.

bool MGeometryList:: addLast ( const MGeometry & geometry , const MMatrix & matrix)

Description

Add arbitrary geometry to this geometry iterator. Note that you are only able to add geometry items to MGeometryLists you have created using the public constructor. Trying to add elements to an iterator passed to you from Maya (e.g. in a shader render call) will fail.

Arguments

  • geometry the geometry cache to add
  • matrix the transformation to associate with this geometry

Return Value

  • true if the element was added to the iterator, false otherwise.

This class has no child classes.


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