#include <MGeometry.h>
This method is obsolete.
MGeometry stores the collection of MGeometryData arrays which describe a Maya surface, including per-component data such as UV mapping and colour.
Various methods are provided for returning MGeometryData containing the data for different properties of the geometry: the position() method returns position data, the normal() method returns normals, and so on.
The primitiveArray() method returns MGeometryPrimitive's which provide indexing into those property arrays for each primitive to be drawn.
Public Member Functions | |
~MGeometry () | |
Class destructor. | |
MGeometry (const MGeometry &geom) | |
Copy constructor. More... | |
MGeometry & | operator= (const MGeometry &rhs) |
Copy constructor. More... | |
unsigned int | primitiveArrayCount () const |
Get the number of primitive arrays for this surface. More... | |
const MGeometryPrimitive | primitiveArray (unsigned int arrayNumber) const |
Get the primitive indexing data for this surface. More... | |
const MGeometryData | position () |
Get the position data for this surface. More... | |
const MGeometryData | normal () |
Get the normal data for this surface. More... | |
const MGeometryData | componentId () |
Get the Maya component id data for this surface. More... | |
const MGeometryData | texCoord (const MString &name) |
Get a texture coordinate set by name. More... | |
const MGeometryData | color (const MString &name) |
Get a color set by name. More... | |
const MGeometryData | tangent (const MString &name) |
Get a tangent set by name. More... | |
const MGeometryData | binormal (const MString &name) |
Get a binormal set by name. More... | |
const MGeometryData | data (MGeometryData::DataType what, const MString &name) |
Get arbitrary surface data by name. More... | |
Friends | |
class | MGeometryManager |
class | MGeometryList |
class | MVaryingParameter |
unsigned int primitiveArrayCount | ( | ) | const |
Get the number of primitive arrays for this surface.
const MGeometryPrimitive primitiveArray | ( | unsigned int | arrayNumber | ) | const |
Get the primitive indexing data for this surface.
The surface geometry may consist of more than one MGeometryPrimitive, each representing an array of primitives. For example, if the surface was composed of both triangles and quads there might be one MGeometryPrimitive for the triangles and a second for the quads. The arrayNumber parameter is used to select between these.
Each MGeometryPrimitive contains indices which are used to map the MGeometryData returned by the other methods of this class onto the primitives. For example, if the returned MGeometryPrimitive is for an array of triangles it will contain three indices for each triangle. Those indices can be used to index into the position data returned by the position() method, the normal data returned by the normal() method, and so on.
[in] | arrayNumber | Number of the index data to retrieve. Must be in the range 0 to primitiveArrayCount() - 1. |
const MGeometryData position | ( | ) |
Get the position data for this surface.
const MGeometryData normal | ( | ) |
Get the normal data for this surface.
const MGeometryData componentId | ( | ) |
Get the Maya component id data for this surface.
This array allows you to correlate MGeometry entries with the corresponding component on the Maya surface (e.g. for meshes, this array will contains the vertex id).
const MGeometryData texCoord | ( | const MString & | name | ) |
Get a texture coordinate set by name.
[in] | name | the name of the set to return |
const MGeometryData color | ( | const MString & | name | ) |
Get a color set by name.
[in] | name | the name of the set to return |
const MGeometryData tangent | ( | const MString & | name | ) |
Get a tangent set by name.
[in] | name | the name of the uv set tangent data should be returned for |
const MGeometryData binormal | ( | const MString & | name | ) |
Get a binormal set by name.
[in] | name | the name of the uv set binormal data should be returned for |
const MGeometryData data | ( | MGeometryData::DataType | what, |
const MString & | name | ||
) |
Get arbitrary surface data by name.
[in] | what | the type of data requested |
[in] | name | the name of the data set requested |