MDrawInfo Class Reference
[OpenMayaUI - API module for user interface]

#include <MDrawInfo.h>

Inheritance diagram for MDrawInfo:

Inheritance graph
[legend]

List of all members.


Detailed Description

Drawing state used in the draw methods of MPxSurfaceShapeUI.

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.

Examples:

apiMeshShapeUI.cpp, apiMeshShapeUI.h, apiSimpleShapeUI.cpp, apiSimpleShapeUI.h, and quadricShape.cpp.


Public Member Functions

 MDrawInfo ()
 MDrawInfo (const MDrawInfo &in)
virtual ~MDrawInfo ()
MDrawRequest getPrototype (const MPxSurfaceShapeUI &drawHandler) const
M3dView view () const
const MDagPath multiPath () const
const MMatrix projectionMatrix () const
const MMatrix inclusiveMatrix () const
M3dView::DisplayStyle displayStyle () const
M3dView::DisplayStatus displayStatus () const
bool objectDisplayStatus (M3dView::DisplayObjects) const
bool inSelect () const
bool inUserInteraction () const
bool userChangingViewContext () const
bool completelyInside () const
bool canDrawComponent (bool isDisplayOn, const MSelectionMask &compMask) const

Constructor & Destructor Documentation

MDrawInfo::MDrawInfo (  ) 

Constructor.

MDrawInfo::MDrawInfo ( const MDrawInfo other  ) 

Copy constructor.

Parameters:
[in] other draw info object to copy

MDrawInfo::~MDrawInfo (  )  [virtual]

Destructor.


Member Function Documentation

MDrawRequest MDrawInfo::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] drawHandler the ui object that is doing the drawing
Returns:
A draw request
Examples:

M3dView MDrawInfo::view (  )  const

Returns the view that the drawing will take place.

Returns:
The view
Examples:

const MDagPath MDrawInfo::multiPath (  )  const

Returns the path to the object to be drawn.

Returns:
The path to the object to be drawn
Examples:

const MMatrix MDrawInfo::projectionMatrix (  )  const

Returns the camera*projection matrix.

Returns:
The camera projection matrix

const MMatrix MDrawInfo::inclusiveMatrix (  )  const

Returns the world space inclusive matrix.

Returns:
World space inclusive matrix

M3dView::DisplayStyle MDrawInfo::displayStyle (  )  const

The display appearance.

Returns:
The display appearance.
Examples:

M3dView::DisplayStatus MDrawInfo::displayStatus (  )  const

Returns the status of the object to draw.

Returns:
Object display status
Examples:

bool MDrawInfo::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.
Examples:

bool MDrawInfo::inSelect (  )  const

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

Returns:
  • true in select
  • false in draw

bool MDrawInfo::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
Examples:

bool MDrawInfo::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
Examples:

bool MDrawInfo::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 MDrawInfo::canDrawComponent ( bool  isDisplayOn,
const MSelectionMask mask 
) const

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

Parameters:
[in] isDisplayOn component display is on
[in] mask component mask to test
Returns:
  • true the specified component can be drawn
  • false the specified component cannot be drawn


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6