define an editor for a Graphics Display Kit view
group GDview_edit_notify_templ
{
enum renderer { choices = {"Software", "OpenGL", "XGL", "PEX", "XIL",
"Print", "VRML"}; }:
int accel;
enum buffer { choices = {"Single", "Double (MBX)", "Double (Pixmap)"};
};
int timer;
enum mode { choices = {"Manual", "Automatic"}: };
int pcache;
int refresh;
float red;
float green;
float blue;
int output_enabled;
enum aspect { choices = {"Biggest", "Smallest"}; };
int stereo;
int video;
float stereo_distance;
float stereo_angle;
int video_off;
};
GDview_edit_notify_templ GDview_edit_templ
{
int shell_vis;
int reset;
GDview_templ+IPort2 *view;
method+notify_inst+notify_val upd_func = "GDview_edit_update";
};
GDview_edit_templ GDview_edit;
These templates define an editor for the Graphics Display Kit view. GDview_edit_notify_templ and GDview_edit_templ define the elements that cause the view editor's method to execute. GDview_edit is the version you instance.
As an alternative to using GDview_edit and having to define your own user interface for the editor, you can use ViewEditor, an application component. ViewEditor contains GDview_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 view 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 view 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 view controlled by the editor. view is a connection to an object that matches type GDview_templ.
This parameter controls the type of renderer. Note that the print renderer (that is, GD_PRT_RENDERER) is not meant to be used interactively but instead with the PrintViewer.
|
|
|
This parameter controls whether view rendering is accelerated. If the view is accelerated, objects that are set as static (see the type parameter in and ) are rendered in a separate pass and the image and Z-buffer information for that pass are saved. As long as the static objects in the view do not change, the saved buffers can be restored to start the rendering process. Only the dynamic objects are then rendered. Accelerate mode is useful for moving simple objects around a complex scene. For example, probing a complex geometry or moving some symbols around a complex map.
|
|
|
This parameter controls whether objects in the view are rendered using single buffering (that is, drawn directly to the screen) or double buffering (that is, drawn first off-screen, then copied to the screen).
|
|
|
The two different double buffer modes are only valid for the software renderer. The hardware renderers -- OpenGL, XGL and PEX -- treat the value as a double buffer disabled/enabled flag.
In the software renderer, 2D cameras can be rendered using any buffer mode. However, 3D cameras are inherently double-buffered since the objects in them are rendered to an offscreen frame buffer and then converted and copied to the screen.
This parameter controls if frames per second is printed out in the terminal window where you started AVS/Express on completion of a track roll sequence: 0 disables the timer; 1 enables the timer. This is useful in timing the performance of various graphics adapters.
The parameter controls the view's update mode:
|
|
|
Update the view only when the view's refresh parameter has been set | ||
This parameter is only applicable when using the XGL renderer on SunOS5 systems.
When this parameter is set, the view is refreshed. This parameter can be used in conjunction with the mode parameter to control when the view gets rerendered. The default behavior is to have the view rerender when anything in it changes. However, by setting the mode parameter to manual update, the view is only refreshed when this parameter is set.
These parameters control the background RGB color display in the view.
This parameter controls whether output from the view is enabled when there is a connection to the output subobject. A value of 0 means that output from the view is disabled. A value of 1 means that output from the view is enabled.
This parameter controls how normalization is performed. Normalization may be done in two different ways: one, the objects in the view are fit to the view's biggest side and two, the objects in the view are fit to the view's smallest side.
|
|
|
This parameter controls whether a stereo image is rendered. A value of 0 means off and a value of 1 means on. Refer to the system prerequisite information in the Installing AVS/Express book for information regarding which hardware platforms support stereo.
This parameter controls whether the stereo image is rendered in "full-screen" mode using the "SGIFullScreenStereo" X extension. This in only active on SGI systems when quad-buffering support is not available. Refer to the system prerequisite information in the Installing AVS/Express book for further details.
This parameter controls the eye translation along the X axis part of the stereo view projection. shift = (distance - 1.0) * (angle / distance).
This parameter controls the eye separation angle part of the stereo view projection. The formula is: shift = (distance - 1.0) * (angle / distance). This is only fully implemented on SGI systems. Refer to the system prerequisite information in the Installing AVS/Express book for further details.
This parameter controls whether true scale display is enabled. When true scale display is enabled, the objects rendered in the view are displayed at a map scale as controlled by the ts_scale, ts_xorig and ts_yorig parameters. All coordinate values are treated as meters when true scale is enabled. By default true scale is disabled.
There are two limitations or warnings in the use of true scale display:
This parameter sets a map scale when true scale display is enabled. A map's scale is a ratio that relates a unit of measure (centimeters) on a map to some number of units (meters) on the earth's surface. For instance, a map scale of 1:25000 means that 1 centimeter on the map represents 25,000 meters on the earth's surface. This allows distance to be measured on hardcopy output from a view. The default map scale is 1:25000.
This parameter sets the X origin of the lower left of the view window in meters. By default the X origin is 0.0.
This parameter sets the Y origin of the lower left of the view window in meters. By default the Y origin is 0.0.
This parameter when set causes the view attached to the editor to be reset to its default values.
Libraries.Graphics_Display.Editors.UI_Editors.ViewEditor