Public Member Functions

PickModeCallback Class Reference

This reference page is linked to from the following overview topics: Parameter UI Control Types.


Search for all occurrences

Detailed Description

See also:
Class IObjParam, Class ViewExp, Class Interface, Class IPoint2.

Description:
This class is the callback object passed to Interface::SetPickMode().

#include <maxapi.h>

Inheritance diagram for PickModeCallback:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual BOOL  HitTest (IObjParam *ip, HWND hWnd, ViewExp *vpt, IPoint2 m, int flags)=0
virtual BOOL  Pick (IObjParam *ip, ViewExp *vpt)=0
virtual BOOL  PickAnimatable (Animatable *anim)
virtual BOOL  RightClick (IObjParam *ip, ViewExp *vpt)
virtual void  EnterMode (IObjParam *ip)
virtual void  ExitMode (IObjParam *ip)
virtual HCURSOR  GetDefCursor (IObjParam *ip)
virtual HCURSOR  GetHitCursor (IObjParam *ip)
virtual PickNodeCallback GetFilter ()
virtual BOOL  AllowMultiSelect ()

Member Function Documentation

virtual BOOL HitTest ( IObjParam ip,
HWND  hWnd,
ViewExp vpt,
IPoint2  m,
int  flags 
) [pure virtual]
Remarks:
This method is called whenever the pick mode needs to hit test.
Parameters:
IObjParam *ip

An interface pointer available to call functions defined by 3ds Max.

HWND hWnd

The window handle.

ViewExp *vpt

An interface pointer that may be used to call methods associated with the viewports.

IPoint2 m

Point to check in screen coordinates.

int flags

Scene and Node Hit Testing Flags.
Returns:
Return TRUE if something was hit; otherwise FALSE.
Sample Code:
// This implementation use the Interface::PickNode method

// to perform the hit test.

        {
            return ip->PickNode(hWnd,m,&thePickFilt)? TRUE:FALSE;
        }

Implemented in POPickPatchAttach, SSPickSplineAttach, and PickerControlMode.

virtual BOOL Pick ( IObjParam ip,
ViewExp vpt 
) [pure virtual]
Remarks:
This method is called when the user picks something.
Parameters:
IObjParam *ip

An interface pointer available to call functions defined by 3ds Max.

ViewExp *vpt

An interface pointer that may be used to call methods associated with the viewports. The vpt should have the result of the hit test in it.
Returns:
Return TRUE to end the pick mode; FALSE to stay in the pick mode. Note that returning TRUE will set the command mode to MOVE. When a plug-in is in the create branch, setting the command mode to move ends the creation process.

Implemented in POPickPatchAttach, SSPickSplineAttach, and PickerControlMode.

virtual BOOL PickAnimatable ( Animatable anim ) [inline, virtual]
Remarks:
This method gets called when a node or controller is picked from Trackview or Schematic view The track will not be selected in trackview if the this function returns FALSE. Override this function if you wish to support and receive nodes or controllers picked from trackview.
Parameters:
Animatable* anim

A pointer to the animatable object.
Returns:
TRUE if the Pick Mode callback accepts the animatable object, otherwise FALSE.
Default Implementation:
{ return TRUE; }
{ return TRUE; }
virtual BOOL RightClick ( IObjParam ip,
ViewExp vpt 
) [inline, virtual]
Remarks:
This method is called when the user right-clicks or presses ESC.
Parameters:
IObjParam *ip

An interface pointer available to call functions defined by 3ds Max.

ViewExp *vpt

An interface pointer that may be used to call methods associated with the viewports. The vpt should have the result of the hit test in it.
Returns:
TRUE to end the pick mode, FALSE to continue picking.
Default Implementation:
{ return FALSE; }

Reimplemented in POPickPatchAttach, SSPickSplineAttach, and PickerControlMode.

{ return FALSE; }
virtual void EnterMode ( IObjParam ip ) [inline, virtual]
Remarks:
Called when the mode is entered. The developer may provide any pre-processing here.
Parameters:
IObjParam *ip

An interface pointer available to call functions defined by 3ds Max.

Reimplemented in POPickPatchAttach, SSPickSplineAttach, and PickerControlMode.

{}
virtual void ExitMode ( IObjParam ip ) [inline, virtual]
Remarks:
Called when the mode is exited. The developer may provide any post-processing here.
Parameters:
IObjParam *ip

An interface pointer available to call functions defined by 3ds Max.

Reimplemented in POPickPatchAttach, SSPickSplineAttach, and PickerControlMode.

{}
virtual HCURSOR GetDefCursor ( IObjParam ip ) [inline, virtual]
Remarks:
Called to get the default cursor to use.
Returns:
The handle of the default cursor.
Default Implementation:
{return NULL;}
{return NULL;}
virtual HCURSOR GetHitCursor ( IObjParam ip ) [inline, virtual]
Remarks:
Called to get the hit test cursor to use.
Returns:
The handle of the hit test cursor.
Default Implementation:
{return NULL;}

Reimplemented in POPickPatchAttach, and SSPickSplineAttach.

{return NULL;}
virtual PickNodeCallback* GetFilter ( ) [inline, virtual]
Remarks:
This method is called if the user hits the H key while in your pick mode. You can provide a filter to filter the name list. See Class PickNodeCallback.
Returns:
A pointer to an instance of PickNodeCallback.
Default Implementation:
{return NULL;}

Reimplemented in POPickPatchAttach, SSPickSplineAttach, and PickerControlMode.

{return NULL;}
virtual BOOL AllowMultiSelect ( ) [inline, virtual]
Remarks:
Implement this method to return TRUE to allow the user to pick more than one thing. In that case the Pick() method may be called more than once.
Returns:
TRUE to allow multiple picks; otherwise FALSE.
Default Implementation:
{return FALSE;}
{return FALSE;}

PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback
PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback PickModeCallback