C++ API Reference
|
Selection state information used in MPxSurfaceShapeUI::select. More...
#include <MSelectInfo.h>
Public Member Functions | |
MSelectInfo () | |
Constructor. | |
MSelectInfo (const MSelectInfo &in) | |
Copy constructor. More... | |
~MSelectInfo () | |
Destructor. | |
M3dView | view () |
Returns the view that the current selection is taking place in. More... | |
bool | singleSelection () const |
This method determines if we want to select a single object. More... | |
bool | selectClosest () const |
Determines if we want to select the closest object. More... | |
bool | selectable (MSelectionMask &mask) const |
Given the selection mask, this method determines if the object is selectable. More... | |
bool | selectableComponent (bool displayed, MSelectionMask &mask) const |
Given the selection mask, this method determines if the component is selectable. More... | |
void | selectRect (unsigned int &x, unsigned int &y, unsigned int &width, unsigned int &height) const |
Get the current selection rectangle dimensions. More... | |
bool | isRay () const |
Is there a selection ray. More... | |
MMatrix | getAlignmentMatrix () const |
Returns the alignment matrix. More... | |
void | getLocalRay (MPoint &, MVector &) const |
Get the selection ray. More... | |
bool | selectForHilite (const MSelectionMask &) const |
Give the selection mask, can this object be selected for the hilite list. More... | |
bool | selectOnHilitedOnly () const |
This means that you can only select components if the object is hilited. More... | |
int | highestPriority () const |
Returns the highest selection priority value. More... | |
void | setHighestPriority (int) |
Sets the highest selection priority value. More... | |
void | addSelection (const MSelectionList &item, const MPoint &point, MSelectionList &list, MPointArray &points, const MSelectionMask &mask, bool isComponent) |
Adds components or objects to the active selection list. More... | |
bool | setSnapPoint (const MPoint &point) |
When a snapping operation is being performed the shape's overridden MPxSurfaceShapeUI::snap() method can call this method to set the point to be snapped to. More... | |
MDagPath | selectPath () const |
Returns a path to the item that is being selected. More... | |
Public Member Functions inherited from MDrawInfo | |
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... | |
Static Public Member Functions inherited from MDrawInfo | |
static const char * | className () |
Returns the name of this class. More... | |
Selection state information used in MPxSurfaceShapeUI::select.
MSelectInfo is used with user defined shape selection and is passed as an argument to the MPxSurfaceShapeUI::select method. This class encapsulates all the selection state information for selected objects.
MSelectInfo | ( | const MSelectInfo & | other | ) |
Copy constructor.
[in] | other | object to copy |
M3dView view | ( | ) |
Returns the view that the current selection is taking place in.
bool singleSelection | ( | ) | const |
This method determines if we want to select a single object.
bool selectClosest | ( | ) | const |
Determines if we want to select the closest object.
bool selectable | ( | MSelectionMask & | mask | ) | const |
Given the selection mask, this method determines if the object is selectable.
[in] | mask | selection mask |
bool selectableComponent | ( | bool | displayed, |
MSelectionMask & | mask | ||
) | const |
Given the selection mask, this method determines if the component is selectable.
[in] | displayed | is the component displayed |
[in] | mask | selection mask |
void selectRect | ( | unsigned int & | x, |
unsigned int & | y, | ||
unsigned int & | width, | ||
unsigned int & | height | ||
) | const |
Get the current selection rectangle dimensions.
[out] | x | Lower left corner of the selection rectangle (x coordinate). |
[out] | y | Lower left corner of the selection rectangle (y coordinate). |
[out] | width | Width of the selection rectangle. |
[out] | height | Height of the selection rectangle. |
bool isRay | ( | ) | const |
Is there a selection ray.
This method isused to find ray object intersection.
MMatrix getAlignmentMatrix | ( | ) | const |
Returns the alignment matrix.
This method is used to find ray object intersection.
Get the selection ray.
This method isused to find ray object intersection.
[out] | pnt | ray starting point |
[out] | vec | ray direction |
bool selectForHilite | ( | const MSelectionMask & | mask | ) | const |
Give the selection mask, can this object be selected for the hilite list.
[in] | mask | the mask to test |
bool selectOnHilitedOnly | ( | ) | const |
This means that you can only select components if the object is hilited.
int highestPriority | ( | ) | const |
Returns the highest selection priority value.
void setHighestPriority | ( | int | value | ) |
Sets the highest selection priority value.
[in] | value | the priority value |
void addSelection | ( | const MSelectionList & | item, |
const MPoint & | point, | ||
MSelectionList & | list, | ||
MPointArray & | points, | ||
const MSelectionMask & | mask, | ||
bool | isComponent | ||
) |
Adds components or objects to the active selection list.
For an example of how this is used please refer to the method definition apiMeshShapeUI::select() in the devkit example code apiMeshShape.cpp.
[in] | item | The component or object to add to the list |
[in] | point | The world space point representing the selected object. This is used during single-click selection when the click overlaps multiple objects in order to determine which point is closest to the camera. |
[out] | list | The selection list to add the item(s) to |
[out] | points | A copy of the points of all currently selected components in the list (if components are selected) |
[in] | mask | Mask used to determine selection priority |
[in] | isComponent | Indicates whether item to be added is an object or a component |
bool setSnapPoint | ( | const MPoint & | point | ) |
When a snapping operation is being performed the shape's overridden MPxSurfaceShapeUI::snap() method can call this method to set the point to be snapped to.
If setSnapPoint() is called multiple times then the point passed in which is nearest to the current cursor location will be used. So the shape can either compute the snap point itself and call setSnapPoint() once or it can make a series of calls and let setSnapPoint() determine the closest of those for itself.
[in] | point | The point to be snapped to |
MDagPath selectPath | ( | ) | const |
Returns a path to the item that is being selected.
|
static |
Returns the name of this class.