#include <MGeometryList.h>
This class holds the set of data elements which represent a Maya surface. It provides iterated access to a list of geometry items, along with the rendering context require to render them (e.g. matrix, etc).
hlslShader.cpp, and hlslShader.h.
Public Types | |
enum | { kNone = 0, kMatrices = 1 << 0, kFixedFunctionLighting = 1 << 1, kCulling = 1 << 2, kAll = -1 } |
Bit flags for the geometry method that govern which OpenGL state Maya sets for you. More... | |
enum | MCullMode { kCullNone, kCullCW, kCullCCW } |
Defines the culling modes to use when rendering this geometry. More... | |
Public Member Functions | |
MGeometryList (const MRenderingInfo &info, int initialCapacity=1) | |
~MGeometryList () | |
bool | isDone () const |
void | next () |
void | reset () |
int | length () const |
void | setCurrentElement (int i) |
MGeometry & | geometry (int setupFlags=kAll) |
const MMatrix & | objectToWorldMatrix () const |
const MMatrix & | projectionMatrix () const |
const MMatrix & | viewMatrix () const |
MDagPath | path () const |
MGeometryList::MCullMode | cullMode () const |
bool | addLast (const MDagPath &path, const MObject *components=NULL) |
bool | addLast (const MGeometry &geometry, const MMatrix &matrix) |
Public Attributes | |
enum MGeometryList:: { ... } | MSetupFlags |
Bit flags for the geometry method that govern which OpenGL state Maya sets for you. | |
Friends | |
class | MUniformParameter |
class | MGeometryManager |
anonymous enum |
Bit flags for the geometry method that govern which OpenGL state Maya sets for you.
MGeometryList::MGeometryList | ( | const MRenderingInfo & | info, | |
int | initialCapacity = 1 | |||
) |
Create an emtpy GeometryIterator for the specified rendering context.
[in] | info | the rendering context the geometry in this iterator should use. |
[in] | initialCapacity | the number of elements to pre-allocate space for. |
MGeometryList::~MGeometryList | ( | ) |
Class destructor.
bool MGeometryList::isDone | ( | ) | const |
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.
void MGeometryList::next | ( | ) |
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.
void MGeometryList::reset | ( | ) |
Reset this iterator to the first element. This allows you to iterate multiple times through the list.
int MGeometryList::length | ( | ) | const |
Query the total number of elements available through this iterator.
void MGeometryList::setCurrentElement | ( | int | i | ) |
Randomly access the ith element in the iterator.
[in] | i | the index of the element you want to access |
MGeometry & MGeometryList::geometry | ( | int | setupFlags = kAll |
) |
Get the geometry for the current element in the iterator.
[in] | 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). |
const MMatrix & MGeometryList::objectToWorldMatrix | ( | ) | const |
Get the object to world matrix for the current element in the iterator.
const MMatrix & MGeometryList::projectionMatrix | ( | ) | const |
Get the camera project matrix for the current element in the iterator.
const MMatrix & MGeometryList::viewMatrix | ( | ) | const |
Get the camera view matrix for the current element in the iterator.
MDagPath MGeometryList::path | ( | ) | const |
Get the dag path for the current element in the iterator.
MGeometryList::MCullMode MGeometryList::cullMode | ( | ) | const |
Get the rendering cull mode to use for current element in the iterator.
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.
[in] | path | The DAG path for the shape to add |
[in] | components | The optional set of components (faces) to include in the geometry. A NULL value indicates the whole object should be added |
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.
[in] | geometry | the geometry cache to add |
[in] | matrix | the transformation to associate with this geometry |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |