Class PickObjectProc
See Also: Class IMtlParams, Class INode.
class PickObjectProc
Description:
This class is available in release 2.0 and later only.
This is the callback object passed to IMtlParams::SetPickMode(). It gets set so the user can pick objects in the scene. Its methods allow for filtering the picks, changing cursors over valid hits, and allowing multiple picks.
All methods of this class are implemented by the plug-in.
Methods:
Prototype:
virtual BOOL Pick(INode *node)=0;
Remarks:
This method is called when the user picks something.
Parameters:
INode *node
This is the node that was selected.
Return Value:
Return TRUE to end the pick mode; FALSE to ignore the pick and to continue to allow the user to pick.
Prototype:
virtual BOOL Filter(INode *node)=0;
Remarks:
This method is called to allow the callback to filter hits. It should return TRUE if this is an acceptable hit; FALSE otherwise.
Parameters:
INode *node
This is the node that was selected.
Prototype:
virtual void EnterMode();
Remarks:
This method is called when the pick mode has been entered. The developer may provide any pre-processing here.
Default Implementation:
{}
Prototype:
virtual void ExitMode();
Remarks:
This method is called when the pick mode has been exited. The developer may provide any post-processing here.
Default Implementation:
{}
Prototype:
virtual HCURSOR GetDefCursor();
Remarks:
This method is called to get the default (non-hit) cursor to use.
Return Value:
The handle of the non-pickable object cursor or NULL if the default cursor should be used.
Default Implementation:
{return NULL;}
Prototype:
virtual HCURSOR GetHitCursor();
Remarks:
This method is called to get the pickable object cursor to use.
Return Value:
The handle of the pickable object cursor or NULL if the default cursor should be used.
Default Implementation:
{return NULL;}
Prototype:
virtual BOOL AllowMultiSelect();
Remarks:
This method determines if multiple objects can be picked. Returning TRUE allows the user to pick more than one thing. In this case the Pick() method may be called more than once.
Default Implementation:
{return FALSE;}