SunPHIGS 3.0 Extensions Reference Manual
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

NAME

SET POLYLINE REPRESENTATION PLUS - set extended polyline attribute bundle on a workstation

SYNOPSIS

C Syntax

void
pset_line_rep_plus ( ws, index, rep )
Pint                 ws;       workstation identifier
Pint                 index;    polyline bundle index
Pline_bundle_plus    * rep;    extended polyline representation pointer

FORTRAN Syntax

SUBROUTINE pseplr ( WKID, INDEX, LTYPE, LWIDTH, COLTYPE, ICOLR, COLR, METHOD, ATYPE, AVALUE )
INTEGER      WKID         workstation identifier
INTEGER      INDEX        polyline index
INTEGER      LTYPE        linetype
REAL         LWIDTH       linewidth scale factor
INTEGER      COLTYPE      colour type
INTEGER      ICOLR        polyline colour index
REAL         COLR(3)      colour values
INTEGER      METHOD       polyline shading method
INTEGER      ATYPE        curve approximation type
REAL         AVALUE       curve approximation value

Required PHIGS Operating States

(PHOP, WSOP, * ,* )

DESCRIPTION

Purpose

SET POLYLINE REPRESENTATION PLUS sets a bundle of extended polyline attributes for a specified entry in a workstation extended polyline bundle table.
This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.

C Input Parameters

ws
The identifier of the workstation for which the extended polyline representation is being set.
index
The index of the entry being set.
rep
A pointer to a Pline_bundle_plus structure. Pline_bundle_plus is defined as:
typedef struct {
Pint            type;               /* line type * /
Pfloat           width;              /* linewidth scale factor * /
Pgcolr          colr;               /* polyline colour * /

Pint            shad_meth;          /* polyline shading method * /
Pint            approx_type;        /* curve approximation
                                       criteria * /
Pfloat           approx_val;         /* curve approximation
                                       criteria * /

} Pline_bundle_plus;
Constants defined for linetype are:
1   PLINE_SOLID        Solid
2   PLINE_DASH         Dashed
3   PLINE_DOT          Dotted
4   PLINE_DASH_DOT     Dot-dashed

Pgcolr is defined as:
typedef struct {
Pint
type;
/* indirect, RGB, CIE, HSV, HLS * /
union {
Pint
ind;
/* index in workstation colour
bundle table * /
struct {
             Pfloat         x;          /* red, hue, and so on * /
             Pfloat         y;          /* green, saturation, lightness,
                                           and so on * /
             Pfloat         z;          /* blue, value, saturation, and
                                           so on * /
          } general;
        } val;
} Pgcolr;

Constants defined for colour type are:
0   PINDIRECT         Indirect
1   PMODEL_RGB        Red, Green, and Blue
2   PMODEL_CIELUV     CIE
3   PMODEL_HSV        Hue, Saturation, and Value
4   PMODEL_HLS        Hue, Lightness, and Saturation

The ind member of the val union is used for type PINDIRECT. The general member is used for the other types.
Constants defined for polyline shading method are:
1   PSD_NONE             No Shading
2   PSD_COLOUR           Colour Interpolation Shading
3   PSD_DOT_PRODUCT      Dot Product Interpolation Shading
4   PSD_NORMAL           Normal Interpolation Shading

Constants defined for curve approximation type are:
1
PCURV_WS_DEP
2
PCURV_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3
PCURV_CHORDAL_SIZE_WC
4
PCURV_CHORDAL_SIZE_NPC
5
PCURV_CHORDAL_SIZE_DC
6
PCURV_CHORDAL_DEVIATION_WC
7
PCURV_CHORDAL_DEVIATION_NPC
8
PCURV_CHORDAL_DEVIATION_DC
See SET CURVE APPROXIMATION CRITERIA for a description of these constants and their use of the curve approximation value.

FORTRAN Input Parameters

The following data types are predefined in phigs77.h.
WKID
The identifier of the workstation for which the extended polyline representation is being defined.
INDEX The index of the entry being defined.
LTYPE An integer value specifying a linetype. Constants defined for linetype are:
 1   PLSOLI              Solid
 2   PLDASH              Dashed
 3   PLDOT               Dotted
 4   PLDASD              Dot-dashed
 0   PLNLONGDASH         Long-dashed
-1   PLNDOTDASHDOT       Dot-dashed-dot-dotted
-2   PLNCENTER           Center (long-short dashed)
-3   PLNPHANTOM          Phantom (long-short-short dashed)

See SET LINETYPE in PHIGS for caveats regarding the Center and Phantom linetypes.
LWIDTH
The linewidth scale factor.
COLTYPE
The colour type. Constants defined for colour type are:
0   PINDIR   Indirect
1   PRGB     Red, Green, and Blue
2   PCIE     CIE Colour Model
3   PHSV     Hue, Saturation, and Value
4   PHLS     Hue, Lightness, and Saturation

ICOLR An integer index into the workstation colour table for determining the line
colour. This value is only used if COLTYPE is equal to PINDIR.
COLR(3)
An array of reals containing the colour for the line. This array is unused if COLTYPE is equal to PINDIR.
COLR(1 )= Red, Hue, and so on
COLR(2 )= Green, Saturation, Lightness, and so on
COLR(3 )= Blue, Value, Saturation, and so on
METHOD
The polyline shading method. Constants defined for polyline shading method are:
1   PSDNON     No Shading
2   PSDCOL     Colour Interpolation Shading

ATYPE The curve approximation type. Constants defined for curve approximation type
are:
1   PCAWSD     Workstation-dependent
2   PCAEPK     Constant Parametric Subdivision Between Knots
3   PCACSW     Chordal Size in WC
4   PCACSN     Chordal Size in NPC
5   PCACSD     Chordal Size in DC
6   PCACDW     Chordal Deviation in WC
7   PCACDN     Chordal Deviation in NPC
8   PCACDD     Chordal Deviation in DC

See SET CURVE APPROXIMATION CRITERIA for a description of their meaning.
AVALUE
The curve approximation value. Its use is dependent upon the approximation type. See SET CURVE APPROXIMATION CRITERIA for a description of its use.

Execution

SET POLYLINE REPRESENTATION PLUS sets the specified extended polyline bundle table entry in the specified workstation state list. The extended polyline bundle table contains bundled entries of the PHIGS and SunPHIGS Extension polyline attributes. SET POLYLINE REPRESENTATION PLUS sets the individual entries of this table. During traversal, the attribute values of these bundles are used when the corresponding aspect source flag in the workstation state list is set to BUNDLED.
The PHIGS polyline bundle table is a portion of the extended table. The function SET POLYLINE REPRESENTATION sets the following attributes in the extended table: linetype, linewidth scale factor, and colour index (colour type of Indirect is assumed).
During structure traversal the current polyline index refers to an entry in the workstation extended polyline bundle table. Depending on the settings of the aspect source flags, the contents of that bundle table entry are used to determine the attributes associated with output primitives that use the extended polyline bundle table. These primitives are:
POLYLINE
POLYLINE 3
POLYLINE SET 3 WITH DATA
NON-UNIFORM B-SPLINE CURVE
GDP (Linear Primitives)
GDP3 (Linear Primitives)
CELL ARRAY
CELL ARRAY 3 (When Performing the Minimal Simulation)

ERRORS

003
Ignoring function, function requires state (PHOP, WSOP, * ,* )
054
Ignoring function, the specified workstation is not open
059
Ignoring function, the specified workstation does not have output capability (that is, the workstation category is not OUTPUT, OUTIN, or MO)
100
Ignoring function, the bundle index value is less than one
103
Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table
104
Ignoring function, the specified linetype is not available on the specified workstation
110
Ignoring function, the specified colour model is not available on the workstation
113
Ignoring function, the colour index value is less than zero
605
Ignoring function, the specified polyline shading method is not available on the workstation

SEE ALSO

INQUIRE POLYLINE FACILITIES PLUS (3PP)
SET INDIVIDUAL ASF (3P)
INQUIRE POLYLINE REPRESENTATION PLUS (3PP)
SET CURVE APPROXIMATION CRITERIA (3PP)
SET POLYLINE REPRESENTATION (3P)