Attributes - CoordSys, Units, VisContext

Currently there are three visualization attribute objects, 1) CoordSys for defining coordinate systems, 2) Units for defining the units of physical quantities and 3) VisContext for defining visualization parameters.

Note that the Units and CoordSys objects hold floating point data internally in double precision.

Visualization Context - VisContext

There are many attributes which can affect the display of a visualization entity such as a tensor marker or an isosurface. Examples of these attributes are color, transparency, size, shading, line width and line style. A collection of visualization attributes which affect the display of a given visualization entity is termed the visualization context. It is the function of a VisContext object to hold these attributes as its private data and act as a convenient method of passing these attributes to objects which perform the actual display of a visualization entity. In some cases only a subset of the attributes held in a VisContext object are accessed by given visualization object. On the other hand, for more complex visualization objects more than one VisContext object may be required. The methods associated with a VisContext object are the following.

The attributes of a visualization context have a specific interpretation when used by any given visualization object.

Each VisContext object contains an internal modification counter. A visualization object which uses a VisContext object is sensitive to the modification counter in that it signals when a VisContext object has been changed or “touched”. If a visualization object detects that the modification counter of a VisContext object has been changed, then initializing graphics attributes such as color, transparency and line width are generated when the drawing methods for that visualization object are called. For this reason, when using more than one visualization object, vis_VisContextTouch() should be called before invoking the drawing methods of a visualization object.

Function Descriptions

All attributes which may be set in a VisContext object are accessed using “inline” methods. These methods are implemented using C preprocessor macros. For example the current color attribute in a VisContext object, viscontext, may be accessed as follows:

color = vis_VisContextColor(vis_VisContext *viscontext);
vis_VisContext *vis_VisContextBegin(void)

create an instance of a VisContext object

Create an instance of a VisContext object. Memory is allocated for the object private data and the pointer to the data is returned. All attributes are set to their default values.

Destroy an instance of a VisContext object using

void vis_VisContextEnd (vis_VisContext *viscontext)

Return the current value of a VisContext object error flag using

Vint vis_VisContextError (vis_VisContext *viscontext)

Make a copy of a VisContext object. The private data from the fromviscontext object is copied to the viscontext object. Any previous private data in viscontext is lost.

void vis_VisContextCopy (vis_VisContext *viscontext,
                         vis_VisContext *fromviscontext)

Returns:The function returns a pointer to the newly created VisContext object. If the object creation fails, NULL is returned.
void vis_VisContextEnd(vis_VisContext *p)

destroy an instance of a VisContext object

See vis_VisContextBegin()

Vint vis_VisContextError(vis_VisContext *p)

return the current value of a VisContext object error flag

See vis_VisContextBegin()

void vis_VisContextInit(vis_VisContext *p)

set attributes to default values

Set all attributes in a VisContext object to the default values.

Parameters:p – Pointer to VisContext object.
void vis_VisContextTouch(vis_VisContext *p)

update modification counter

Increment the modification counter of a visualization context object. The modification counter of a visualization context is also incremented whenever one of its attributes is “Set”. Calling this function is generally required when mixing calls to the drawing methods of more than one visualization object. As a general rule, call vis_VisContextTouch() for the VisContext objects used by a visualization object before calling the drawing methods for that object. Once called in this manner, vis_VisContextTouch() need only be called again if the drawing methods of a different visualization object are invoked.

Parameters:p – Pointer to VisContext object.
void vis_VisContextSetAngle(vis_VisContext *p, Vfloat angle)

set angle in degrees

Set angle in degrees. This attribute is used by Mark objects to specify the half angle of the heads of vectors. The length of a vector head relative to the total length of a vector is specified by the Ratio visualization context which is set using vis_VisContextSetRatio(). By default angle is 24. degrees.

Get angle as output argument using:

void vis_VisContextGetAngle (vis_VisContext *viscontext,
                             Vfloat *angle)

Access angle using:

vis_VisContextAngle (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • angle – Angle in degrees
void vis_VisContextGetAngle(vis_VisContext *p, Vfloat *angle)

get angle in degrees

See vis_VisContextSetAngle()

void vis_VisContextSetBitmapSize(vis_VisContext *p, Vint bitmapsize)

set bitmap size multiplier

Set bitmap size multiplier. Bitmap size affects any visualization object which generates bitmap icons. The bitmap size is an integer multiplier which is applied to the entire bitmap. By default bitmapsize is 1.

Get bitmapsize as output argument using using:

void vis_VisContextGetBitmapSize (vis_VisContext *viscontext,
                                  Vint *bitmapsize)

Access bitmapsize using:

vis_VisContextBitmapSize (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • bitmapsize – Bitmap size multiplier
void vis_VisContextGetBitmapSize(vis_VisContext *p, Vint *bitmapsize)

get bitmap size multiplier

See vis_VisContextGetBitmapSize()

void vis_VisContextSetColor(vis_VisContext *p, Vint color)

set color attributes

Set color or minor color attribute as a color map index. The color attribute is ignored if color is mapped to field value. The minor color attribute is used for coloring secondary items which always appear in a constant color and are never color mapped to field value. By default color is 1.

Get color as output argument using:

void vis_VisContextGetColor (vis_VisContext *viscontext,
                             Vint *color)
void vis_VisContextGetMinorColor (vis_VisContext *viscontext,
                                  Vint *color)

Access color using:

vis_VisContextColor (vis_VisContext *viscontext);
vis_VisContextMinorColor (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • color – Color map index.
void vis_VisContextGetColor(vis_VisContext *p, Vint *color)

get color attributes

See vis_VisContextSetColor()

void vis_VisContextSetMinorColor(vis_VisContext *p, Vint minorcolor)

set color attributes

Set color or minor color attribute as a color map index. The color attribute is ignored if color is mapped to field value. The minor color attribute is used for coloring secondary items which always appear in a constant color and are never color mapped to field value. By default minorcolor is 1.

Get minorcolor as output argument using:

void vis_VisContextGetColor (vis_VisContext *viscontext,
                             Vint *color)
void vis_VisContextGetMinorColor (vis_VisContext *viscontext,
                                  Vint *color)

Access minorcolor using:

vis_VisContextColor (vis_VisContext *viscontext);
vis_VisContextMinorColor (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • minorcolor – Color map index.
void vis_VisContextGetMinorColor(vis_VisContext *p, Vint *minorcolor)

get color attributes

See vis_VisContextSetMinorColor()

void vis_VisContextSetABCColor(vis_VisContext *p, Vint acolor, Vint bcolor, Vint ccolor)

set miscellaneous color attributes

Set miscellaneous color attributes as color map indices. The a,b,c color attributes are used to specify constant colors to miscellaneous visualization entities. In some cases the a,b,c colors complement the x,y,z colors. For example, the Triad module uses the a,b,c colors for the labels used for each coordinate axis. By default a acolor, bcolor and ccolor are 1.

Get acolor, bcolor and ccolor as output arguments using

void vis_VisContextGetABCColor (vis_VisContext *viscontext,
                                Vint *acolor, Vint *bcolor, Vint *ccolor)

Access acolor, bcolor and ccolor respectively using:

vis_VisContextAColor(vis_VisContext *viscontext);
vis_VisContextBColor(vis_VisContext *viscontext);
vis_VisContextCColor(vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • acolor – A color map index.
  • bcolor – B color map index.
  • ccolor – C color map index.
void vis_VisContextGetABCColor(vis_VisContext *p, Vint *acolor, Vint *bcolor, Vint *ccolor)

get miscellaneous color attributes

See vis_VisContextSetABCColor()

void vis_VisContextSetXYZColor(vis_VisContext *p, Vint xcolor, Vint ycolor, Vint zcolor)

set x,y,z color attributes

Set x,y,z color attributes as color map indices. The x,y,z color attributes are used to specify constant colors to visualization entities which are aligned to a coordinate system such as the components of a vector. By default xcolor, ycolor and zcolor are 1.

Get xcolor, ycolor and zcolor as output arguments using:

void vis_VisContextGetXYZColor (vis_VisContext *viscontext,
                                Vint *xcolor,
                                Vint *ycolor,
                                Vint *zcolor)

Access xcolor, ycolor and zcolor respectively using:

vis_VisContextXColor (vis_VisContext *viscontext);
vis_VisContextYColor (vis_VisContext *viscontext);
vis_VisContextZColor (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • xcolor – X color map index.
  • ycolor – Y color map index.
  • zcolor – Z color map index.
void vis_VisContextGetXYZColor(vis_VisContext *p, Vint *xcolor, Vint *ycolor, Vint *zcolor)

get x,y,z color attributes

See vis_VisContextSetXYZColor()

void vis_VisContextSetMapColor(vis_VisContext *p, Vint mapcolor)

set color mapping flag

Set color mapping type. If color mapping is off, then the Color visualization attribute is used to color the appropriate entity. If color mapping is VIS_MAPCOLOR_CONSTANT, then field value is mapped to a color map index using a Levels object. This results in a constant color between levels values. If color mapping is VIS_MAPCOLOR_SMOOTH, then field value is mapped to a linearly interpolated color between bounding color map indices using a Levels object. This results in a smooth color variation between levels values. By default mapcolor is VIS_MAPCOLOR_CONSTANT.

Get mapcolor as output argument using:

void vis_VisContextGetMapColor (vis_VisContext *viscontext,
                                Vint *mapcolor)

Access mapcolor using:

vis_VisContextMapColor (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • mapcolor – Color mapping flag
    x=VIS_MAPCOLOR_NONE      Turn color mapping off
     =VIS_MAPCOLOR_CONSTANT  Constant level color mapping
     =VIS_MAPCOLOR_SMOOTH    Smooth level color mapping
    
void vis_VisContextGetMapColor(vis_VisContext *p, Vint *mapcolor)

get color mapping flag

See vis_VisContextSetMapColor()

void vis_VisContextSetTrans(vis_VisContext *p, Vint trans)

set transparency attribute

Set transparency attribute as a transparency map index. The transparency attribute is ignored if transparency is mapped to field value. By default trans is 0.

Get trans as output argument using:

void vis_VisContextGetTrans (vis_VisContext *viscontext,
                             Vint *trans)

Access trans using:

vis_VisContextTrans (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • trans – Transparency map index.
void vis_VisContextGetTrans(vis_VisContext *p, Vint *transparency)

get transparency attribute

See vis_VisContextSetTrans()

void vis_VisContextSetMapTrans(vis_VisContext *p, Vint maptrans)

set transparency mapping flag

Set transparency mapping flag. If transparency mapping is off, then the Trans visualization attribute is used to determine the transparency of the appropriate entity. If transparency mapping in on, then field value is mapped to transparency map index using a Levels object. By default maptrans is off.

Get maptrans as output argument using:

void vis_VisContextGetMapTrans (vis_VisContext *viscontext,
                                Vint *maptrans)

Access maptrans using:

vis_VisContextMapTrans (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • maptrans – Transparency mapping flag
    =VIS_OFF      Turn transparency mapping flag off
    =VIS_ON       Turn transparency mapping flag on
    
void vis_VisContextGetMapTrans(vis_VisContext *p, Vint *maptrans)

get transparency mapping flag

See vis_VisContextSetMapTrans()

void vis_VisContextSetRatio(vis_VisContext *p, Vfloat ratio)

set ratio

Set ratio. This attribute is used by Mark objects to specify the length of a vector head relative to the total length of a vector. The half angle of a vector head is specified by the Angle visualization context which is set using vis_VisContextSetAngle(). By default ratio is .26 .

Get ratio as output argument using:

void vis_VisContextGetRatio (vis_VisContext *viscontext,
                             Vfloat *ratio)

Access ratio using:

vis_VisContextRatio (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object
  • ratio – Ratio
void vis_VisContextGetRatio(vis_VisContext *p, Vfloat *ratio)

get ratio

See vis_VisContextSetRatio()

void vis_VisContextSetSize(vis_VisContext *p, Vfloat size)

set size attribute

Set size or minor size attribute. The size attribute is used to specify the size in global coordinates of various visualization entities. If size mapping is on, then field value is mapped to size where size represents the size of the visualization entity at maximum field value. The minor size is used to size secondary components of a visualization entity. By default size is 1.

Get size as output argument using:

void vis_VisContextGetSize (vis_VisContext *viscontext,
                            Vfloat *size)
void vis_VisContextGetMinorSize (vis_VisContext *viscontext,
                                 Vfloat *size)

Access size using:

vis_VisContextSize (vis_VisContext *viscontext);
vis_VisContextMinorSize (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • size – Size in global coordinates
void vis_VisContextGetSize(vis_VisContext *p, Vfloat *size)

get size attribute

See vis_VisContextSetSize()

void vis_VisContextSetMinorSize(vis_VisContext *p, Vfloat minorsize)

set size attribute

Set size or minor size attribute. The size attribute is used to specify the size in global coordinates of various visualization entities. If size mapping is on, then field value is mapped to size where minorsize represents the size of the visualization entity at maximum field value. The minor size is used to size secondary components of a visualization entity. By default minorsize is 1.

Get size as output argument using:

void vis_VisContextGetSize (vis_VisContext *viscontext,
                            Vfloat *size)
void vis_VisContextGetMinorSize (vis_VisContext *viscontext,
                                 Vfloat *size)

Access size using:

vis_VisContextSize (vis_VisContext *viscontext);
vis_VisContextMinorSize (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • minorsize – Size in global coordinates
void vis_VisContextGetMinorSize(vis_VisContext *p, Vfloat *minorsize)

get minor size attribute

See vis_VisContextSetMinorSize()

void vis_VisContextSetMapSize(vis_VisContext *p, Vint mapsize)

set size mapping flag

Set size mapping flag. If size mapping is off, then the Size visualization attribute is used to size the appropriate entity. If size mapping in on, then field value is mapped to size using a Levels object. Size is scaled to field value by linearly mapping the maximum absolute value of the field value extremes contained in the Levels object to mapsize. This means that entities with zero field value are drawn as a single pixel and entities at the maximum absolute field value are drawn with mapsize. Note that most visualization objects inhibit the drawing of entities which have a zero field value and as a result have been mapped to a single pixel. By default mapsize is off.

Get mapsize as output argument using:

void vis_VisContextGetMapSize (vis_VisContext *viscontext,
                               Vint *mapsize)

Access mapsize using:

vis_VisContextMapSize (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • mapsize – Size mapping flag
    =VIS_OFF      Turn size mapping flag off
    =VIS_ON       Turn size mapping flag on
    
void vis_VisContextGetMapSize(vis_VisContext *p, Vint *mapsize)

get size mapping flag

See vis_VisContextSetMapSize()

void vis_VisContextSetComponent(vis_VisContext *p, Vint component)

set component type

Set component type. If the component flag is VIS_COMPONENT_PRINCIPAL, then vector and tensor markers and values are displayed in resultant or principal directions. If the component flag is VIS_COMPONENT_BASIC, then vector and tensor markers and values are displayed in component form in the coordinate systems in which they are defined. If the component flag is VIS_COMPONENT_MAXSHEAR, then tensor markers and values are displayed in the directions of maximum shear. Vector and matrix markers and values are displayed in resultant or principal directions. By default component is VIS_COMPONENT_PRINCIPAL.

Get component as output argument using:

void vis_VisContextGetComponent (vis_VisContext *viscontext,
                                 Vint *component)

Access component using:

vis_VisContextComponent (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • component – Component flag
    x=VIS_COMPONENT_PRINCIPAL      Principal components
     =VIS_COMPONENT_BASIC          Basic components
     =VIS_COMPONENT_MAXSHEAR       Maximum shear components
    
void vis_VisContextGetComponent(vis_VisContext *p, Vint *component)

get component type

See vis_VisContextSetComponent()

void vis_VisContextSetShade(vis_VisContext *p, Vint shade)

set light source shading attribute

Set light source shading attribute. The shade attribute is used to specify the type of surface normals computed for polygon graphics primitives. If no shading is specified, polygons are sent to the graphics subsystem (drawn) with no normals supplied. If flat shading is specified then polygons are drawn with a single surface normal per facet. If vertex shading is specified then polygons are drawn with normals supplied at each polygon vertex. By default shade is VIS_FLATSHADE.

Get shade as output argument using:

void vis_VisContextGetShade (vis_VisContext *viscontext,
                             Vint *shade)

Access shade using:

vis_VisContextShade (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper shade is specified.

Parameters:
  • p – Pointer to VisContext object.
  • shade – Light source shading.
    x=VIS_NOSHADE            No shading
     =VIS_FLATSHADE          Flat shading
     =VIS_VERTEXSHADE        Vertex shading
    
void vis_VisContextGetShade(vis_VisContext *p, Vint *shade)

get light source shading attribute

See vis_VisContextSetShade()

void vis_VisContextSetRefinement(vis_VisContext *p, Vint refinement)

set order of refinement attribute

Set the order of refinement attribute. The refinement attribute is used to specify the degree of tessellation used on curved lines and surfaces as well as polygonal and polyhedral cells.

For Serendipity and Lagrange topologies, a refinement of -1 will tesselate using only the end points of a line and the corner points of a surface. A refinement of 0 yields a tesselation which uses all points on a curved line or surface without subdividing the line or edges of the surface. A refinement of 1 or 2 subdivides the line and surface. Incrementing the refinement generally doubles the number of subdivisions along a particular dimension.

For polygonal and polyhedral cells, a a refinement of -1 or 0 will tesselate using only the points defining the cell, a refinement greater than zero will add center points to the cell and cell faces for tesselation.

By default refinement is 0.

Get refinement as output argument using:

void vis_VisContextGetRefinement (vis_VisContext *viscontext,
                                  Vint *refinement)

Access refinement using:

vis_VisContextRefinement (vis_VisContext *viscontext);

Errors
VIS_ERROR_VALUE is generated if an improper refinement is specified.

Parameters:
  • p – Pointer to VisContext object.
  • refinement – Order of refinement. -1 <= refinement <= 2.
void vis_VisContextGetRefinement(vis_VisContext *p, Vint *refinement)

get order of refinement attribute

See vis_VisContextSetRefinement()

void vis_VisContextSetPrimType(vis_VisContext *p, Vint primtype)

set suggested primitive type

Set suggested primitive type to be generated by visualization modules. Primitive type affects the Contour and Face visualization modules. The primitive type is only a suggested type. It may not be possible for the visualization modules to effectively build the suggested primitive type. If the suggested primitive type can not be supported then polygon types are generated. By default primtype is VIS_PRIM_POLY.

Get primtype as output argument using:

void vis_VisContextGetPrimType (vis_VisContext *viscontext,
                                Vint *primtype)

Access primtype using:

vis_VisContextPrimType (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • primtype – Primitive type
    x=VIS_PRIM_POLY          Polygon
     =VIS_PRIM_ARRAY         Arrays of triangles, quads or lines
     =VIS_PRIM_STRIP         Triangle strips
    
void vis_VisContextGetPrimType(vis_VisContext *p, Vint *primtype)

get suggested primitive type

See vis_VisContextSetPrimType()

void vis_VisContextSetUnitTol(vis_VisContext *p, Vfloat unittol)

set unit tolerance

Set unit tolerance. The unit tolerance represents a relative tolerance measure used as a tolerance bound. Unit tolerances are usually small which respect to unity. This tolerance bound is in contrast to the distance tolerance, set by vis_VisContextSetDistTol(), which is an absolute world coordinate distance tolerance. By default unittol is .001.

Get unittol as output argument using:

void vis_VisContextGetUnitTol (vis_VisContext *viscontext,
                               Vfloat *unittol)

Access utol using:

vis_VisContextUnitTol (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • unittol – Unit tolerance
void vis_VisContextGetUnitTol(vis_VisContext *p, Vfloat *utol)

get unit tolerance

See vis_VisContextSetUnitTol()

void vis_VisContextSetDistTol(vis_VisContext *p, Vfloat disttol)

set distance tolerance

Set distance tolerance. The distance tolerance represents an absolute global coordinate distance used as a tolerance bound for certain operations such as intersection testing. This tolerance bound is in contrast to the unit tolerance, set by vis_VisContextSetUnitTol(), which is a tolerance relative to some other measure such as edge length or face area, etc. By default disttol is .001.

Get disttol as output argument using:

void vis_VisContextGetDistTol (vis_VisContext *viscontext,
                               Vfloat *disttol)

Access disttol using:

vis_VisContextDistTol (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • disttol – Distance tolerance
void vis_VisContextGetDistTol(vis_VisContext *p, Vfloat *dtol)

get distance tolerance

See vis_VisContextSetDistTol()

void vis_VisContextSetPosition(vis_VisContext *p, Vint position)

set position or direction attribute

Set position or direction attribute. This attribute is used to specify the baseline position of text strings or the direction of axes, etc. By default position is VIS_BOTTOMLEFT.

Get position as output argument using:

void vis_VisContextGetPosition (vis_VisContext *viscontext,
                                Vint *position)

Access position using:

vis_VisContextPosition (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper position is specified.

Parameters:
  • p – Pointer to VisContext object.
  • position – Position or direction
    x=VIS_LEFT               Left
     =VIS_RIGHT              Right
     =VIS_BOTTOM             Bottom
     =VIS_TOP                Top
     =VIS_CENTER             Center
     =VIS_BOTTOMLEFT         Bottom left
     =VIS_TOPLEFT            Top left
     =VIS_BOTTOMRIGHT        Bottom right
     =VIS_TOPRIGHT           Top right
    
void vis_VisContextGetPosition(vis_VisContext *p, Vint *position)

get position or direction attribute

See vis_VisContextSetPosition()

void vis_VisContextSetFill(vis_VisContext *p, Vint fill)

set fill flag

Set fill flag on or off. The fill flag determines whether or not certain visualization entities are polygon filled. By default fill is on.

Get fill as output argument using:

void vis_VisContextGetFill (vis_VisContext *viscontext,
                            Vint *fill)

Access fill using:

vis_VisContextFill (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • fill – Fill flag
    =VIS_OFF      Turn fill flag off
    =VIS_ON       Turn fill flag on
    
void vis_VisContextGetFill(vis_VisContext *p, Vint *fill)

get fill flag

See vis_VisContextSetFill()

void vis_VisContextSetEdge(vis_VisContext *p, Vint edge)

set edge flag

Set edge flag on or off. The edge flag determines whether or not the boundaries of certain visualization entities are drawn. By default edge is off.

Get edge as output argument using:

void vis_VisContextGetEdge (vis_VisContext *viscontext,
                            Vint *edge)

Access edge using:

vis_VisContextEdge (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • edge – Edge flag
    =VIS_OFF      Turn edge flag off
    =VIS_ON       Turn edge flag on
    
void vis_VisContextGetEdge(vis_VisContext *p, Vint *edge)

get edge flag

See vis_VisContextSetEdge()

void vis_VisContextSetSpot(vis_VisContext *p, Vint spot)

set spot flag

Set spot flag on or off. The spot flag determines whether or not the nodes or points of certain visualization entities are drawn. By default spot is off.

Get spot as output argument using:

void vis_VisContextGetSpot (vis_VisContext *viscontext,
                            Vint *spot)

Access spot using:

vis_VisContextSpot (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • spot – Spot flag
    =VIS_OFF      Turn spot flag off
    =VIS_ON       Turn spot flag on
    
void vis_VisContextGetSpot(vis_VisContext *p, Vint *spot)

get spot flag

See vis_VisContextSetSpot()

void vis_VisContextSetLineStyle(vis_VisContext *p, Vint linestyle)

set line style

Set line style or minor line style attribute. Line style affects most visualization displays. The minor line style is used for secondary lines in a visualization entity. By default linestyle is VIS_SOLID.

Get linestyle as output argument using:

void vis_VisContextGetLineStyle (vis_VisContext *viscontext,
                                 Vint *linestyle)
void vis_VisContextGetMinorLineStyle (vis_VisContext *viscontext,
                                      Vint *linestyle)

Access linestyle using:

vis_VisContextLineStyle (vis_VisContext *viscontext);
vis_VisContextMinorLineStyle (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper linestyle is specified.

Parameters:
  • p – Pointer to VisContext object.
  • linestyle – Line style
    =VIS_SOLID    Solid line
    =VIS_DASHDASH Dashed line
    =VIS_DOTDOT   Dotted line
    =VIS_DOTDASH  Dot dash line
    =VIS_CYLINDER Solid cylinder
    
void vis_VisContextGetLineStyle(vis_VisContext *p, Vint *linestyle)

get line style

See vis_VisContextSetLineStyle()

void vis_VisContextSetMinorLineStyle(vis_VisContext *p, Vint minorlinestyle)

set minor line style

Set line style or minor line style attribute. Line style affects most visualization displays. The minor line style is used for secondary lines in a visualization entity. By default minorlinestyle is VIS_SOLID.

Get minorlinestyle as output argument using:

void vis_VisContextGetLineStyle (vis_VisContext *viscontext,
                                 Vint *linestyle)
void vis_VisContextGetMinorLineStyle (vis_VisContext *viscontext,
                                      Vint *minorlinestyle)

Access minorlinestyle using:

vis_VisContextLineStyle (vis_VisContext *viscontext);
vis_VisContextMinorLineStyle (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper minorlinestyle is specified.

Parameters:
  • p – Pointer to VisContext object.
  • minorlinestyle – Line style
    =VIS_SOLID    Solid line
    =VIS_DASHDASH Dashed line
    =VIS_DOTDOT   Dotted line
    =VIS_DOTDASH  Dot dash line
    =VIS_CYLINDER Solid cylinder
    
void vis_VisContextGetMinorLineStyle(vis_VisContext *p, Vint *minorlinestyle)

get minor line style

See vis_VisContextSetMinorLineStyle()

void vis_VisContextSetLineWidth(vis_VisContext *p, Vint linewidth)

set line width

Set line width or minor line width attribute. Line width affects most visualization displays. The minor line width is used for secondary lines in a visualization entity. The line width is an integer multiplier applied to a single pixel wide line. For solid cylinder line styles, a unit width line has a radius equal to the Size visualization attribute (see vis_VisContextSize()). By default linewidth is 1.

Get linewidth as output argument using:

void vis_VisContextGetLineWidth (vis_VisContext *viscontext,
                                 Vint *linewidth)
void vis_VisContextGetMinorLineWidth (vis_VisContext *viscontext,
                                      Vint *linewidth)

Access linewidth using:

vis_VisContextLineWidth (vis_VisContext *viscontext);
vis_VisContextMinorLineWidth (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • linewidth – Line width multiplier
void vis_VisContextGetLineWidth(vis_VisContext *p, Vint *linewidth)

get line width

See vis_VisContextSetLineWidth()

void vis_VisContextSetMinorLineWidth(vis_VisContext *p, Vint minorlinewidth)

set line width

Set line width or minor line width attribute. Line width affects most visualization displays. The minor line width is used for secondary lines in a visualization entity. The line width is an integer multiplier applied to a single pixel wide line. For solid cylinder line styles, a unit width line has a radius equal to the Size visualization attribute (see vis_VisContextSize()). By default minorlinewidth is 1.

Get linewidth as output argument using:

void vis_VisContextGetLineWidth (vis_VisContext *viscontext,
                                 Vint *linewidth)
void vis_VisContextGetMinorLineWidth (vis_VisContext *viscontext,
                                      Vint *linewidth)

Access linewidth using:

vis_VisContextLineWidth (vis_VisContext *viscontext);
vis_VisContextMinorLineWidth (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • minorlinewidth – Line width multiplier
void vis_VisContextGetMinorLineWidth(vis_VisContext *p, Vint *minorlinewidth)

get minor line width

See vis_VisContextSetMinorLineWidth()

void vis_VisContextSetPointSize(vis_VisContext *p, Vint pointsize)

set point size

Set point size. Point size affects any visualization object which generates discrete point graphics primitives. The point size is an integer multiplier which is applied to a single pixel point. For example, a point size of 2 is meant to produce points which are 2 by 2 squares of pixels. By default pointsize is 1.

Get pointsize as output argument using:

void vis_VisContextGetPointSize (vis_VisContext *viscontext,
                                 Vint *pointsize)

Access pointsize using:

vis_VisContextPointSize (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • pointsize – Point size multiplier
void vis_VisContextGetPointSize(vis_VisContext *p, Vint *pointsize)

get point size

See vis_VisContextSetPointSize()

void vis_VisContextSetFormat(vis_VisContext *p, Vint format)

set format attribute

Set format attribute. This attribute is used to determine the format to be used whenever numbers are drawn, value displays, axis labels, etc. VIS_XFORMAT is used to indicate that the mantissa is to be displayed separately from the exponent in scientific floating point format. The exact nature of the display is module dependent. VIS_GFORMAT in addition to adaptively selecting fixed for floating point format also displays fewer significant digits. By default format is VIS_EFORMAT. Use VIS_E2FORMAT and VIS_E3FORMAT to control the number of digits in the exponent.

Get format as output argument using:

void vis_VisContextGetFormat (vis_VisContext *viscontext,
                              Vint *format)

Access format using:

vis_VisContextFormat (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper format is specified.

Parameters:
  • p – Pointer to VisContext object.
  • format – Format.
    =VIS_EFORMAT  Use scientific floating point format
    =VIS_E2FORMAT Use scientific floating point format
                  with minimum of 2 digits in exponent
    =VIS_E3FORMAT Use scientific floating point format
                  with minimum of 3 digits in exponent
    =VIS_FFORMAT  Use fixed floating point format
    =VIS_IFORMAT  Use integer format
    =VIS_GFORMAT  Use adaptive fixed or scientific floating
                  point format
    =VIS_XFORMAT  Use extended scientific floating point format
    
void vis_VisContextGetFormat(vis_VisContext *p, Vint *format)

get format attribute

See vis_VisContextSetFormat()

void vis_VisContextSetFrequency(vis_VisContext *p, Vint frequency)

set frequency attribute

Set frequency attribute. This attribute is an integer greater than or equal to zero. It is used in a general way to specify the number or frequency of occurrence of an item such as an axis label or contour line label. By default frequency is 0.

Get frequency as output argument using:

void vis_VisContextGetFrequency (vis_VisContext *viscontext,
                                 Vint *frequency)

Access frequency using:

vis_VisContextFrequency (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • frequency – Frequency
void vis_VisContextGetFrequency(vis_VisContext *p, Vint *frequency)

get frequency attribute

See vis_VisContextSetFrequency()

void vis_VisContextSetMarkerType(vis_VisContext *p, Vint markertype)

set marker type attribute

Set marker type attribute. Note that the point marker types, VIS_POINT, VIS_POINT2, etc. and circle marker types, VIS_CIRCLE3, VIS_CIRCLE5, etc. are not effected by size mapping. By default markertype is VIS_TRIANGLE.

Get markertype as output argument using:

void vis_VisContextGetMarkerType (vis_VisContext *viscontext,
                                  Vint *markertype)

Access markertype using:

vis_VisContextMarkerType (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper markertype is specified.

Parameters:
  • p – Pointer to VisContext object.
  • markertype – Marker type
    x=VIS_BOX                Filled box
     =VIS_CIRCLE             Circle
     =VIS_CIRCLE3            Circle, 3 pixel diameter
     =VIS_CIRCLE5            Circle, 5 pixel diameter
     =VIS_CIRCLE7            Circle, 7 pixel diameter
     =VIS_CIRCLE9            Circle, 9 pixel diameter
     =VIS_DOT                Filled Circle
     =VIS_DIAMOND            Diamond
     =VIS_HOURGLASS          Hourglass
     =VIS_METER              Meter
     =VIS_OCTAHEDRON         Filled octahedron
     =VIS_PLUSSIGN           Plus sign
     =VIS_POINT              Point, single pixel
     =VIS_POINT2             Point, 2 by 2 pixel square
     =VIS_POINT4             Point, 4 by 4 pixel square
     =VIS_SPHERE             Filled sphere
     =VIS_SQUARE             Square
     =VIS_TETRAHEDRON        Filled tetrahedron
     =VIS_TRIANGLE           Triangle
    
void vis_VisContextGetMarkerType(vis_VisContext *p, Vint *markertype)

get marker type attribute

See vis_VisContextSetMarkerType()

void vis_VisContextSetVectorType(vis_VisContext *p, Vint vectortype)

set vector type attribute

Set vector type attribute. This attribute is used by Mark objects, for example, to display vector and tensor markers. By default vectortype is VIS_VECTORLINE.

Get vectortype as output argument using:

void vis_VisContextGetVectorType (vis_VisContext *viscontext,
                                  Vint *vectortype)

Access vectortype using:

vis_VisContextVectorType (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper vectortype is specified.

Parameters:
  • p – Pointer to VisContext object.
  • vectortype – Vector type
    x=VIS_VECTORLINE         Vector line drawn 2D arrow
     =VIS_VECTORCYLINDER     Vector polygon drawn 3D arrow
     =VIS_VECTORUMBRELLA     Vector line drawn 2D tail and
                             polygon drawn 3D head.
    
void vis_VisContextGetVectorType(vis_VisContext *p, Vint *vectortype)

get vector type attribute

See vis_VisContextSetVectorType()

void vis_VisContextSetTensorType(vis_VisContext *p, Vint tensortype)

set tensor type attribute

Set tensor type attribute. This attribute is used only by Mark objects to display tensor “box” markers. Tensor markers are generally drawn as a composite of a tensor box and vector arrows which represent the direction and magnitude of the individual components of the tensor. Use vis_VisContextSetVectorType() to control the appearance of the vector arrows. By default tensortype is VIS_TENSORCUBE.

Get tensortype as output argument using:

void vis_VisContextGetTensorType (vis_VisContext *viscontext,
                                  Vint *tensortype)

Access tensortype using:

vis_VisContextTensorType (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper tensortype is specified.

Parameters:
  • p – Pointer to VisContext object.
  • tensortype – Tensor type
    x=VIS_TENSORCUBE         Tensor "box" is a cube
     =VIS_TENSORELLIPSOID    Tensor "box" is an ellipsoid
     =VIS_TENSORCROWSFEET    Tensor "box" is not drawn,
                             instead the component shear vector
                             icons are drawn bisecting the positive
                             quadrant of the shear plane.
    
void vis_VisContextGetTensorType(vis_VisContext *p, Vint *tensortype)

get tensor type attribute

See vis_VisContextSetTensorType()

void vis_VisContextSetIsoValType(vis_VisContext *p, Vint isovaltype)

set isovalue type attribute

Set isovalue type attribute. The isovalue type is used by Segment, Contour and Threshold objects to determine the method of display for isovalues. By default isovaltype is VIS_ISOVALPOINT.

Get isovaltype as output argument using:

void vis_VisContextGetIsoValType (vis_VisContext *viscontext,
                                  Vint *isovaltype)

Access isovaltype using:

vis_VisContextIsoValType (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper isovaltype is specified.

Parameters:
  • p – Pointer to VisContext object.
  • isovaltype – Isovalue type
    x=VIS_ISOVALPOINT        Draw points at isovalues
     =VIS_ISOVALLINE         Draw lines along isovalues
     =VIS_ISOVALSURFACE      Draw surfaces along isovalues
     =VIS_ISOVALVOLUME       Draw volumes bounding isovalues
     =VIS_ISOVALFRINGE       Draw constant color and transparency
                             fill between isovalues
     =VIS_ISOVALGOURAUD      Draw continuously varying color and
                             constant transparency fill
                             within an element or cell
     =VIS_ISOVALTONE         Draw continuously varying color and
                             constant transparency fill
                             between isovalues
     =VIS_ISOVALTEXTURE      Draw an element or cell by supplying
                             texture coordinates mapped to
                             scalar field values.
    
void vis_VisContextGetIsoValType(vis_VisContext *p, Vint *isovaltype)

get isovalue type attribute

See vis_VisContextSetIsoValType()

void vis_VisContextSetIsoValInterp(vis_VisContext *p, Vint isovalinterp)

set isovalue interpolation method

Set isovalue interpolation. The isovalue interpolation method is used by Segment, Contour and Threshold objects to determine the method of interpolation for the scalar field.

The value of VIS_INTERP_CLAMP uses shape function interpolation but will clamp all interpolated values to the input scalar values. This is useful in avoiding “overshoot” particularly in the case of contouring parabolic Serendipity quadrilaterals. By default isovalinterp is VIS_INTERP_SHAPE.

Get isovalinterp as output argument using:

void vis_VisContextGetIsoValInterp (vis_VisContext *viscontext,
                                    Vint *isovalinterp)

Access isovalinterp using:

vis_VisContextIsoValInterp (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper isovalinterp is specified.

Parameters:
  • p – Pointer to VisContext object.
  • isovalinterp – Isovalue interpolation method
    x=VIS_INTERP_SHAPE       Shape function interpolation
     =VIS_INTERP_CLAMP       Clamped shape function interpolation
    
void vis_VisContextGetIsoValInterp(vis_VisContext *p, Vint *isovalinterp)

get isovalue interpolation method

See vis_VisContextSetIsoValInterp()

void vis_VisContextSetStreamType(vis_VisContext *p, Vint streamtype)

set trace and stream type attribute

Set stream type attribute. This attribute is used only by Trace and Stream objects to display trace and stream lines. By default streamtype is VIS_STREAMLINE. Some stream types are applicable to tangent curve generation in tensor fields.

Get streamtype as output argument using:

void vis_VisContextGetStreamType (vis_VisContext *viscontext,
                                  Vint *streamtype)

Access streamtype using:

vis_VisContextStreamType (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper streamtype is specified.

Parameters:
  • p – Pointer to VisContext object.
  • streamtype – Stream type
    x=VIS_STREAMBOX          Stream box for tensor fields
     =VIS_STREAMELLIPSE      Stream ellipse for tensor fields
     =VIS_STREAMLINE         Streamline
     =VIS_STREAMPOINT        Series of points
     =VIS_STREAMRIBBON       Stream ribbon
     =VIS_STREAMTUBE         Stream tube
     =VIS_STREAMTWIST        Stream tube and ribbon
    
void vis_VisContextGetStreamType(vis_VisContext *p, Vint *streamtype)

get trace and stream type attribute

See vis_VisContextSetStreamType()

void vis_VisContextSetScale(vis_VisContext *p, Vfloat scale)

set scale factor

Set scale factor. The scale factor is a positive value which determines the amount to scale the coordinates of a visualization geometry. This attribute is used by the BeamElem and ShellElem objects, for example, to scale the beam section and shell walls when drawing beam and shell elements. By default scale is 1.

Get scale as output argument using:

void vis_VisContextGetScale (vis_VisContext *viscontext,
                             Vfloat *scale)

Access scale using:

vis_VisContextScale (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • scale – Scale factor
void vis_VisContextGetScale(vis_VisContext *p, Vfloat *scale)

get scale factor

See vis_VisContextSetScale()

void vis_VisContextSetShrink(vis_VisContext *p, Vfloat shrink)

set shrink factor

Set shrink factor. The shrink factor is a value in the interval [0.,1.] which determines the amount to shrink an element towards its centroid for visualization. A shrink factor of 0. results in no shrink. A shrink value of 1. shrinks objects to a point. This attribute is used by the BeamElem and ShellElem objects, for example, to draw beam and shell elements. By default shrink is 0.

Get shrink as output argument using:

void vis_VisContextGetShrink (vis_VisContext *viscontext,
                              Vfloat *shrink)

Access shrink using:

vis_VisContextShrink (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • shrink – Shrink factor
void vis_VisContextGetShrink(vis_VisContext *p, Vfloat *shrink)

get shrink factor

See vis_VisContextSetShrink()

void vis_VisContextSetShrinkType(vis_VisContext *p, Vint shrinktype)

set shrink type

Set shrink type. The shrink type is used by some visualization modules which draw element edges or faces to control the point about which shrink is applied. If the shrink type is VIS_SHRINKENTITY then the point about which shrink is applied is the center of the entity. If the shrink type is VIS_SHRINKELEMENT then the point about which shrink is applied is the center of the element to which the entity belongs. Set the shrink factor using vis_VisContextSetShrink(). By default shrinktype is VIS_SHRINKNONE.

Get shrinktype as output argument using:

void vis_VisContextGetShrinkType (vis_VisContext *viscontext,
                                  Vint *shrinktype)

Access shrinktype using:

vis_VisContextShrinkType (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • shrinktype – Shrink type
    x=VIS_SHRINKNONE         No shrink is performed
     =VIS_SHRINKENTITY       Perform shrink local to entity
     =VIS_SHRINKELEMENT      Perform shrink local to element
    
void vis_VisContextGetShrinkType(vis_VisContext *p, Vint *shrinktype)

get shrink type

See vis_VisContextSetShrinkType()

void vis_VisContextSetReflect(vis_VisContext *p, Vint reflect)

set reflect flag

Set reflect flag on or off. The reflect flag determines whether or not the sense of output polygons is reversed or not. This option is useful when applied to the Face and Contour modules to draw the “bottom” face of a shell element distinctly from the “top” face. Enable back face culling when drawing colocated top and bottom shell surfaces. By default reflect is off.

Get reflect as output argument using:

void vis_VisContextGetReflect (vis_VisContext *viscontext,
                               Vint *reflect)

Access reflect using:

vis_VisContextReflect (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • reflect – Reflect flag
void vis_VisContextGetReflect(vis_VisContext *p, Vint *reflect)

get reflect flag

See vis_VisContextSetReflect()

void vis_VisContextSetDraw(vis_VisContext *p, Vint draw)

set draw flag

Set draw flag on or off. If the draw flag is off, certain visualization objects will not generate graphics primitive functions. By default draw is on. This flag is meant to be used if a visualization object (eg. the Contour object) has been put into data interpolation or integration mode. In this case it may be desirable to inhibit the generation of graphics primitives if only data interpolation or integration functions are required.

Get draw as output argument using:

void vis_VisContextGetDraw (vis_VisContext *viscontext,
                            Vint *draw)

Access draw using:

vis_VisContextDraw (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • draw – Draw flag
    =VIS_OFF      Turn draw flag off
    =VIS_ON       Turn draw flag on
    
void vis_VisContextGetDraw(vis_VisContext *p, Vint *draw)

get draw flag

See vis_VisContextSetDraw()

void vis_VisContextSetFlags(vis_VisContext *p, Vint flags)

set miscellaneous flags

Set flags. The flags argument is generated by ORing a set of symbolic constants which are specific to a given visualization object. By default flags is 0.

Get flags as output argument using:

void vis_VisContextGetFlags (vis_VisContext *viscontext,
                             Vint *flags)

Access flags using:

vis_VisContextFlags (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • flags – ORed flags which are specific to a given visualization object
void vis_VisContextGetFlags(vis_VisContext *p, Vint *flags)

get miscellaneous flags

See vis_VisContextSetFlags()

void vis_VisContextSetTextBox(vis_VisContext *p, Vint dx, Vint dy)

set size of character text box

Set the width and height of a single raster text character box. If a proportionately spaced font is used then set the text box dimensions to the width and height of the largest character(s). This attribute is used by Value objects to size value brackets and background fill. By default dx is 9 and dy is 13.

Get dx and dy as output arguments using:

void vis_VisContextGetTextBox (vis_VisContext *viscontext,
                               Vint *dx,
                               Vint *dy)

Access dx and dy respectively using:

vis_VisContextXTextBox (vis_VisContext *viscontext);
vis_VisContextYTextBox (vis_VisContext *viscontext);

Errors
VIS_ERROR_VALUE is generated if either dx or dy less than or equal to zero is specified.

Parameters:
  • p – Pointer to VisContext object.
  • dx – Width of single character text box in device coordinates (pixels).
  • dy – Height of single character text box in device coordinates (pixels).
void vis_VisContextGetTextBox(vis_VisContext *p, Vint *dx, Vint *dy)

get size of character text box

See vis_VisContextSetTextBox()

void vis_VisContextSetDeviceOffset(vis_VisContext *p, Vint dx, Vint dy)

set offset in device coordinates

Set device offset attribute. The device offset attribute is used to specify an offset in device coordinates to be used with visualization entities which are drawn with device coordinate style (DC) drawing functions. The offset is useful to finely control the positioning of such graphics primitives with respect to the world coordinate anchor point. By default dx is 0 and dy is 0.

Get dx and dy as output arguments using:

void vis_VisContextGetDeviceOffset (vis_VisContext *viscontext,
                                    Vint *dx,
                                    Vint *dy)

Access dx and dy respectively using:

vis_VisContextXDeviceOffset (vis_VisContext *viscontext);
vis_VisContextYDeviceOffset (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • dx – Horizontal offset in device coordinates (pixels).
  • dy – Vertical offset in device coordinates (pixels).
void vis_VisContextGetDeviceOffset(vis_VisContext *p, Vint *dx, Vint *dy)

get offset in device coordinates

See vis_VisContextSetDeviceOffset()

void vis_VisContextSetProject(vis_VisContext *p, Vint project)

set projection type

Set the projection type to be performed upon certain visualization entities. If the view plane projection is VIS_ON, then 3D visualization entities are generated in the viewing plane to ensure a particular orientation and then projected back to world coordinates. This type of projection requires that the XfmMatrix (modelview matrix) is set using vis_VisContextSetXfmMatrix(). By default viewplane projection is VIS_OFF.

Get project as output argument using:

void vis_VisContextGetProject (vis_VisContext *viscontext,
                               Vint *project)

Access project using:

vis_VisContextProject (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • project – Projection type
    =VIS_OFF      Turn view plane projection flag off
    =VIS_ON       Turn view plane projection flag on
    
void vis_VisContextGetProject(vis_VisContext *p, Vint *project)

get projection type

See vis_VisContextSetProject()

void vis_VisContextSetDeviceSize(vis_VisContext *p, Vint devicesize)

set size in device coordinates

Set device size attribute. The device size attribute is used to specify the size in device coordinates of various visualization entities. The device size is expressed in pixels. The device size is multiplied by the current Size and MinorSize visualization contexts. It is used only if the SizeType visualization context is set to VIS_SIZEDEVICE. Use vis_VisContextSetSizeType() to set the size type. If size mapping is on, then field value is mapped to size where devicesize represents the size of the visualization entity at maximum field value. Note that the device size is scaled by the size and minor size values set by vis_VisContextSetSize() and vis_VisContextSetMinorSize(). By default devicesize is 50.

In order to compute the proper device coordinate sizing, the XfmMatrix, ProjMatrix and Viewport visualization contexts are required. These components should reflect the current state of the graphics device.

Get devicesize as output argument using:

void vis_VisContextGetDeviceSize (vis_VisContext *viscontext,
                                  Vint *devicesize)

Access devicesize using:

vis_VisContextDeviceSize (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • devicesize – Size in device coordinates
void vis_VisContextGetDeviceSize(vis_VisContext *p, Vint *devicesize)

get size in device coordinates

See vis_VisContextSetDeviceSize()

void vis_VisContextSetSizeType(vis_VisContext *p, Vint sizetype)

set size type

Set size type attribute. By default sizetype is VIS_SIZEWORLD.

If the size type is VIS_SIZEWORLD then visualization entities are sized using a world coordinate size specified by the Size visualization context set using vis_VisContextSetSize().

If the size type is VIS_SIZEDEVICE then visualization entities are sized using a device coordinate size specified by the DeviceSize visualization context set using vis_VisContextSetDeviceSize(). Note that the device size is scaled by the size and minor size values set by vis_VisContextSetSize() and vis_VisContextSetMinorSize(). In order to compute the proper device coordinate sizing, the XfmMatrix, ProjMatrix and Viewport visualization contexts are required. These components should reflect the current state of the graphics device.

Get sizetype as output argument using:

void vis_VisContextGetSizeType (vis_VisContext *viscontext,
                                Vint *sizetype)

Access sizetype using:

vis_VisContextSizeType (vis_VisContext *viscontext);

Errors
VIS_ERROR_ENUM is generated if an improper sizetype is specified.

Parameters:
  • p – Pointer to VisContext object.
  • sizetype – Size type
    x=VIS_SIZEWORLD          Size to world coordinate
     =VIS_SIZEDEVICE         Size to device coordinates
    
void vis_VisContextGetSizeType(vis_VisContext *p, Vint *sizetype)

get size type

See vis_VisContextSetSizeType()

void vis_VisContextSetElemRep(vis_VisContext *p, Vint elemrep)

set element representation type

Set element representation. This attribute is used by the BeamElem and ShellElem objects, for example, to determine the graphical style in which features of the element are represented. The representation used to display an element affects the visual quality and the speed of drawing. By default elemrep is VIS_ELEMREP_LINE.

Get elemrep as output argument using:

void vis_VisContextGetElemRep (vis_VisContext *viscontext,
                               Vint *elemrep)

Access elemrep using:

vis_VisContextElemRep (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • elemrep – Element representation
    x=VIS_ELEMREP_LINE       Line
     =VIS_ELEMREP_SEMI       Line and solid combination
     =VIS_ELEMREP_SOLID      Solid
     =VIS_ELEMREP_BITMAP     Bitmap
     =VIS_ELEMREP_PIXMAP     Colored bitmap
     =VIS_ELEMREP_VALUE      Value
    
void vis_VisContextGetElemRep(vis_VisContext *p, Vint *elemrep)

vis_VisContextGetElemRep

See vis_VisContextSetElemRep()

void vis_VisContextSetElemLoc(vis_VisContext *p, Vint elemloc)

set element locations

Set element location. This attribute is used by the BeamElem and ShellElem objects, for example, to determine the locations at which element coordinate systems are drawn. By default elemloc is VIS_ELEMLOC_CENTROID.

Get elemloc as output argument using:

void vis_VisContextGetElemLoc (vis_VisContext *viscontext,
                               Vint *elemloc)

Access elemloc using:

vis_VisContextElemLoc (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • elemloc – Element location
    x=VIS_ELEMLOC_CENTROID   Element centroid
     =VIS_ELEMLOC_CORNERS    Element corners
     =VIS_ELEMLOC_NODES      Element nodes
    
void vis_VisContextGetElemLoc(vis_VisContext *p, Vint *elemloc)

get element locations

See vis_VisContextSetElemLoc()

void vis_VisContextSetElemAxes(vis_VisContext *p, Vint elemaxes)

set element axes flags

Set element axes flags. Element axes are drawn in the direction of the local element Cartesian coordinate system. The element axes can be drawn in any combination of the element local x,y and z directions by OR’ing the VIS_ELEMAXES_X, VIS_ELEMAXES_Y and VIS_ELEMAXES_Z flags together. This attribute is used by the BeamElem and ShellElem objects, for example, to draw the element local coordinate systems. By default elemaxes is VIS_ELEMAXES_NONE.

Get elemaxes as output argument using:

vis_VisContextGetElemAxes (vis_VisContext *viscontext,
                           Vint *elemaxes)

Access elemaxes using:

vis_VisContextElemAxes (vis_VisContext *viscontext);

Parameters:
  • p – Pointer to VisContext object.
  • elemaxes – Element axes flags.
    x=VIS_ELEMAXES_NONE      No element axes drawn
     =VIS_ELEMAXES_XYZ       Draw x,y,z axes
     =VIS_ELEMAXES_X         Draw x axis
     =VIS_ELEMAXES_Y         Draw y axis
     =VIS_ELEMAXES_Z         Draw z axis
    
void vis_VisContextGetElemAxes(vis_VisContext *p, Vint *elemaxes)

get element axes flags

See vis_VisContextSetElemAxes()

void vis_VisContextSetXfmMatrix(vis_VisContext *p, Vfloat xfmmatrix[4][4])

set the graphics modelview matrix

Set the modelview transformation. The graphics modelview transformation is required for device coordinate sizing. The sizing type is set using vis_VisContextSetSizeType() The modelview matrix is also used for viewplane projections which are enabled using vis_VisContextProject(). The default modelview matrix is the identity matrix

Get xfmmatrix as output argument using:

void vis_VisContextGetXfmMatrix (vis_VisContext *viscontext,
                                 Vfloat xfmmatrix[4][4])

Parameters:
  • p – Pointer to VisContext object.
  • xfmmatrix – The 4x4 modelview matrix
void vis_VisContextGetXfmMatrix(vis_VisContext *p, Vfloat mtm[4][4])

get the graphics modelview matrix

See vis_VisContextSetXfmMatrix()

void vis_VisContextSetProjMatrix(vis_VisContext *p, Vfloat projmatrix[4][4])

set the graphics projection matrix

Set the projection transformation. The graphics projection transformation is required for device coordinate sizing. The sizing type is set using vis_VisContextSetSizeType() The default projection matrix is the identity matrix

Get projmatrix as output argument using:

void vis_VisContextGetProjMatrix (vis_VisContext *viscontext,
                                  Vfloat projmatrix[4][4])

Parameters:
  • p – Pointer to VisContext object.
  • projmatrix – The 4x4 projection matrix
void vis_VisContextGetProjMatrix(vis_VisContext *p, Vfloat ptm[4][4])

get the graphics projection matrix

See vis_VisContextSetProjMatrix()

void vis_VisContextSetViewport(vis_VisContext *p, Vint left, Vint right, Vint bottom, Vint top)

set the graphics viewport

Set the viewport transformation. The graphics viewport is required for device coordinate sizing. The sizing type is set using vis_VisContextSetSizeType() The default viewport is 0, 100, 0, 100.

Get right, left, bottom and top as output arguments using:

void vis_VisContextGetViewport (vis_VisContext *viscontext,
                                Vint *left, Vint *right,
                                Vint *bottom, Vint *top)

Parameters:
  • p – Pointer to VisContext object.
  • left – Device coordinates of left planes of viewport
  • right – Device coordinates of right planes of viewport
  • bottom – Device coordinates of bottom planes of viewport
  • top – Device coordinates of top planes of viewport
void vis_VisContextGetViewport(vis_VisContext *p, Vint *left, Vint *right, Vint *bottom, Vint *top)

get the graphics viewport

See vis_VisContextSetViewport()

void vis_VisContextCopy(vis_VisContext *p, vis_VisContext *fromp)

make a copy of a VisContext object

See vis_VisContextBegin()

vis_VisContextBitmapSize(x)

access bitmapsize

See vis_VisContextSetBitmapSize()

vis_VisContextColor(x)

access color

See vis_VisContextSetColor()

vis_VisContextMinorColor(x)

access color

See vis_VisContextSetMinorColor()

vis_VisContextAColor(x)

access acolor

See vis_VisContextSetABCColor()

vis_VisContextBColor(x)

access bcolor

See vis_VisContextSetABCColor()

vis_VisContextCColor(x)

access ccolor

See vis_VisContextSetABCColor()

vis_VisContextXColor(x)

access x color attribute

See vis_VisContextSetXYZColor()

vis_VisContextYColor(x)

access y color attribute

See vis_VisContextSetXYZColor()

vis_VisContextZColor(x)

access z color attribute

See vis_VisContextSetXYZColor()

vis_VisContextMapColor(x)

access color mapping flag

See vis_VisContextSetMapColor()

vis_VisContextTrans(x)

access transparency attribute

See vis_VisContextSetTrans()

vis_VisContextMapTrans(x)

access transparency mapping flag

See vis_VisContextSetMapTrans()

vis_VisContextRatio(x)

access ratio

See vis_VisContextSetRatio()

vis_VisContextSize(x)

access size attribute

See vis_VisContextSetSize()

vis_VisContextMinorSize(x)

access minor size

See vis_VisContextSetMinorSize()

vis_VisContextMapSize(x)

access size mapping flag

See vis_VisContextSetMapSize()

vis_VisContextComponent(x)

access component

See vis_VisContextSetComponent()

vis_VisContextShade(x)

access light source shading attribute

See vis_VisContextSetShade()

vis_VisContextRefinement(x)

access order of refinement attribute

See vis_VisContextSetRefinement()

vis_VisContextPrimType(x)

access suggested primitive type

See vis_VisContextSetPrimType()

vis_VisContextUnitTol(x)

access unit tolerance

See vis_VisContextSetUnitTol()

vis_VisContextDistTol(x)

access distance tolerance

See vis_VisContextSetDistTol()

vis_VisContextPosition(x)

access position or direction attribute

See vis_VisContextSetPosition()

vis_VisContextFill(x)

access fill flag

See vis_VisContextSetFill()

vis_VisContextEdge(x)

access edge flag

See vis_VisContextSetEdge()

vis_VisContextSpot(x)

access spot flag

See vis_VisContextSetSpot()

vis_VisContextLineStyle(x)

access line style

See vis_VisContextSetLineStyle()

vis_VisContextMinorLineStyle(x)

access minorline style

See vis_VisContextSetMinorLineStyle()

vis_VisContextLineWidth(x)

access line style

See vis_VisContextSetLineWidth()

vis_VisContextMinorLineWidth(x)

access minor line style

See vis_VisContextSetMinorLineWidth()

vis_VisContextPointSize(x)

access point size

See vis_VisContextSetPointSize()

vis_VisContextFormat(x)

access format attribute

See vis_VisContextSetFormat()

vis_VisContextFrequency(x)

access frequency attribute

See vis_VisContextSetFrequency()

vis_VisContextMarkerType(x)

access marker type attribute

See vis_VisContextSetMarkerType()

vis_VisContextVectorType(x)

access vector type attribute

See vis_VisContextSetVectorType()

vis_VisContextTensorType(x)

access tensor type attribute

See vis_VisContextSetTensorType()

vis_VisContextIsoValType(x)

access isovalue type attribute

See vis_VisContextSetIsoValType()

vis_VisContextIsoValInterp(x)

access isovalue interpolation method

See vis_VisContextSetIsoValInterp()

vis_VisContextStreamType(x)

access trace and stream type attribute

See vis_VisContextSetStreamType()

vis_VisContextScale(x)

access scale factor

See vis_VisContextSetScale()

vis_VisContextShrink(x)

access shrink factor

See vis_VisContextSetShrink()

vis_VisContextShrinkType(x)

access shrink type

See vis_VisContextSetShrinkType()

vis_VisContextReflect(x)

access reflect flag

See vis_VisContextSetReflect()

vis_VisContextDraw(x)

access draw flag

See vis_VisContextSetDraw()

vis_VisContextFlags(x)

access miscellaneous flags

See vis_VisContextSetFlags()

vis_VisContextXTextBox(x)

access size of character text box

See vis_VisContextSetTextBox()

vis_VisContextYTextBox(x)

access size of character text box

See vis_VisContextSetTextBox()

vis_VisContextXDeviceOffset(x)

access offset in device coordinates

See vis_VisContextSetDeviceOffset()

vis_VisContextYDeviceOffset(x)

access offset in device coordinates

See vis_VisContextSetDeviceOffset()

vis_VisContextProject(x)

access projection type

See vis_VisContextSetProject()

vis_VisContextDeviceSize(x)

access device size

See vis_VisContextSetDeviceSize()

vis_VisContextSizeType(x)

access size type

See vis_VisContextSetSizeType()

vis_VisContextElemRep(x)

access element representation type

See vis_VisContextSetElemRep()

vis_VisContextElemLoc(x)

access element locations

See vis_VisContextSetElemLoc()

vis_VisContextElemAxes(x)

access element axes

See vis_VisContextSetElemAxes()