define an editor for a Graphics Display Kit object
group GDobj_edit_notify_templ
{
int visible;
int pickable;
int cached;
int cache_size;
enum surf_conv { choices = {"Simple", "Optimal"}; };
int chunk;
int surf_chunk;
int line_chunk;
int surf_subdiv;
enum type { choices = {"Static", "Dynamic"}; };
enum dith_tech { choices = {"Cube", "Ramp"}; };
emum interp_type { choices = {"Point", "Bilinear", "Bicubic"}; };
int tmap_method;
int tri_subdiv_type;
int tri_subdiv_aval;
int tri_subdiv_fval;
float missing_val;
float missing_red;
float missing_green;
float missing_blue;
enum xform_mode {choices = {"Normal", "Parent", "Alternate", "Locked"}; };
int reset;
int normalize;
int center;
int use_altobj;
enum space { choices = {"Match Camera", "Force 2D"}; };
};
GDobj_edit_notify_templ GDobj_edit_templ
{
int+IPort2 shell_vis;
GDcamera_templ+IPort2 *camera;
GDobject_templ+IPort2 *object;
method+notify_inst+notify_val upd_func = "GDobj_edit_update";
};
These templates define an editor for the Graphics Display Kit object. GDobject_edit_notify_templ and GDobject_edit_templ define the elements that cause the object editor's method to execute. GDobject_edit is the version you instance.
As an alternative to using GDobject_edit and having to define your own user interface for the editor, you can use ObjectEditor, an application component. ObjectEditor contains GDobject_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 object 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 object 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 camera connected to the object editor. camera is a connection to an object that matches type GDobject_templ. The camera is needed in order to perform normalization.
The Graphics Display Kit object controlled by the object editor. object is a connection to an object that matches type GDobject_templ.
This parameter controls whether the object is visible: 0 means no; 1 means yes. When the object is not visible, all its children objects are also not visible.
This parameter controls whether the object is pickable: 0 means no; 1 means yes. When the object is not pickable, all its children objects are also not pickable.
This parameter controls whether the Graphics Display Kit should cache the object's data: 0 means it should not; 1 means it should. The cache is a geometrical representation of the data being rendered. The cache is renderer- specific. If an object is rendered in multiple views with different renderers enabled, there are multiple caches. You should keep this is mind, particularly if the data being rendered is large.
This parameter specifies the maximum allowable size of the geometrical cache in megabytes. The default cache size for each object is 8 megabytes. When the object is rendered, a calculation is performed to determine if the object will generate enough geometry to overflow the cache. If it will, the cache is automatically disabled before the rendering process begins. This allows the Graphics Display Kit to render large objects without consuming all the available memory.
This subobject controls how a surface is converted to a triangle strip.The feature is supported when the cell type is either triangle, quad, or polyhedron. There are two different types of surface conversion:
A value of 0 means the simple conversion should be used. In simple surface conversion, a triangle strip is constructed by adding zero-area triangles. In a typical case, 10,000 triangles are converted into a triangle strip that has 60,000 triangles in the strip.
A value of 1 means the optimal conversion should be used. In the optimal case, the list of of cells is rearranged into a triangle strip that is a more efficient representation of the surface. In a typical case, 10,000 triangles turn into a triangle strip that is 20,000 long. Note that the optimization provided by the optimal conversion depends on the existence of shared nodes in the input field. While the triangle strip may be considerably shorter when using the optimal surface conversion, this manner of surface conversion takes extra time and memory. The amount of temporary storage that is used by the optimal conversion can roughly be calculated by multiplying the number of triangles by 240. The number that you get is the number of bytes. For example, if you have 10,000 triangles, the temporary storage requirements are 2,400,000 bytes or about 2.3 Mbytes.
Optimal surface conversion is faster with smaller chunk sizes. It is worth experimenting with these controls to determine the configuration that provides the best speed/memory tradeoff for the data sets that you are trying to render.
This parameter controls whether chunking is enabled: 0 means disable; 1 means enabled. Chunking is provided as a way for you to control the temporary storage utilization during surface conversion. If chunking is disabled, the whole surface is converted at once. If chunking is enabled, the surface is converted in chunks as specified by the surface and line chunk sizes. The size is the number of primitives to convert at a time.
This parameter controls the number of cells to process at once when chunking is enabled and a surface rendering mode is selected.
This parameter controls the number of cells to process at once when chunking is enabled and a line rendering mode is selected.
This parameter controls whether quad cells are subdivided and to what extent. Valid values are in the range 1 to 4. A value of 1 means that no subdivision will be done. Values of 2 through 4 mean that each quad cell will be divided upto the number specified if the node data values at the verticies of the quad cell vary too much. For a value of 2, the values can vary up to 50% of the total range of the data. For a value of 3, the values may vary up to 33%, and for a value of 4, the values may vary up to 25%.
This parameter controls whether the object is marked as static or dynamic for accelerate mode rendering. When accelerate mode is set on for the view, the renderer(s) store the image and Z-buffer information for static-type objects. When dynamic-type objects are changed, they are re-rendered into the buffers already containing the rendered static objects -- the static object need not be re-rendered unless it is also changed.
|
|
|
This parameter controls how the datamap is used when scalar images are rendered and the virtual palette has an 8-bit visual selected. A value of 0 means that the scalar image values are converted to RGB color values and then dithered using the virtual palette's cube. A value of 1 means that the datamap is converted to a linear ramp in the system palette. The scalar image values are then converted directly to pixels using the ramp.
This parameter controls the interpolation type used to scale the image. A value of 0 means point sampling. A value of 1 means bilinear interpolation. The XIL renderer (SunOS5 only) can also do bicubic interpolation (value 2).
This parameter controls the texture mapping method applied to the object. The default value is 0 or "normal" which is applicable for all platforms. A value of 1 means Vertex Level Texture Mapping (VLTM) and is applicable only in the XGL renderer on SunOS5 on the ZX graphics boards -- see the System Prerequisites document.
This parameter is only applicable when using VLTM texture mapping in the XGL renderer on SunOS5 systems on ZX graphics boards -- see tmap_method above and the System Prerequisites document.
This parameter is only applicable when using VLTM texture mapping in the XGL renderer on SunOS5 systems on ZX graphics boards -- see tmap_method above and the System Prerequisites document.
This parameter is only applicable when using VLTM texture mapping in the XGL renderer on SunOS5 systems on ZX graphics boards -- see tmap_method above and the System Prerequisites document.
This paremeter provides the value to be used when rendering areas of scalar images that have been "left empty" due to rotation.
missing_red
missing_green
missing_blue
These parameters provide the values to be used when rendering areas of RGB images that have been "left empty" due to rotation.
This parameter controls the object's transform mode. Depending on the current transform mode, different transforms can be edited when the object is being directly manipulated. The transform mode may be:
|
|
|
Edit the xform of the object's parent. Adhere to the parent's xform_mode. | ||
This parameter when set causes the object's transformation to be reset to its default -- the identity matrix.
This parameter when set causes the object to be normalized to the view.
This parameter when set causes the objects center of rotation to be set to the extents of the data.
This parameter controls whether the alternate object is used when rendering. By default, use_altobj is set to 0, disabling use of the alternate object.
This parameter controls whether the object is rendered with primitives that match the space of the camera (ie. 3D or 2D) or if 2D primitives are always used. A value of 0 means match to the space of the camera. A value of 1 means force the use of 2D primitives. This is especially useful in conjunction with the use of an alternate object so only 2D primitive are rendered. This gives more interactively in the camera.
Libraries.Graphics_Display.Editors.UI_Editors.ObjectEditor