MGeometryUtilities Class Reference

#include <MHWGeometryUtilities.h>

Class Description

Utilities for Viewport 2.0.

This class is a utility class for rendering geometry in Viewport 2.0

Public Types

enum  GeometricShape { kDefaultSphere = 0, kDefaultPlane, kDefaultCube }
 Default geometry shapes. More...
 

Static Public Member Functions

static MColor wireframeColor (const MDagPath &path)
 Returns the wireframe color used in Viewport 2.0 for the given DAG path. More...
 
static DisplayStatus displayStatus (const MDagPath &path, MStatus *returnStatus=NULL)
 Returns the display status of the given DAG path. More...
 
static MGeometryacquireReferenceGeometry (GeometricShape shape, const MGeometryRequirements &requirements)
 Acquire reference geometry with required buffers. More...
 
static void releaseReferenceGeometry (MGeometry *geometry)
 Release a generated reference geometry. More...
 
static const char * className ()
 Returns the name of this class. More...
 

Member Enumeration Documentation

Default geometry shapes.

Enumerator
kDefaultSphere 

Sphere with radius 1, centered at 0,0,0.

kDefaultPlane 

Plane with width and height of 1, centered at 0,0,0.

Assuming "Y-Up" orientation: width = x-axis, and height = y-axis.

kDefaultCube 

Cube with width, height and depth of 1, centered at 0,0,0.

Member Function Documentation

MHWRender::DisplayStatus displayStatus ( const MDagPath path,
MStatus returnStatus = NULL 
)
static

Returns the display status of the given DAG path.

Note that the last selected object will have status kLead instead of kActive and if only one object is selected the status will be kLead.

Parameters
[in]paththe DAG path to get.
[out]returnStatusStatus code.
Returns
Display status for the DAG
Status Codes:
+ Examples:
MGeometry * acquireReferenceGeometry ( GeometricShape  shape,
const MGeometryRequirements requirements 
)
static

Acquire reference geometry with required buffers.

The user is responsible for releasing the geometry when it is no longer needed, by calling MGeometryUtilities::releaseReferenceGeometry().

Parameters
[in]shapeThe shape of the requested geometry
[in]requirementsThe list of required index and vertex buffers
Returns
The generated geometry, NULL on failure.
+ Examples:
void releaseReferenceGeometry ( MGeometry geometry)
static

Release a generated reference geometry.

Parameters
[in]geometryThe geometry to delete
+ Examples:
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MHWGeometryUtilities.h
  • MHWGeometryUtilities.cpp