Define an editor for a Graphics Display Kit transform
group GDxform_edit_notify_templ
{
float x_rot;
float y_rot;
float z_rot;
float x_trans;
float y_trans;
float z_trans;
float x_cent;
float y_cent;
float z_cent;
float scale;
};
GDxform_edit_notify_templ GDxform_edit_templ
{
int shell_vis;
int+Port absolute;
int reset;
GDxform_templ+IPort2 &xform;
method+notify_inst+notify_val upd_func = "GDxform_edit_update";
};
GDxform_edit
GDxform_edit_templ GDxform_edit;
These templates define an editor for the Graphics Display Kit transform. GDxform_edit_notify_templ and GDxform_edit_templ define the elements that cause the transform editor's method to execute. GDxform_edit is the version you instance.
As an alternative to using GDxform_edit and having to define your own user interface for the editor, you can use XformEditor, an application component. XformEditor contains GDxform_edit and defines a user interface.
The parameter controls whether the editor is active: 0 means it is not; 1 means it is.
shell_vis is only checked if the transform to which the editor is attached has changed. In this case, if shell_vis is not set to 1, the editor does not update. This inhibits updates to the editor's other subobjects -- which are normally attached to UI widgets -- when the user interface is not visible. The editor always executes when the values of the other parameters change. This means that the transform to which the editor is attached is always updated even if the user interface is not visible.
Typically you connect shell_vis to the same UIcmd object that the user selects to display the editor's user interface:
The transformation object controlled by the transformation editor. xform is a connection to an object that matches type GDxform_templ. xform can be connected directly to any object that has an xform parameter, such as an object, camera, or light.
The rotation angle, in degrees, along the X, Y, and Z axes.
The translate movement along the X, Y, and Z axes.
The center of rotation and scaling along the X, Y, and Z axes.
Whether the transformation is performed to an absolute position or relative to the current position: 0 means relative; 1 means absolute.
This parameter when set causes the transform attached to the editor to be reset to its default values.