TOC PREV NEXT INDEX

DefaultModes

Synopsis

define the Graphics Display Kit modes

GDmodes_templ

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

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";
};

DefaultModes

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

mode

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]).
Array element...
specifies the mode for....
Symbolic constant
mode[0]
Points
GD_MODE_POINTS
mode[1]
Lines
GD_MODE_LINES
mode[2]
Surface
D_MODE_SURF
mode[3]
Volume
GD_MODE_VOL
mode[4]
Bounds
GD_MODE_BOUNDS
The following tables show the valid values for each mode.Points:
Value
Meaning
Symbolic constant
0
Inherit the parent object's mode
GD_POINTS_INHERIT
1
Do not render points
GD_NO_POINTS
2
Render points
GD_POINTS
3
Render lines in direction of the normal vector
GD_POINTS_DIRECTED
Lines:
Value
Meaning
Symbolic constant
0
Inherit the parent object's mode
GD_LINES_INHERIT
1
Do not render lines
GD_NO_LINES
2
Render lines
GD_LINES
Surfaces:
Value
Meaning
Symbolic constant
0
Inherit the parent object's mode
GD_SURF_INHERIT
1
Do not render surfaces
GD_NO_SURF
2
Render using no lighting
GD_SURF_NOLIGHT
3
Render using flat shading
GD_SURF_FLAT
4
Render using Gouraud shading
GD_SURF_GOURAUD
5
Render using the ackground color (thus hiding the surface and items behind it)
GD_SURF_BACKGROUND
Volumes:
Value
Meaning
Symbolic constant
0
Inherit the parent object's mode
GD_VOLUME_INHERIT
1
Do not render volumes
GD_NO_VOLUME
2
Render using the back-to-front method
GD_VOLUME_BTF
3
Render using a ray tracing method
GD_VOLUME_RAY
Bounds:
Value
Meaning
Symbolic constant
0
Inherit the parent object's mode
GD_BOUNDS_INHERIT
1
Do not render bounds
GD_NO_BOUNDS
2
Render bounds
GD_BOUNDS

normals

Controls the generation and usage of vertex normals in Data Visualization Kit modules. Valid values and corresponding module behavior are:
Value
Meaning
Symbolic constant
0
Inherit the parent's vertex normals mode.
GD_NORMALS_INHERIT
1
Do not generate vertex normals.
GD_NORMALS_NONE
2
Generate vertex normals.
GD_NORMALS_VERTEX
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

v/gdif.v

See also related modules

Not Applicable.

TOC PREV NEXT INDEX