OneClickCreateCallBack.h

OneClickCreateCallBack.h
+ Related help topics:

Module description

Functions

static PFExport OneClickCreateCallBackInstance ()
 
static PFExport void DeleteThis ()
 
PFExport int proc (ViewExp *vpt, int msg, int point, int flags, IPoint2 m, Matrix3 &mat)
 

Function Documentation

PFExport static OneClickCreateCallBack * Instance ( )
static
PFExport static void DeleteThis ( )
static
PFExport int proc ( ViewExp vpt,
int  msg,
int  point,
int  flags,
IPoint2  m,
Matrix3 mat 
)
virtual
Remarks
This is the method where the developer defines the user / mouse interaction that takes place during the creation phase of an object.
Parameters:
ViewExp *vpt

The viewport the creation process is taking place in.

int msg

This message describes the type of event that occurred. See 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 Mouse Call Back 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.

Implements CreateMouseCallBack.