Data Type: View Base ()

Description:

This module is the base class for several other modules displaying a set of triangles, like Isosurface, Surface View, Tetra Grid View, and others. View Base is not useful on its own but provides special features common to all derived modules. In particular, these features comprise the following:

Connections:

ColorField Scalar field to be visualized via pseudo-coloring. The field will be evaluated at the vertex positions of the surface and a color will be mapped onto the surface using the colormap connected port Colormap. The field may be either of type HxScalarField3 or of type HxSurfaceScalarField. In addition to scalar surface fields also 3- and 4-component surface fields are supported. In this case, the field components are directly interpreted as RGB or RGBA values. The values should range from 0 to 1.

Colormap Colormap used for pseudo-coloring (see Color Field). To change the colormap right-click the colormap window or reconnect (drag) the blue connection line with another colormap data object. To change the port's default color double- (left-)click the colormap window and select a color from the Color Dialog. See also Colormap.

Texture [optional]
This port allows connection of a 2D image that will be mapped onto the surface as a texture. The image must be a single slice of type ColorField. A transformation can be applied to the texture image in order to change the texture projection axis and texture coordinates scale. Note that texture projection overrides pseudo-color mode.

Ports:

Draw Style

This port determines the draw style of the surface. Five major styles may be selected from an option menu:

More options: Pressing this button opens a pull-down menu that may be used to fine-tune draw style. This menu contains 4 groups of items:

The first group deals with surface shading and pseudo-color mapping.

The second group of items refers to transparency. Transparent mode implies physically correct transparencies, i.e., triangles appear more opaque if they are viewed under a small angle. It also implies approximate depth-sorting (except for Sorted Layers and Sorted Layers Delayed transparency types), i.e., triangles are roughly rendered from back to front in order to obtain correct blending results. Note that in some cases visual artifacts may occur for long and thin triangles, for self-intersecting surfaces, or for multiple semi-transparent surfaces being displayed simultaneously.

The third group of items control which side of a triangle is rendered. With Culling enabled either the front or the back face of a triangle is rendered. This may be used to improve rendering performance on some older graphics boards. Note that with modern graphics boards the difference is usually negligible. Three modes can be selected:

The following group of items is available for Surface View only. The settings here affect the computation of the surface normals used for shading.

All View Base derived display modules allow export of a surface object.

With the Line width and the Outline color options you can modify the line width and the outline color of the surface. The Line width option is enabled if the Outlined or the Lines draw style is selected, otherwise it is disabled. The Outline color option is enabled only if the Outlined draw style is selected.

Buffer

This port can be used to modify the list of currently visible triangles. All visible triangles are stored in an internal buffer. To modify the contents of this buffer you need to first select triangles (selected triangles are drawn in red wireframe) and then add or remove them using the buttons described below. Triangles can be selected either by manipulating a tab-box dragger, by using the Materials (Patch or Boundary id) ports, or by drawing a contour in the viewer.

TextureWrap

Wrap mode used for the texture projection on the surface when a texture is applied to the surface. This port is hidden if no texture data is connected to the Texture connection port. There are two wrap modes:

Commands:

createSurface [name]
Converts the set of visible triangles into a Surface object.

setAlphaMode {opaque|constant|fancy}
Triangles may be drawn either opaque or transparent. Two transparent modes are possible: with a constant alpha value (constant) or an alpha value varying according to triangle normal (fancy). See also the description of port Draw Style.

setNormalBinding {perTriangle|perVertex}
Normals can be bound either per triangle or per vertex. In the first mode the triangles appear flat.

setPointSize size
Sets the size of points when points are selected in port Draw Style.

setPolygonOffsetMode {auto|on|off}
If lines are to be drawn on top of a surface, the surface must be rendered with an offset to avoid artifacts. This can be done automatically (auto), always (on), or never (off).

setOutlineColor <color> | <r><g><b>
Sets the line color in outlined Draw style.

setLineWidth <width>
Sets the width of the lines in outlined and lines Draw Style.

setHighlightColor <color> | <r> <g> <b>
Sets the wireframe color of selected triangles.

setEmissiveColor <color> | <r> <g> <b>
Sets the emissive color of the surface.

setSpecularColor <color> | <r> <g> <b>
Sets the specular color of the surface. This will only take effect if specular lighting has been enabled in port Draw Style.

setShininess <shininess>
Sets the size and distinctness of the specular highlight in Specular surface rendering. The parameter <shininess> can take values between 0 and 1, 0.2 being the default.

showBox
Shows the box that is used for selecting triangles. See also the description of port Buffer.

hideBox
Hides the box that is used for selecting triangles. See also the description of port Buffer.