Clipboard
Current Interactor. Interactors are responsible for processing user input for interactive tools, such as transformation tools, creation tools etc. For example a sphere interactor reads mouse input to define center and radius for the sphere to be created.
Interactors are typically created by tool button objects, macros, and other user interface objects. Layer defines
Interactors can be stacked and executed one ofter the other on first in last out principle. The layer class defines various methods for creating and manipulating interactors.
![]() |
Note |
|---|---|
Interactors specific methods are typically called via macro system so that the user can record tool activations to his/her macros. |
The following code demonstrates a tool button code for creating an interactor when the user clicks the button:
if (layer) {
R3OBJ *interactor = R3MAC_SNDMSGA(app, "R3CurrentLayer", layer, R3LAYM_NEWINTERACTOR,
R3CLID_IASPHERE2, R3MCTP_INT);
// more than one tool button can use a single interactor
// setting identifier attribute allows tools to know which
// one of the interactors was the one they created
if(interactor)
R3MAC_SETATTR(app, "R3CurrentInteractor", interactor,
R3IAA_Identifier, R3CLID_SPHERETOOL2, R3MCTP_INT);
}