![]() |
![]() |
![]() |
![]() |
DefaultModes
Synopsis
define the Graphics Display Kit modes
group GDmodes_templ {
int+read mode&animate=1>[5];
enum normals {
choices = {"Inherit", "None", "Vertex"};
};
enum colors {
choices = {"Inherit", "None", "Facet", "Vertex"};
};
enum outline {
choices = {"On", "Off"};
};
ptr+nonotify local_ptr&NEvisible=0>;
};GDmodes_templ+OPort GDmodes<cxx_name="GDXmodes"> {
local_ptr+write;
method+notify_inst+notify_val upd_func = "GDmodes_update";
method+notify_deinst del_func = "GDmodes_delete";
};GDmodes DefaultModes {
/* all modes inherit */
mode[5] = { GD_POINTS_INHERIT, GD_LINES_INHERIT,
GD_SURF_INHERIT, GD_VOLUME_INHERIT, GD_BOUNDS_INHERIT };
normals = GD_NORMALS_INHERIT;
colors = GD_COLORS_INHERIT;
outline = GD_OUTLINE_ON;
};Description
These templates define the Graphics Display Kit properties. GDprops_templ defines the elements that cause the properties methods to execute. GDprops defines an instanceable version without default values. DefaultProps defines an instanceable version with default values.
Parameters
An array of rendering modes, specifying how to render points, lines, surfaces, volumes, and bounds.The following table specifies the meaning of each array element. Symbolic constants are available for the indices (for example, mode[GD_MODE_POINTS] is equivalent to mode[0]).
Controls the generation and usage of vertex normals in Data Visualization Kit modules. Valid values and corresponding module behavior are:
GD_NORMALS_VERTEX is the default for most modules and vertex normals are therefore generated for those modules. Setting the value of the normals subobject to GD_NORMALS_INHERIT has the following effects on the rendering of triangle and quad cell sets. If the surface mode is Gouraud and there are no vertex normals, facet normals are calculated from the vertices and used as vertex normals for the primitive being rendered. The effect is to have Gouraud with facet normals (the AVS5 UCD look, in which the facets are evident). This mode of usage corrects the rendering artifacts. If the surface mode is flat and there are no vertex normals, facet normals are calculated from the vertices and used as vertex normals for the primitive being rendered. This is different from the case in which vertex normals are present and are averaged to make the facet normals. The rendering may or may not be different in this case. If the surface mode is no lighting, there is no effect on the rendering of the data. However, since normals are not used in the no-lighting case, not generating them saves both time and memory.
Example
Libraries.Graphics_Display.Objects.DataObject
File
See also related modules
![]() |
![]() |
![]() |
![]() |