Table of Contents

2. Attributes - CoordSys,Units,VisContext

Currently there are three 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.

Table of Contents

2.1 Coordinate System - CoordSys

The CoordSys object is used to define Cartesian, cylindrical, spherical and toroidal coordinate systems. The systems are defined given an origin and orientation relative to the global coordinate system. The methods associated with a CoordSys object are the following.

Instance a CoordSys object using vis_CoordSysBegin. Once a CoordSys object is instanced, define the coordinate system type using vis_CoordSysDef. Coordinate system types include Cartesian, cylindrical, toroidal and two variations of spherical systems. After the coordinate system type is defined then set the coordinate system origin and orientation direction cosine matrix using vis_CoordSysSetOriginTriad. If the user is only concerned with the orientation of the z axis then use vis_CoordSysSetOriginZAxis. In this case the directions of the x and y axes will be automatically generated.

The following convention for the direction cosine matrices of a local coordinate system is used. Given that x',y' and z' are three orthonormal vectors indicating the direction of the local coordinate axes in the global coordinate system (x,y,z), then the direction cosine matrix, tm for this local coordinate system is defined as:

     tm[0][0] = x'x  tm[0][1] = x'y  tm[0][2] = x'z
     tm[1][0] = y'x  tm[1][1] = y'y  tm[1][2] = y'z
     tm[2][0] = z'x  tm[2][1] = z'y  tm[2][2] = z'z
where y'x, for example, is the global x coordinate of the y' unit vector.

Note that all CoordSys functions involving floating point data have both single and double precision versions. The single precision versions are provided for convenience, all floating point data is held internally in the CoordSys object in double precision.

The orientation of the coordinate system is specified by a direction cosine matrix which defines a local x',y',z' rectangular system in global coordinate space. The coordinate system is aligned to the x',y',z' system. Note that all angles are in degrees.

Figure 2-1 illustrates the coordinate system conventions. Use the Triad object to draw coordinate systems.


Figure 2-1, Coordinate System Conventions
The functions vis_CoordSysConvertVector, vis_CoordSysConvertTensor and vis_CoordSysConvertMatrix may be used to convert a vector, tensor or general tensor at a point P expressed in the global Cartesian system to a local Cartesian system which is dependent upon the coordinate location of P. The functions vis_CoordSysComputeVector, vis_CoordSysComputeTensor and vis_CoordSysComputeMatrix perform the inverse transformation. See section VisTools, Mathematical Data Types for a description of ordering conventions for the components of vectors, tensors and general tensors. The local Cartesian system at point P may be computed using vis_CoordSysDirCos.

The function vis_CoordSysDirCos may be used to compute the direction cosine matrix of a local Cartesian coordinate system at a point. Figure 2-2 illustrates the local Cartesian direction cosine matrix x'',y'',z'' computed at a point P within a cylindrical coordinate system. The x'' local axis is in the radial direction at P, the y'' local axis is in the tangential direction at P and the z'' axis is in the axial direction. The equivalent, rotation angle vector representation of the local Cartesion system at point P may be computed using vis_CoordSysRotAng. This rotation angle vector may be converted to a direction cosine matrix using the Rodrigues formula. It is a vector whose direction is the axis of rotation and whose magnitude is the rotation angle in degrees.


Figure 2-2, Local Cartesian Direction Cosine Matrix
The function vis_CoordSysConvertCoord may be used to convert a coordinate location expressed in global Cartesian coordinates to the coordinate system type. This operation involves subtracting the offset of the coordinate system origin and converting to the coordinate sytem type. For cylindrical, alternate cylindrical, spherical, alternate spherical and toroidal systems the coordinates are converted to (r,theta,z'), (z',theta,r), (r,theta,phi) (r,theta,phi) and (r,theta,phi) respectively. The function vis_CoordSysComputeCoord performs the inverse operation.

Table of Contents

2.2 Function Descriptions

The currently available CoordSys functions are described in detail in this section.


Table of Contents , CoordSys

NAME

*vis_CoordSysBegin - create an instance of a CoordSys object

C SPECIFICATION

vis_CoordSys *vis_CoordSysBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created CoordSys object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a CoordSys object. Memory is allocated for the object private data and the pointer to the data is returned. By default the coordinate system type is Cartesian, the identifier is 0, the origin is 0.,0.,0. and the orientation direction cosine matrix is the identity matrix.

Destroy an instance of a CoordSys object using

     void vis_CoordSysEnd (vis_CoordSys *coordsys)

Return the current value of a CoordSys object error flag using

     Vint vis_CoordSysError (vis_CoordSys *coordsys)

Make a copy of a CoordSys object. The private data from the fromcoordsys object is copied to the coordsys object. Any previous private data in coordsys is lost.

     void vis_CoordSysCopy (vis_CoordSys *coordsys,
                            vis_CoordSys *fromcoordsys)


Table of Contents , CoordSys

NAME

vis_CoordSysDef - define a coordinate system type

C SPECIFICATION

void vis_CoordSysDef (vis_CoordSys *coordsys,
                      Vint type)

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
type         Coordinate system type.
             =SYS_CARTESIAN          Cartesian system
             =SYS_CYLINDRICAL        Cylindrical system
             =SYS_CYLINDRICAL_ALT    Cylindrical alternalte system
             =SYS_SPHERICAL          Spherical system
             =SYS_SPHERICAL_ALT      Spherical alternate system
             =SYS_TOROIDAL           Toroidal system

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Define the coordinate system type. Set the origin and orientation of the system using vis_CoordSysSetOriginTriad, vis_CoordSysSetOriginRotAng. vis_CoordSysSetOriginVectors or vis_CoordSysSetOriginZAxis. Set the radius of a toroidal system using vis_CoordSysSetRadius.

Inquire of defined type as an output argument.

     void vis_CoordSysInq (vis_CoordSys *coordsys,
                           Vint *type)


Table of Contents , CoordSys

NAME

vis_CoordSysComputeCoord - compute coordinates in global system

C SPECIFICATION

void vis_CoordSysComputeCoord (vis_CoordSys *coordsys,
                               Vfloat xl[3],
                               Vfloat x[3])

void vis_CoordSysComputeCoorddv (vis_CoordSys *coordsys,
                                 Vdouble xl[3],
                                 Vdouble x[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
xl           Local coordinates

OUTPUT ARGUMENTS

x            Global coordinates

DESCRIPTION

Compute global coordinate location, x, of a point, xl, expressed in local coordinates. Use vis_CoordSysConvertCoord to perform the inverse operation.


Table of Contents , CoordSys

NAME

vis_CoordSysComputeVector - compute vector in global system

C SPECIFICATION

void vis_CoordSysComputeVector (vis_CoordSys *coordsys,
                                Vfloat x[3],
                                Vfloat vl[3],
                                Vfloat v[3])

void vis_CoordSysComputeVectordv (vis_CoordSys *coordsys,
                                  Vdouble x[3],
                                  Vdouble vl[3],
                                  Vdouble v[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinate location
vl           Vector in local coordinates

OUTPUT ARGUMENTS

v            Vector in global coordinates

DESCRIPTION

Compute a vector, v, expressed in global coordinates given the vector, vl expressed in local coordinates at global coordinate location x.


Table of Contents , CoordSys

NAME

vis_CoordSysComputeTensor - compute tensor in global system

C SPECIFICATION

void vis_CoordSysComputeTensor (vis_CoordSys *coordsys,
                                Vfloat x[3],
                                Vfloat tl[6],
                                Vfloat t[6])

void vis_CoordSysComputeTensordv (vis_CoordSys *coordsys,
                                  Vdouble x[3],
                                  Vdouble tl[6],
                                  Vdouble t[6])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinate location
tl           Tensor in local coordinates

OUTPUT ARGUMENTS

t            Tensor in global coordinates

DESCRIPTION

Compute a symmetric tensor, t, expressed in global coordinates given the tensor, tl expressed in local coordinates at global coordinate location x.


Table of Contents , CoordSys

NAME

vis_CoordSysComputeMatrix - compute general tensor in global system

C SPECIFICATION

void vis_CoordSysComputeMatrix (vis_CoordSys *coordsys,
                                Vfloat x[3],
                                Vfloat gl[9],
                                Vfloat g[9])

void vis_CoordSysComputeMatrixdv (vis_CoordSys *coordsys,
                                  Vdouble x[3],
                                  Vdouble gl[9],
                                  Vdouble g[9])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinate location
gl           General tensor in local coordinates

OUTPUT ARGUMENTS

g            General tensor in global coordinates

DESCRIPTION

Compute a general tensor, g, expressed in global coordinates given the general tensor, gl expressed in local coordinates at global coordinate location x.


Table of Contents , CoordSys

NAME

vis_CoordSysConvertCoord - convert coordinates to local system

C SPECIFICATION

void vis_CoordSysConvertCoord (vis_CoordSys *coordsys,
                               Vfloat x[3],
                               Vfloat xl[3])

void vis_CoordSysConvertCoorddv (vis_CoordSys *coordsys,
                                 Vdouble x[3],
                                 Vdouble xl[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinates

OUTPUT ARGUMENTS

xl           Local coordinates

DESCRIPTION

Convert global coordinate location, x, to local coordinates xl. Use vis_CoordSysComputeCoord to perform the inverse operation.


Table of Contents , CoordSys

NAME

vis_CoordSysConvertVector - convert vector to local system

C SPECIFICATION

void vis_CoordSysConvertVector (vis_CoordSys *coordsys,
                                Vfloat x[3],
                                Vfloat v[3],
                                Vfloat vl[3])

void vis_CoordSysConvertVectordv (vis_CoordSys *coordsys,
                                  Vdouble x[3],
                                  Vdouble v[3],
                                  Vdouble vl[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinate location
v            Vector in global coordinates

OUTPUT ARGUMENTS

vl           Vector in local coordinates

DESCRIPTION

Convert a vector, v, expressed in global coordinates at global coordinate location x to the vector, vl expressed in local coordinates. Use vis_CoordSysComputeVector to perform the inverse operation.


Table of Contents , CoordSys

NAME

vis_CoordSysConvertTensor - convert tensor to local system

C SPECIFICATION

void vis_CoordSysConvertTensor (vis_CoordSys *coordsys,
                                Vfloat x[3],
                                Vfloat t[6],
                                Vfloat tl[6])

void vis_CoordSysConvertTensordv (vis_CoordSys *coordsys,
                                  Vdouble x[3],
                                  Vdouble t[6],
                                  Vdouble tl[6])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinate location
t            Tensor in global coordinates

OUTPUT ARGUMENTS

tl           Tensor in local coordinates

DESCRIPTION

Convert a symmetric tensor, t, expressed in global coordinates at global coordinate location x to the tensor, tl expressed in local coordinates. Use vis_CoordSysComputeTensor to perform the inverse operation.


Table of Contents , CoordSys

NAME

vis_CoordSysConvertMatrix - convert general tensor to local system

C SPECIFICATION

void vis_CoordSysConvertMatrix (vis_CoordSys *coordsys,
                                Vfloat x[3],
                                Vfloat g[9],
                                Vfloat gl[9])

void vis_CoordSysConvertMatrixdv (vis_CoordSys *coordsys,
                                  Vdouble x[3],
                                  Vdouble g[9],
                                  Vdouble gl[9])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Global coordinate location
g            General tensor in global coordinates

OUTPUT ARGUMENTS

gl           General tensor in local coordinates

DESCRIPTION

Convert a general tensor, g, expressed in global coordinates at global coordinate location x to the general tensor, gl expressed in local coordinates. Use vis_CoordSysComputeMatrix to perform the inverse operation.


Table of Contents , CoordSys

NAME

vis_CoordSysDirCos - compute direction cosine matrix

C SPECIFICATION

void vis_CoordSysDirCos (vis_CoordSys *coordsys,
                         Vfloat x[3],
                         Vfloat tm[3][3])

void vis_CoordSysDirCosdv (vis_CoordSys *coordsys,
                           Vdouble x[3],
                           Vdouble tm[3][3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Origin of coordinate system in global coordinates.

OUTPUT ARGUMENTS

tm           Direction cosine matrix of system local axis.

DESCRIPTION

Compute the direction cosine matrix, tm, associated with a specified global coordinate location x. For Cartesian systems, tm is independent of location x and is aligned exactly with the system x',y',z' axes. For cylindrical systems, the x local axis is in the radial direction at x, the y local axis is in the tangential direction and the z local axis is in the axial direction. For spherical systems, the x local axis is in the radial direction at x, the y local axis is in the tangential direction and the z local axis is constructed to be orthonormal to the x local and y local axes. If x is located at the coordinate system origin, then the direction cosine matrix, tm, is always aligned to the system x',y',z' axes. For toroidal systems, the x local axis is in the radial direction at x, the y local axis is in the tangential direction and the z local axis is constructed to be orthonormal to the x local and y local axes.


Table of Contents , CoordSys

NAME

vis_CoordSysRotAng - compute rotation angle vector

C SPECIFICATION

void vis_CoordSysRotAng (vis_CoordSys *coordsys,
                         Vfloat x[3],
                         Vfloat ra[3])

void vis_CoordSysRotAngdv (vis_CoordSys *coordsys,
                           Vdouble x[3],
                           Vdouble ra[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Origin of coordinate system in global coordinates.

OUTPUT ARGUMENTS

ra           Rotation angle vector of system local axes.

DESCRIPTION

Compute the rotation angle vector, ra, associated with a specified global coordinate location x. This is a compact rotation angle vector using the Rodriques formula which is equivalent to the direction cosine matrix computed using vis_CoordSysDirCos.


Table of Contents , CoordSys

NAME

vis_CoordSysOriginTriad - query origin and orientation

C SPECIFICATION

void vis_CoordSysOriginTriad (vis_CoordSys *coordsys,
                              Vfloat x[3],
                              Vfloat tm[3][3])
void vis_CoordSysOriginTriaddv (vis_CoordSys *coordsys,
                                Vdouble x[3],
                                Vdouble tm[3][3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.

OUTPUT ARGUMENTS

x            Origin of coordinate system in global coordinates.
tm           Direction cosine matrix of system local axis.

DESCRIPTION

Query the coordinate system origin, x in global coordinates and the system orientation, tm.


Table of Contents , CoordSys

NAME

vis_CoordSysOriginRotAng - query origin and orientation

C SPECIFICATION

void vis_CoordSysOriginRotAng (vis_CoordSys *coordsys,
                               Vfloat x[3],
                               Vfloat rotang[3])
void vis_CoordSysOriginRotAngdv (vis_CoordSys *coordsys,
                                 Vdouble x[3],
                                 Vdouble rotang[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.

OUTPUT ARGUMENTS

x            Origin of coordinate system in global coordinates.
rotang       Rotation angle vector of system local axis.

DESCRIPTION

Query the coordinate system origin, x in global coordinates and the system orientation as a rotation angle vector, rotang.


Table of Contents , CoordSys

NAME

vis_CoordSysSetOriginRotAng - specify origin and angle orientation

C SPECIFICATION

void vis_CoordSysSetOriginRotAng (vis_CoordSys *coordsys,
                                  Vfloat x[3],
                                  Vfloat ra[3])
void vis_CoordSysSetOriginRotAngdv (vis_CoordSys *coordsys,
                                    Vdouble x[3],
                                    Vdouble ra[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Origin of coordinate system in global coordinates.
ra           Rotation angle vector of system local axes.

OUTPUT ARGUMENTS

None

DESCRIPTION

Specify the coordinate system origin, x in global coordinates and the system orientation using the rotation angle vector, ra.


Table of Contents , CoordSys

NAME

vis_CoordSysSetOriginTriad - specify origin and orientation

C SPECIFICATION

void vis_CoordSysSetOriginTriad (vis_CoordSys *coordsys,
                                 Vfloat x[3],
                                 Vfloat tm[3][3])
void vis_CoordSysSetOriginTriaddv (vis_CoordSys *coordsys,
                                   Vdouble x[3],
                                   Vdouble tm[3][3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Origin of coordinate system in global coordinates.
tm           Direction cosine matrix of system local axis.

OUTPUT ARGUMENTS

None

DESCRIPTION

Specify the coordinate system origin, x in global coordinates and the system orientation, tm. The direction cosine matrix, tm, should be a proper orthonormal rotation matrix. No check is performed by the CoordSys object on the validity of the input tm.


Table of Contents , CoordSys

NAME

vis_CoordSysSetOriginVectors - specify origin and vector orientation

C SPECIFICATION

void vis_CoordSysSetOriginVectors (vis_CoordSys *coordsys,
                                   Vfloat x[3],
                                   Vfloat v1[3], Vfloat v2[3])
void vis_CoordSysSetOriginVectorsdv (vis_CoordSys *coordsys,
                                     Vdouble x[3],
                                     Vdouble v1[3], Vdouble v2[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Origin of coordinate system in global coordinates.
v1           Vector along x' axis.
v2           Vector in x'-y' plane.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_COMPUTE is generated if the input vectors do not form a valid plane.

DESCRIPTION

Specify the coordinate system origin, x in global coordinates and the system as two vectors, v1 and v2. The two vectors must form a valid x'-y' plane.


Table of Contents , CoordSys

NAME

vis_CoordSysSetOriginZAxis - specify origin and z axis orientation

C SPECIFICATION

void vis_CoordSysSetOriginZAxis (vis_CoordSys *coordsys,
                                 Vfloat x[3],
                                 Vfloat zv[3])
void vis_CoordSysSetOriginZAxisdv (vis_CoordSys *coordsys,
                                   Vdouble x[3],
                                   Vdouble zv[3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
x            Origin of coordinate system in global coordinates.
zv           Vector of system local z axis.

OUTPUT ARGUMENTS

None

DESCRIPTION

Specify the coordinate system origin, x in global coordinates and the system z axis direction vector, zv. The direction vector, zv, should be a unit vector. The orientations of the x and y axes are computed internally. This function is useful if only the z axis orientation of the system is critical. No check is performed by the CoordSys object on the validity of the input zv.


Table of Contents , CoordSys

NAME

vis_CoordSysSetRadius - specify radius of torus

C SPECIFICATION

void vis_CoordSysSetRadius (vis_CoordSys *coordsys,
                            Vfloat radius)
void vis_CoordSysSetRadiusdv (vis_CoordSys *coordsys,
                              Vdouble radius)

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
radius       Radius of torus.

OUTPUT ARGUMENTS

None

DESCRIPTION

Specify the radius of the torus for a toroidal coordinate system. By default the radius is unity.


Table of Contents , CoordSys

NAME

vis_CoordSysTransform - translate and rotate a coordinate system

C SPECIFICATION

void vis_CoordSysTransform (vis_CoordSys *coordsys,
                            Vdouble u[3],
                            Vdouble tm[3][3])

INPUT ARGUMENTS

coordsys     Pointer to CoordSys object.
u            Translation vector
tm           Rotation direction cosine matrix

OUTPUT ARGUMENTS

None

DESCRIPTION

Transform CoordSys by a translation u, and a rotation tm.


Table of Contents

2.3 Units - Units

The Units object is used to define the units for physical quantities. The basic unit types supported are length, mass, time, temperature, angle and charge. The methods associated with a Units object are the following.

Instance a Units object using vis_UnitsBegin. By default the base and conversion units are set to SI and all conversion factors are set to unity. Once a Units object is instanced, set the base unit types using vis_UnitsSetBase. If the Units object is to be used to convert units, set the conversion unit types using vis_UnitsSetConv after setting the base unit type and set the conversion factors using vis_UnitsSetFactor. Usually it is only necessary to set conversion factors if either the base or conversion units type is "USER". The conversion factors may be automatically computed and set using vis_UnitsComputeFactors.

The basic unit types are length, mass, time, temperature, angle and charge. A unit of measurement is defined for each unit type as follows:

Associated with each unit type is a conversion unit type and conversion factor. The conversion unit types are set using vis_UnitsSetConv. The conversion factor for each unit type is set using vis_UnitsSetFactor. The conversion factors are applied to the base units to yield the conversion units.
     unit_conversion = factor*unit_base
Temperature comversion requires use of an offset. Specifically for temperature the conversion is as follows:
     temp_conversion = factor*(temp_base + offset)
By default the conversion unit types are set to the basic unit types (SI units) and the conversion factors are all unity and the temperature offset is zero.

Table of Contents

2.4 Function Descriptions

The currently available Units functions are described in detail in this section.


Table of Contents , Units

NAME

*vis_UnitsBegin - create an instance of a Units object

C SPECIFICATION

vis_Units *vis_UnitsBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created Units object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a Units object. Memory is allocated for the object private data and the pointer to the data is returned. By default the units types are SI, ie length in meters, mass in kilograms, time in seconds, temperature in Kelvin. Angles are in radians.

Destroy an instance of a Units object using

     void vis_UnitsEnd (vis_Units *units)

Return the current value of a Units object error flag using

     Vint vis_UnitsError (vis_Units *units)

Make a copy of a Units object. The private data from the fromunits object is copied to the units object. Any previous private data in units is lost.

     void vis_UnitsCopy (vis_Units *units,
                         vis_Units *fromunits)


Table of Contents , Units

NAME

vis_UnitsSetBase - set basic unit types

C SPECIFICATION

void vis_UnitsSetBase (vis_Units *units,
                       Vint type,
                       Vint value)

INPUT ARGUMENTS

units        Pointer to Units object.
type         Units type.
             =UNITS_LENGTH            Length
             =UNITS_MASS              Mass
             =UNITS_TIME              Time
             =UNITS_TEMP              Temperature
             =UNITS_ANGLE             Angle
             =UNITS_CHARGE            Charge
value        Units type value
             =UNITS_LENGTH_METER      Meter
             =UNITS_LENGTH_CENTIMETER Centimeter
             =UNITS_LENGTH_MILLIMETER Millimeter
             =UNITS_LENGTH_MICRON     Micron
             =UNITS_LENGTH_NANOMETER  Nanometer
             =UNITS_LENGTH_ANGSTROM   Angstrom
             =UNITS_LENGTH_KILOMETER  Kilometer
             =UNITS_LENGTH_INCH       Inch
             =UNITS_LENGTH_FOOT       Foot
             =UNITS_LENGTH_MILE       Mile
             =UNITS_LENGTH_USER       User defined
             =UNITS_MASS_KILOGRAM     Kilogram
             =UNITS_MASS_METRICTON    Metric ton
             =UNITS_MASS_GRAM         Gram
             =UNITS_MASS_POUND        Pound
             =UNITS_MASS_SLUG         Slug
             =UNITS_MASS_METRICTON    Metric ton
             =UNITS_MASS_BLOB         Blob
             =UNITS_MASS_KILOGRAMFM   kgf-sec**2/m
             =UNITS_MASS_KILOGRAMFMM  kgf-sec**2/mm
             =UNITS_MASS_USER         User defined
             =UNITS_TIME_SECOND       Second
             =UNITS_TIME_MINUTE       Minute
             =UNITS_TIME_HOUR         Hour
             =UNITS_TIME_USER         User defined
             =UNITS_TEMP_KELVIN       Kelvin
             =UNITS_TEMP_CELSIUS      Celsius
             =UNITS_TEMP_RANKINE      Rankine
             =UNITS_TEMP_FAHRENHEIT   Fahrenheit
             =UNITS_TEMP_USER         User defined
             =UNITS_ANGLE_RADIAN      Radian
             =UNITS_ANGLE_DEGREE      Degree
             =UNITS_ANGLE_CYCLE       Cycle, 2 pi radians
             =UNITS_ANGLE_USER        User defined
             =UNITS_CHARGE_COULOMB    Coulomb
             =UNITS_CHARGE_USER       User defined

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper type or value is specified.

DESCRIPTION

Set the basic units type. The conversion unit type is also set to this type. The conversion factor is set to unity.

Get basic unit types as output arguments.

     void vis_UnitsGetBase (vis_Units *units,
                            Vint type,
                            Vint *value)


Table of Contents , Units

NAME

vis_UnitsSetConv - set conversion unit types

C SPECIFICATION

void vis_UnitsSetConv (vis_Units *units,
                       Vint type,
                       Vint value)

INPUT ARGUMENTS

units        Pointer to Units object.
type         Units type.
value        Units type value

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper type or value is specified.

DESCRIPTION

Set the conversion unit types. The possible unit types are listed in vis_UnitsSetBase. Specify conversion factors and temperature offset using vis_UnitsSetFactor.

Get the set conversion unit types as output arguments.

     void vis_UnitsGetConv (vis_Units *units,
                            Vint type,
                            Vint *value)


Table of Contents , Units

NAME

vis_UnitsSetFactor - set conversion factors

C SPECIFICATION

void vis_UnitsSetFactor (vis_Units *units,
                         Vint type)
                         Vdouble value)

INPUT ARGUMENTS

units        Pointer to Units object.
type         Units type.
             =UNITS_LENGTH            Length
             =UNITS_MASS              Mass
             =UNITS_TIME              Time
             =UNITS_TEMP              Temperature
             =UNITS_TEMP_OFFSET       Temperature offset
             =UNITS_ANGLE             Angle
             =UNITS_CHARGE            Charge
value        Unit factor or offset

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Set the conversion unit conversion factors. The temperature conversion requires an addition temperature offset.

Get the set conversion unit factors as output arguments.

     void vis_UnitsGetFactor (vis_Units *units,
                              Vint type)
                              Vdouble *value)


Table of Contents , Units

NAME

vis_UnitsComputeFactors - compute and set conversion factors

C SPECIFICATION

void vis_UnitsComputeFactors (vis_Units *units)

INPUT ARGUMENTS

units        Pointer to Units object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Compute and set the conversion unit conversion factors.


Table of Contents

2.5 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.

Table of Contents

2.6 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);
The currently available VisContext functions are described in detail in this section.


Table of Contents , VisContext

NAME

*vis_VisContextBegin - create an instance of a VisContext object

C SPECIFICATION

vis_VisContext *vis_VisContextBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created VisContext object. If the object creation fails, NULL is returned.

DESCRIPTION

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)


Table of Contents , VisContext

NAME

vis_VisContextInit - set attributes to default values

C SPECIFICATION

void vis_VisContextInit (vis_VisContext *viscontext)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.

OUTPUT ARGUMENTS

None

DESCRIPTION

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


Table of Contents , VisContext

NAME

vis_VisContextTouch - update modification counter

C SPECIFICATION

void vis_VisContextTouch (vis_VisContext *viscontext)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.

OUTPUT ARGUMENTS

None

DESCRIPTION

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.


Table of Contents , VisContext

NAME

vis_VisContextSetABCColor - set miscellaneous color attributes

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
acolor       A color map index.
bcolor       B color map index.
ccolor       C color map index.

OUTPUT ARGUMENTS

None

DESCRIPTION

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 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);


Table of Contents , VisContext

NAME

vis_VisContextSetAngle - set angle in degrees

C SPECIFICATION

void vis_VisContextSetAngle (vis_VisContext *viscontext,
                             Vfloat angle)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
angle        Angle in degrees

sectionsOUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetBitmapSize - set bitmap size multiplier

C SPECIFICATION

void vis_VisContextSetBitmapSize (vis_VisContext *viscontext,
                                  Vint bitmapsize)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
bitmapsize   Bitmap size multiplier

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetColor,vis_VisContextSetMinorColor - set color attributes

C SPECIFICATION

void vis_VisContextSetColor (vis_VisContext *viscontext,
                             Vint color)

void vis_VisContextSetMinorColor (vis_VisContext *viscontext,
                                  Vint color)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
color        Color map index.

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetComponent - set component type

C SPECIFICATION

void vis_VisContextSetComponent (vis_VisContext *viscontext,
                                 Vint component)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
component    Component flag
             =VIS_COMPONENT_PRINCIPAL      Principal components
             =VIS_COMPONENT_BASIC          Basic components
             =VIS_COMPONENT_MAXSHEAR       Maximum shear components

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetElemAxes - set element axes flags

C SPECIFICATION

void vis_VisContextSetElemAxes (vis_VisContext *viscontext,
                                Vint elemaxes)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
elemaxes     Element axes flags.
             =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

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetElemLoc - set element locations

C SPECIFICATION

void vis_VisContextSetElemLoc (vis_VisContext *viscontext,
                               Vint elemloc)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
elemloc      Element location
             =VIS_ELEMLOC_CENTROID   Element centroid
             =VIS_ELEMLOC_CORNERS    Element corners
             =VIS_ELEMLOC_NODES      Element nodes

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetElemRep - set element representation type

C SPECIFICATION

void vis_VisContextSetElemRep (vis_VisContext *viscontext,
                               Vint elemrep)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
elemrep      Element representation
             =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

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetDistTol - set distance tolerance

C SPECIFICATION

void vis_VisContextSetDistTol (vis_VisContext *viscontext,
                               Vfloat disttol)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
disttol      Distance tolerance

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetDeviceOffset - set offset in device coordinates

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
dx           Horizontal offset in device coordinates (pixels).
dy           Vertical offset in device coordinates (pixels).

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetDeviceSize - set size in device coordinates

C SPECIFICATION

void vis_VisContextSetDeviceSize (vis_VisContext *viscontext,
                                  Vint devicesize)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
devicesize   Size in device coordinates

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetDraw - set draw flag

C SPECIFICATION

void vis_VisContextSetDraw (vis_VisContext *viscontext,
                            Vint draw)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
draw         Draw flag
             =VIS_OFF      Turn draw flag off
             =VIS_ON       Turn draw flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetEdge - set edge flag

C SPECIFICATION

void vis_VisContextSetEdge (vis_VisContext *viscontext,
                            Vint edge)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
edge         Edge flag
             =VIS_OFF      Turn edge flag off
             =VIS_ON       Turn edge flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetFill - set fill flag

C SPECIFICATION

void vis_VisContextSetFill (vis_VisContext *viscontext,
                            Vint fill)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
fill         Fill flag
             =VIS_OFF      Turn fill flag off
             =VIS_ON       Turn fill flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetFlags - set miscellaneous flags

C SPECIFICATION

void vis_VisContextSetFlags (vis_VisContext *viscontext,
                             Vint flags)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
flags        ORed flags which are specific to a given visualization object

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetFormat - set format attribute

C SPECIFICATION

void vis_VisContextSetFormat (vis_VisContext *viscontext,
                              Vint format)

INPUT ARGUMENTS

viscontext   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

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper format is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetFrequency - set frequency attribute

C SPECIFICATION

void vis_VisContextSetFrequency (vis_VisContext *viscontext,
                                 Vint frequency)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
frequency    Frequency

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetIsoValInterp - set isovalue interpolation method

C SPECIFICATION

void vis_VisContextSetIsoValInterp (vis_VisContext *viscontext,
                                    Vint isovalinterp)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
isovalinterp Isovalue interpolation method
             =VIS_INTERP_SHAPE       Shape function interpolation
             =VIS_INTERP_CLAMP       Clamped shape function interpolation

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper isovalinterp is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetIsoValType - set isovalue type attribute

C SPECIFICATION

void vis_VisContextSetIsoValType (vis_VisContext *viscontext,
                                  Vint isovaltype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
isovaltype   Isovalue type
             =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.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper isovaltype is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetLineStyle,vis_VisContextSetMinorLineStyle - set line style

C SPECIFICATION

void vis_VisContextSetLineStyle (vis_VisContext *viscontext,
                                 Vint linestyle)

void vis_VisContextSetMinorLineStyle (vis_VisContext *viscontext,
                                      Vint linestyle)

INPUT ARGUMENTS

viscontext   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

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper linestyle is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetLineWidth,vis_VisContextSetMinorLineWidth - set line width

C SPECIFICATION

void vis_VisContextSetLineWidth (vis_VisContext *viscontext,
                                 Vint linewidth)

void vis_VisContextSetMinorLineWidth (vis_VisContext *viscontext,
                                      Vint linewidth)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
linewidth    Line width multiplier

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetMapColor - set color mapping flag

C SPECIFICATION

void vis_VisContextSetMapColor (vis_VisContext *viscontext,
                                Vint mapcolor)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
mapcolor     Color mapping flag
             =VIS_MAPCOLOR_NONE      Turn color mapping off
             =VIS_MAPCOLOR_CONSTANT  Constant level color mapping
             =VIS_MAPCOLOR_SMOOTH    Smooth level color mapping

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetMapSize - set size mapping flag

C SPECIFICATION

void vis_VisContextSetMapSize (vis_VisContext *viscontext,
                               Vint mapsize)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
mapsize      Size mapping flag
             =VIS_OFF      Turn size mapping flag off
             =VIS_ON       Turn size mapping flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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 size. 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 size. 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);


Table of Contents , VisContext

NAME

vis_VisContextSetMapTrans - set transparency mapping flag

C SPECIFICATION

void vis_VisContextSetMapTrans (vis_VisContext *viscontext,
                                Vint maptrans)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
maptrans     Transparency mapping flag
             =VIS_OFF      Turn transparency mapping flag off
             =VIS_ON       Turn transparency mapping flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetMarkerType - set marker type attribute

C SPECIFICATION

void vis_VisContextSetMarkerType (vis_VisContext *viscontext,
                                  Vint markertype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
markertype   Marker type
             =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

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper markertype is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetPointSize - set point size

C SPECIFICATION

void vis_VisContextSetPointSize (vis_VisContext *viscontext,
                                 Vint pointsize)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
pointsize    Point size multiplier

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetPosition - set position or direction attribute

C SPECIFICATION

void vis_VisContextSetPosition (vis_VisContext *viscontext,
                                Vint position)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
position     Position or direction
             =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

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper position is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetPrimType - set suggested primitive type

C SPECIFICATION

void vis_VisContextSetPrimType (vis_VisContext *viscontext,
                                Vint primtype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
primtype     Primitive type
             =VIS_PRIM_POLY          Polygon
             =VIS_PRIM_ARRAY         Arrays of triangles, quads or lines
             =VIS_PRIM_STRIP         Triangle strips

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetProject - set projection type

C SPECIFICATION

void vis_VisContextSetProject (vis_VisContext *viscontext,
                               Vint project)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
project      Projection type
             =VIS_OFF      Turn view plane projection flag off
             =VIS_ON       Turn view plane projection flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetProjMatrix - set the graphics projection matrix

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
projmatrix   The 4x4 projection matrix

OUTPUT ARGUMENTS

None

DESCRIPTION

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])


Table of Contents , VisContext

NAME

vis_VisContextSetRatio - set ratio

C SPECIFICATION

void vis_VisContextSetRatio (vis_VisContext *viscontext,
                             Vfloat ratio)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
ratio        Ratio

sectionsOUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetRefinement - set order of refinement attribute

C SPECIFICATION

void vis_VisContextSetRefinement (vis_VisContext *viscontext,
                                  Vint refinement)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
refinement   Order of refinement. -1 <= refinement <= 2.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_VALUE is generated if an improper refinement is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetReflect - set reflect flag

C SPECIFICATION

void vis_VisContextSetReflect (vis_VisContext *viscontext,
                               Vint reflect)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
reflect      Reflect flag
             =VIS_OFF      Turn reflect flag off
             =VIS_ON       Turn reflect flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetScale - set scale factor

C SPECIFICATION

void vis_VisContextSetScale (vis_VisContext *viscontext,
                             Vfloat scale)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
scale        Scale factor

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetShade - set light source shading attribute

C SPECIFICATION

void vis_VisContextSetShade (vis_VisContext *viscontext,
                             Vint shade)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
shade        Light source shading.
             =VIS_NOSHADE            No shading
             =VIS_FLATSHADE          Flat shading
             =VIS_VERTEXSHADE        Vertex shading

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper shade is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetShrink - set shrink factor

C SPECIFICATION

void vis_VisContextSetShrink (vis_VisContext *viscontext,
                              Vfloat shrink)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
shrink       Shrink factor

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetShrinkType - set shrink type

C SPECIFICATION

void vis_VisContextSetShrinkType (vis_VisContext *viscontext,
                                  Vint shrinktype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
shrinktype   Shrink type
             =VIS_SHRINKNONE         No shrink is performed
             =VIS_SHRINKENTITY       Perform shrink local to entity
             =VIS_SHRINKELEMENT      Perform shrink local to element

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetSize,vis_VisContextSetMinorSize - set size attribute

C SPECIFICATION

void vis_VisContextSetSize (vis_VisContext *viscontext,
                            Vfloat size)

void vis_VisContextSetMinorSize (vis_VisContext *viscontext,
                                 Vfloat size)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
size         Size in global coordinates

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetSizeType - set size type

C SPECIFICATION

void vis_VisContextSetSizeType (vis_VisContext *viscontext,
                                Vint sizetype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
sizetype     Size type
             =VIS_SIZEWORLD          Size to world coordinate
             =VIS_SIZEDEVICE         Size to device coordinates

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper sizetype is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetSpot - set spot flag

C SPECIFICATION

void vis_VisContextSetSpot (vis_VisContext *viscontext,
                            Vint spot)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
spot         Spot flag
             =VIS_OFF      Turn spot flag off
             =VIS_ON       Turn spot flag on

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetStreamType - set trace and stream type attribute

C SPECIFICATION

void vis_VisContextSetStreamType (vis_VisContext *viscontext,
                                  Vint streamtype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
streamtype   Stream type
             =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

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper streamtype is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetTensorType - set tensor type attribute

C SPECIFICATION

void vis_VisContextSetTensorType (vis_VisContext *viscontext,
                                  Vint tensortype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
tensortype   Tensor type
             =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.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper tensortype is specified.

DESCRIPTION

Set tensor type attribute. This attribute is used only by Mark objects to display tensor "box" markers. Tensor markers are gnerally 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);


Table of Contents , VisContext

NAME

vis_VisContextSetTextBox - set size of character text box

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   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).

OUTPUT ARGUMENTS

None

ERRORS

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

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetTrans - set transparency attribute

C SPECIFICATION

void vis_VisContextSetTrans (vis_VisContext *viscontext,
                             Vint trans)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
trans        Transparency map index.

OUTPUT ARGUMENTS

None

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetUnitTol - set unit tolerance

C SPECIFICATION

void vis_VisContextSetUnitTol (vis_VisContext *viscontext,
                               Vfloat unittol)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
unittol      Unit tolerance

OUTPUT ARGUMENTS

None

DESCRIPTION

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 unittol using:

     vis_VisContextUnitTol (vis_VisContext *viscontext);


Table of Contents , VisContext

NAME

vis_VisContextSetVectorType - set vector type attribute

C SPECIFICATION

void vis_VisContextSetVectorType (vis_VisContext *viscontext,
                                  Vint vectortype)

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
vectortype   Vector type
             =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.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_ENUM is generated if an improper vectortype is specified.

DESCRIPTION

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);


Table of Contents , VisContext

NAME

vis_VisContextSetViewport - set the graphics viewport

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
left, right  Device coordinates of left and right planes of viewport
bottom, top  Device coordinates of bottom and top planes of viewport

OUTPUT ARGUMENTS

None

DESCRIPTION

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)


Table of Contents , VisContext

NAME

vis_VisContextSetXfmMatrix - set the graphics modelview matrix

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
xfmmatrix    The 4x4 modelview matrix

OUTPUT ARGUMENTS

None

DESCRIPTION

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])


Table of Contents , VisContext

NAME

vis_VisContextSetXYZColor - set x,y,z color attributes

C SPECIFICATION

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

INPUT ARGUMENTS

viscontext   Pointer to VisContext object.
xcolor       X color map index.
ycolor       Y color map index.
zcolor       Z color map index.

OUTPUT ARGUMENTS

None

DESCRIPTION

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);