GDxform_edit


Synopsis

Define an editor for a Graphics Display Kit transform

GDxform_edit_notify_templ


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_templ


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;

Description

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.

Input Ports

shell_vis

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:

shell_vis => UICmd.do;

xform

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.

Parameters

x_rot
y_rot
z_rot

The rotation angle, in degrees, along the X, Y, and Z axes.

x_trans
y_trans
z_trans

The translate movement along the X, Y, and Z axes.

x_cent
y_cent
z_cent

The center of rotation and scaling along the X, Y, and Z axes.

scale

The scaling factor.

absolute

Whether the transformation is performed to an absolute position or relative to the current position: 0 means relative; 1 means absolute.

reset

This parameter when set causes the transform attached to the editor to be reset to its default values.

Example

Libraries.Graphics_Display.Editors.UI_Editors.XformEditor

File

v/gd.v

See also

For more information, see: