Detailed Description
- See also:
- Class BaseObject
(method GetCreateMouseCallBack()), Class ViewExp, Class Matrix3, Class IPoint2.
- Description:
- This is the callback object for handling the creation process
of a plug-in object.
#include <maxapi.h>
List of all
members.
Constructor & Destructor Documentation
Member Function Documentation
virtual int proc |
( |
ViewExp * |
vpt, |
|
|
int |
msg, |
|
|
int |
point, |
|
|
int |
flags, |
|
|
IPoint2 |
m, |
|
|
Matrix3 & |
mat |
|
) |
|
[pure virtual] |
- Parameters:
- ViewExp
*vpt
The viewport the creation process is taking place in.
int msg
This message describes the type of event that occurred. See
List of Mouse
Callback Messages.
int point
The point number. this is 0 for the first click, 1 for the second,
etc.
int flags
These flags describe the state of the mouse button and keyboard
Shift/Ctrl/Alt keys. See List of Mouse
Callback Flags.
IPoint2 m
The 2D screen point that the user clicked on. Methods in the
viewport interface allow this point to be converted into a world
space ray or a 3D view space point. A world space ray can be
intersected with the active construction plane which results in a
point on the active construction plane. See Class ViewExp.
Matrix3&
mat
This represents the transformation of the object relative to the
construction plane. Typically the plug-in would get a point on the
construction plane based on the screen point that the user clicked
on and set the translation component of this matrix based on that
point.
- Returns:
- Return one of the following value to indicate the state of the
creation process:
CREATE_CONTINUE
The creation process should continue. In this case the mouse is
captured.
CREATE_STOP
The creation process has terminated normally. In this case the
mouse is no longer captured and input is then allowed again from
any viewport.
CREATE_ABORT
The creation process has been aborted. The system will delete the
created object and node.
- Note:
- The Interface::StopCreating()
method should not be called from a create call-back procedure, but
instead the proper code should be returned to end the plugin
creation process.
Implemented in
OneClickCreateCallBack.
virtual int override |
( |
int |
mode |
) |
[inline, virtual] |
- Parameters:
- int mode
The current drag mode. See below.
- Returns:
- One of the following drag modes should be returned:
CLICK_MODE_DEFAULT
Returned to indicate the use of the system mouse mode.
CLICK_DRAG_CLICK
This is the default behavior as described above.
CLICK_MOVE_CLICK
In this mode, the first point is entered by clicking the mouse
button down and then letting it up. This generates point 0. In
other words, a MOUSE_POINT message is only generated after
the user has pressed and released the mouse button.
CLICK_DOWN_POINT
In this mode, point messages are sent on mouse-down only.
- Default Implementation:
- { return mode; }
- Sample Code:
- A sample program that uses the override method is
/MAXSDK/SAMPLES/OBJECTS/SPLINE.CPP.It uses
CLICK_DOWN_POINT.
virtual BOOL StartNewCreation |
( |
|
) |
[inline, virtual] |
- Returns:
- TRUE if the mouse proc is ready to start a new object;
otherwise FALSE.
- Default Implementation:
- { return TRUE; }
virtual BOOL TolerateOrthoMode |
( |
|
) |
[inline, virtual] |
- Returns:
- TRUE if ortho mode is okay; otherwise FALSE.
- Default Implementation:
- { return FALSE; }
CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack CreateMouseCallBack
CreateMouseCallBack CreateMouseCallBack