Class ArcballCallback

3DS Max Plug-In SDK

Class ArcballCallback

See Also: Class ArcballDialog, Class Quat.

class ArcballCallback

Description:

This class is available in release 2.0 and later only.

This class provides methods to work with a general arcball dialog box for doing 3D rotations. This dialog appears below:

image\dlgarcr.gif

To use these APIs you'll need to #include "arcdlg.h"

All methods of this class are implemented by the plug-in.

Sample code can be found in \MAXSDK\SAMLES\HOWTO\CUSTCTRL\CUSTCTRL.CPP.

Function:

ArcballDialog *CreateArcballDialog(ArcballCallback *cb, HWND hwndOwner, TCHAR* title=NULL);

Remarks:

This global function is provided by 3ds max and is used to create the arcball dialog box. Then the methods of your callback class are called based on the user's use of the dialog. Be sure to call the ArcballDialog::DeleteThis() method when done.

Parameters:

ArcballCallback *cb

The callback whose methods are called based on the user's interaction with the dialog controls.

HWND hwndOwner

The window handle of the dialog owner.

TCHAR* title=NULL

The title string to be displayed in the dialog.

Return Value:

A new instance of the ArcballDialog class. Be sure to call its DeleteThis() method when done.

Methods:

Prototype:

virtual void StartDrag()=0;

Remarks:

This method is called when a drag operation begins. The developer may want to save the start state at this point.

Prototype:

virtual void EndDrag()=0;

Remarks:

This method is called when a drag operation ends.

Prototype:

virtual void Drag(Quat q, BOOL buttonUp)=0;

Remarks:

This method is called during a drag operation.

Parameters:

Quat q

The relative rotation from the start rotation.

BOOL buttonUp

If TRUE this indicates if the mouse button is up (has been released); if FALSE the button is down.

Prototype:

virtual void CancelDrag()=0;

Remarks:

This method is called when the right mouse button is clicked during a drag operation to cancel it.

Prototype:

virtual void BeingDestroyed()=0;

Remarks:

This method is called if the dialog box window was closed. Note that developers should not call ArcballDialog::DeleteThis() from inside this method.