C++ API Reference

This class is used by the getDrawRequests method of MPxSurfaceShapeUI to specify the current object drawing state for a user defined shape. More...

#include <MDrawInfo.h>

+ Inheritance diagram for MDrawInfo:

Public Member Functions

 MDrawInfo ()
 Constructor.
 
 MDrawInfo (const MDrawInfo &in)
 Copy constructor. More...
 
virtual ~MDrawInfo ()
 Destructor.
 
MDrawRequest getPrototype (const MPxSurfaceShapeUI &drawHandler) const
 This method creates a draw request based on the current draw state. More...
 
M3dView view () const
 Returns the view that the drawing will take place. More...
 
const MDagPath multiPath () const
 Returns the path to the object to be drawn. More...
 
void setMultiPath (const MDagPath &)
 Sets the path of the object to be drawn.
 
const MMatrix projectionMatrix () const
 Returns the camera*projection matrix. More...
 
const MMatrix inclusiveMatrix () const
 Returns the world space inclusive matrix. More...
 
M3dView::DisplayStyle displayStyle () const
 The display appearance. More...
 
M3dView::DisplayStatus displayStatus () const
 Returns the status of the object to draw. More...
 
bool objectDisplayStatus (M3dView::DisplayObjects) const
 Determines whether the specified objects are allowed to be displayed. More...
 
bool pluginObjectDisplayStatus (const MString &pluginDisplayFilter) const
 Determines whether the specified plugin object is allowed to be displayed. More...
 
bool inSelect () const
 Returns true if this is called from within the select method of MPxSurfaceShapeUI. More...
 
bool inUserInteraction () const
 Returns true during any interactive refresh, as when user is interacting with the scene in any way including camera changes, object or component TRS changes, etc. More...
 
bool userChangingViewContext () const
 Returns true during any interactive refresh, as when user is changing the view using view context tools such as tumble, dolly or track. More...
 
bool completelyInside () const
 Returns true if the object being drawn is inside the viewing frustum. More...
 
bool canDrawComponent (bool isDisplayOn, const MSelectionMask &compMask) const
 Convenience method to test if components specified by the given mask can be drawn. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Detailed Description

This class is used by the getDrawRequests method of MPxSurfaceShapeUI to specify the current object drawing state for a user defined shape.

This getPrototype method is used to construct a draw request object based on the current draw state for the object.

See MDrawRequest for more information.

This method is obsolete. [from before Maya 2016]

Deprecated:
Use MHWRender::MRenderItem and MHWRender::MPxGeometryOverride instead for Viewport 2.0 support.
Examples:
gpuCache/gpuCacheShapeNode.cpp, and gpuCache/gpuCacheShapeNode.h.

Constructor & Destructor Documentation

MDrawInfo ( const MDrawInfo other)

Copy constructor.

Parameters
[in]otherdraw info object to copy

Member Function Documentation

MDrawRequest getPrototype ( const MPxSurfaceShapeUI drawHandler) const

This method creates a draw request based on the current draw state.

The draw request is placed onto maya's drawing queue (MDrawRequestQueue) where it can be processed in turn. The drawHandler argument is the shape that will be doing the drawing which is the object calling this function.

See MDrawRequest for more information.

Parameters
[in]drawHandlerthe ui object that is doing the drawing
Returns
A draw request
Examples:
gpuCache/gpuCacheShapeNode.cpp.
M3dView view ( ) const

Returns the view that the drawing will take place.

Returns
The view
Examples:
gpuCache/gpuCacheShapeNode.cpp.
const MDagPath multiPath ( ) const

Returns the path to the object to be drawn.

Returns
The path to the object to be drawn
Examples:
gpuCache/gpuCacheShapeNode.cpp.
const MMatrix projectionMatrix ( ) const

Returns the camera*projection matrix.

Returns
The camera projection matrix
const MMatrix inclusiveMatrix ( ) const

Returns the world space inclusive matrix.

Returns
World space inclusive matrix
M3dView::DisplayStyle displayStyle ( ) const

The display appearance.

Returns
The display appearance.
Examples:
gpuCache/gpuCacheShapeNode.cpp.
M3dView::DisplayStatus displayStatus ( ) const

Returns the status of the object to draw.

Returns
Object display status
Examples:
gpuCache/gpuCacheShapeNode.cpp.
bool objectDisplayStatus ( M3dView::DisplayObjects  displayObj) const

Determines whether the specified objects are allowed to be displayed.

Returns
  • true All of the objects in the displayObj mask can be displayed.
  • false One or more objects in the displayObj mask is excluded from display.
bool pluginObjectDisplayStatus ( const MString pluginDisplayFilter) const

Determines whether the specified plugin object is allowed to be displayed.

Parameters
[in]pluginDisplayFilterThe name of the plugin display filter which is registered by pluginDisplayFilter command.
Returns
  • true The specified object can be displayed.
  • false The specified object is excluded from display.
Examples:
gpuCache/gpuCacheShapeNode.cpp.
bool inSelect ( ) const

Returns true if this is called from within the select method of MPxSurfaceShapeUI.

Returns
  • true in select
  • false in draw
bool inUserInteraction ( ) const

Returns true during any interactive refresh, as when user is interacting with the scene in any way including camera changes, object or component TRS changes, etc.

Use userChangingViewContext for determining whether user is changing the view using view context tools such as tumble, dolly or track.

Returns
  • true draw is called because user is interacting with scene
  • false draw is for another reason; user is not interacting
bool userChangingViewContext ( ) const

Returns true during any interactive refresh, as when user is changing the view using view context tools such as tumble, dolly or track.

Useful for changing drawing mode to something simpler to speed up interaction re-draw. Use inUserInteraction for determining whether user is interacting with the scene in any way.

Returns
  • true draw is called because user is changing the view using view context tools such as tumble, dolly or track
  • false draw is for another reason
bool completelyInside ( ) const

Returns true if the object being drawn is inside the viewing frustum.

Returns
  • true object inside frustum
  • false object not completely inside frustum
bool canDrawComponent ( bool  isDisplayOn,
const MSelectionMask mask 
) const

Convenience method to test if components specified by the given mask can be drawn.

Parameters
[in]isDisplayOncomponent display is on
[in]maskcomponent mask to test
Returns
  • true the specified component can be drawn
  • false the specified component cannot be drawn
const char * className ( )
static

Returns the name of this class.

Returns
Name of this class.

The documentation for this class was generated from the following files: