This reference page is linked to from the following overview topics: Parent class descriptions.
Base class for user defined locators.
MPxLocatorNode allows the creation of user-defined locators. A locator is a DAG shaped that is drawn on the screen, but that has is not rendered. Locators are full dependency nodes and can have attributes and a compute method.
To create a locator, derive off of this class and override the draw method. The draw method can be overridden to draw custom geometry using standard OpenGL calls. The other methods of the parent class MPxNode may also be overridden to perform dependency node capabilities as well.
curvedArrowsNode.cpp, cvColorNode.cpp, footPrintManip.cpp, footPrintNode.cpp, and swissArmyManip.cpp.
#include <MPxLocatorNode.h>
Public Member Functions |
|
MPxLocatorNode () | |
Constructor |
|
virtual | ~MPxLocatorNode () |
Destructor |
|
virtual MPxNode::Type | type () const |
This method returns the type of the node.
|
|
virtual void | draw (M3dView &view, const MDagPath &path, M3dView::DisplayStyle style, M3dView::DisplayStatus) |
Overriding this method allows the drawing of
custom geometry using standard OpenGL calls. |
|
virtual bool | isBounded () const |
This method should be overridden to return
true if the user supplies a bounding box routine. |
|
virtual MBoundingBox | boundingBox () const |
This method should be overridden to return a
bounding box for the locator. |
|
unsigned int | color (M3dView::DisplayStatus displayStatus) |
This method returns the index of the color
that is the default draw color for the given display status.
|
|
MColor | colorRGB (M3dView::DisplayStatus displayStatus) |
This method returns the RGB values of the
default draw color for the given display status. |
|
virtual bool | excludeAsLocator () const |
When the modelPanel is set to not draw
locators, returing true will also not draw the custom locator.
|
|
virtual bool | isTransparent () const |
Indicates that this locator uses
transparency during ::draw method calls. |
|
virtual bool | drawLast () const |
Indicates that this locator should be the
last item draw in a given refresh cycle. |
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
|
Static Public Attributes |
|
static MObject | underWorldObject |
under world attribute |
|
static MObject | localPosition |
local position attribute |
|
static MObject | localPositionX |
X component of localPosition. |
|
static MObject | localPositionY |
Y component of localPosition. |
|
static MObject | localPositionZ |
Z component of localPosition. |
|
static MObject | worldPosition |
world position attribute |
|
static MObject | worldPositionX |
X component of worldPosition. |
|
static MObject | worldPositionY |
Y component of worldPosition. |
|
static MObject | worldPositionZ |
Z component of worldPosition. |
|
static MObject | localScale |
local scale attribute |
|
static MObject | localScaleX |
X component of localScale. |
|
static MObject | localScaleY |
Y component of localScale. |
|
static MObject | localScaleZ |
Z component of localScale. |
|
static MObject | nodeBoundingBox |
bounding box attribute |
|
static MObject | nodeBoundingBoxMin |
bounding box minimum point |
|
static MObject | nodeBoundingBoxMinX |
X component of boundingBoxMin. |
|
static MObject | nodeBoundingBoxMinY |
Y component of boundingBoxMin. |
|
static MObject | nodeBoundingBoxMinZ |
Z component of boundingBoxMin. |
|
static MObject | nodeBoundingBoxMax |
bounding box maximum point |
|
static MObject | nodeBoundingBoxMaxX |
X component of boundingBoxMax. |
|
static MObject | nodeBoundingBoxMaxY |
Y component of boundingBoxMax. |
|
static MObject | nodeBoundingBoxMaxZ |
Z component of boundingBoxMax. |
|
static MObject | nodeBoundingBoxSize |
bounding box size vector |
|
static MObject | nodeBoundingBoxSizeX |
X component of boundingBoxSize. |
|
static MObject | nodeBoundingBoxSizeY |
Y component of boundingBoxSize. |
|
static MObject | nodeBoundingBoxSizeZ |
Z component of boundingBoxSize. |
|
static MObject | center |
object center attribute |
|
static MObject | boundingBoxCenterX |
X component of boundingBoxCenter. |
|
static MObject | boundingBoxCenterY |
Y component of boundingBoxCenter. |
|
static MObject | boundingBoxCenterZ |
Z component of boundingBoxCenter. |
|
static MObject | matrix |
matrix attribute |
|
static MObject | inverseMatrix |
inverse matrix attribute |
|
static MObject | worldMatrix |
world matrix attribute |
|
static MObject | worldInverseMatrix |
inverse world matrix attribute |
|
static MObject | parentMatrix |
parent matrix attribute |
|
static MObject | parentInverseMatrix |
inverse parent matrix attribute |
|
static MObject | visibility |
visibility attribute |
|
static MObject | intermediateObject |
intermediate object attribute |
|
static MObject | isTemplated |
template attribute |
|
static MObject | instObjGroups |
instances object group info attribute |
|
static MObject | objectGroups |
object groups attributes |
|
static MObject | objectGrpCompList |
component in object groups attribute |
|
static MObject | objectGroupId |
group id attribute |
|
static MObject | objectGroupColor |
group id attribute |
|
static MObject | useObjectColor |
controls choice of wireframe dormant object
color |
|
static MObject | objectColor |
the per object dormant wireframe color |
MPxLocatorNode | ( | ) |
Constructor
Class constructor.
~MPxLocatorNode | ( | ) | [virtual] |
Destructor
Class destructor.
MPxNode::Type type | ( | ) | const [virtual] |
This method returns the type of the node.
This method should not be overridden by the user. It will return MPxNode::kLocatorNode.
Reimplemented from MPxNode.
void draw | ( | M3dView & | view, |
const MDagPath & | path, | ||
M3dView::DisplayStyle | style, | ||
M3dView::DisplayStatus | status | ||
) | [virtual] |
Overriding this method allows the drawing of custom geometry using standard OpenGL calls.
The OpenGL state should be left in the same state that it was in previously. The OpenGL routine glPushAttrib may be used to make this easier.
When this routine is called, the following conditions may be assumed:
As a convenience, this draw method will also be used by OpenGL's selection mechanism to determine whether this object gets selected by a particular mouse event. The user does not need to write a separate selection routine.
[in] | view | 3D view that is being drawn into |
[in] | path | to this locator in the DAG |
[in] | style | style to draw object in |
[in] | status | selection status of object |
bool isBounded | ( | ) | const [virtual] |
This method should be overridden to return true if the user supplies a bounding box routine.
Supplying a bounding box routine makes refresh and selection more efficient.
MBoundingBox boundingBox | ( | ) | const [virtual] |
This method should be overridden to return a bounding box for the locator.
If this method is overridden, then MPxLocatorNode::isBounded should also be overridden to return true.
unsigned int color | ( | M3dView::DisplayStatus | displayStatus | ) |
This method returns the index of the color that is the default draw color for the given display status.
The index should be used with the methods of M3dView. The value is not an index into the OpenGL color table.
The index that is returned will be into the active, dormant, or template color tables depending on the display status passed in.
[in] | displayStatus | display status |
MColor colorRGB | ( | M3dView::DisplayStatus | displayStatus | ) |
This method returns the RGB values of the default draw color for the given display status.
[in] | displayStatus | display status |
bool excludeAsLocator | ( | ) | const [virtual] |
When the modelPanel is set to not draw locators, returing true will also not draw the custom locator.
If false is returned, the custom locator will also be drawn.
The default return value is true.
bool isTransparent | ( | ) | const [virtual] |
Indicates that this locator uses transparency during ::draw method calls.
Objects with transparency must be drawn in a special queue, i.e. after all opaque objects are drawn.
The default return value is false.
bool drawLast | ( | ) | const [virtual] |
Indicates that this locator should be the last item draw in a given refresh cycle.
Objects drawn out-of-order will not preserve the proper transparency sorting. Conflicts among multiple objects with the drawLast indicator set to TRUE will be resolved by their order in the Outliner, where they will be drawn top-to-bottom.
The default return value is false.
const char * className | ( | ) | [static] |