define an editor for the Graphics Display Kit properties
group GDprops_edit_notify_templ
{
float red;
float green;
float blue;
float hi1_red;
float hi1_green;
float hi1_blue;
float hi2_red;
float hi2_green;
float hi2_blue;
float spec_red;
float spec_green;
float spec_blue;
float ambient;
float diffuse;
float specular;
float spec_exp;
float trans;
enum draw_mode { choices = {"Copy" "XOR"}; };
int line_width;
enum line_style { choices = {"Solid", "Dashed", "Dotted", "DashDot"}; };
int line_aa;
float dir_pt_size;
int subdiv;
enum cull { choices = {"Normal", "Back", "Front", "Flip Normals"}; };
enum voxel_interp { choices = {"Point", "Trilinear"}; };
enum ray_algo { choices = {"Direct Composite", "Average", "Maximum",
"Distance to Max", "SFP"}; };
enum ray_norm { choices = {"Global", "View", "Ray"}; };
int fat_ray;
float sfp_absorb;
float sfp_emit;
int inherit;
};
GDprops_edit_notify_templ GDprops_edit
_templ{
int+IPort2 shell_vis;
int reset;
GDprops_templ+IPort2 &props;
method+notify_inst+notify_val upd_func = "GDprops_edit_update";
};
GDprops_edit_templ GDprops_edit;
These templates define an editor for the Graphics Display Kit properties. GDprops_edit_notify_templ and GDprops_edit_templ define the elements that cause the properties editor's method to execute. GDprops_edit is the version you instance.
As an alternative to using GDprops_edit and having to define your own user interface for the editor, you can use PropsEditor, an application component. PropsEditor contains GDprops_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 properties 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 properties 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 properties object controlled by the editor. props is a connection to an object that matches type GDprops_templ.
These parameters control the primary color for a primitive, in terms of RGB. This color is used when no node data or cell data is supplied.
hi1_red
hi1_green
hi1_blue
hi2_red
hi2_green
hi2_blue
These parameters control the colors for a primitive, in terms of RGB, when rendering lines and/or points in addition to a surface.
These parameters control the color for specular highlights, in terms of RGB.
ambient
diffuse
specular
spec_exp
These parameters control various material properties of an object.
Ambient light reflectance controls the proportion of the available ambient light that the object reflects. Ambient light is nondirectional, affecting all parts of all surfaces equally.
Diffuse light reflectance controls the proportion of the available non-ambient light that the object reflects equally in all directions. Nonambient light emanates from the directional and point light sources.
Specular highlights of a particular color and brightness are created when the direction of incoming light (from a directional or point light source) is "sufficiently close" to the viewing direction. The specular reflection coefficient determines the brightness of such highlights. The specular exponent determines what "sufficiently close" means. The greater the sharpness, the smaller (more focused) the size of the specular highlight.
This parameter controls the transparency value, between 0 and 1. As trans approaches 0, the object's surface gets more transparent. As trans approaches 1, the object's surface gets more opaque.
The drawing mode for the object.
This parameter controls the width of lines. It is specified as an integer pixel width.
This parameter controls the style of the lines drawn:
|
|
|
This parameter controls the anti-aliasing of lines: 0 disables anti-aliasing; 1 enables anti-aliasing. This option is supported in the OpenGL and XGL renderers.
This parameter controls the length of the normal lines rendered in Directed Points mode, but can also affect the length and radius of tubes, cones, and arrows in special modes within the OpenGL renderer.
This parameter controls the sphere subdivision or tesselation level.
This parameter controls backface culling.
|
|
|
The parameter controls the volume rendering interpolation method - that is, how voxel values are mapped to rays or pixels.
|
|
|
Values are linearly interpolated fro the two nearest voxels in each of the 3 principal directions. |
The parameter controls how data or spatial values are mapped to the ray and how the ray values are mapped to the final color for the pixel.
The parameter controls how the ray ranges are normalized when the ray algorithm is Distance to Max:
This parameter enables a super-sampling method that traces a single ray through a 4x4 block of pixels. The resulting image is faster to render, but of lower resolution.
This parameter controls the absorption of the exciting radiation when the ray algorithm is GD_ALGO_SFP.
This parameter controls the emmittance of fluorescence radiation in the direction of the observer when the ray algorithm is GD_ALGO_SFP.
This parameter controls whether the object should inherit its parent object's properties: 0 means no; 1 means yes.
This parameter when set causes the properties attached to the editor to be reset to their default values.
Libraries.Graphics_Display.Editors.UI_Editors.PropsEditor