Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pinit_loc(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pinit_loc(3g)  —  Subroutines

Name

pinit_loc − Sets the locator device to application-specific values. 

 
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function

Syntax

void pinit_loc (
  Pint              wsid,          /∗ (I) Workstation identifier ∗/
  Pint              dev_num,       /∗ (I) Locator device number ∗/
  Pint              view_ind,      /∗ (I) Initial view index ∗/
  const Ppoint     ∗init_loc_pos,  /∗ (I) Initial locator position, in
                                          world coordinates ∗/
  Pint              pet,           /∗ (I) Prompt and echo type ∗/
  const Plimit     ∗echo_area,     /∗ (I) Echo area, in device
                                          coordinates ∗/
  const Ploc_data  ∗record         /∗ (I) Data record ∗/
)

Data Structures

typedef struct {
    Pfloat     x;    /∗ x coordinate ∗/
    Pfloat     y;    /∗ y coordinate ∗/
} Ppoint;
typedef struct {
    Pfloat    x_min;    /∗ x minimum ∗/
    Pfloat    x_max;    /∗ x maximum ∗/
    Pfloat    y_min;    /∗ y minimum ∗/
    Pfloat    y_max;    /∗ y maximum ∗/
} Plimit;
typedef struct { /∗ locator data record ∗/
    union Ploc_pets {
        struct Ploc_pet_r1 {
            Pint   impl_dep;
        } pet_r1;
        struct Ploc_pet_r2 {
            Pint    impl_dep;
        } pet_r2;
        struct Ploc_pet_r3 {
            Pint    impl_dep;
        } pet_r3;
        struct Ploc_pet_r4 {
            Pline_attrs    line_attrs;   /∗ polyline attributes ∗/
        } pet_r4;
        struct Ploc_pet_r5 {
            Pline_fill_ctrl_flag  line_fill_ctrl_flag;   /∗ control flag ∗/
            Ploc_attrs            attrs;
        } pet_r5;
        struct Ploc_pet_r6 {
            char      ∗title_string;
        } pet_r6;
        struct Ploc_pet_u1 {
            Pfloat     box_x;   /∗ size of the box in x ∗/
            Pfloat     box_y;   /∗ size of the box in y ∗/
        } pet_u1;
        struct Ploc_pet_u2 {
            Pline_fill_ctrl_flag   line_fill_ctrl_flag;  /∗ control flag ∗/
            Ploc_attrs             attrs;
        } pet_u2;
        struct Ploc_pet_u3 {
            Pline_attrs   line_attrs;  /∗ polyline attributes ∗/
            Ppoint3       point1;      /∗ point 1 for echo ∗/
            Ppoint3       point2;      /∗ point 2 for echo ∗/
        } pet_u3;
        struct Ploc_pet_u4 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
        } pet_u4;
        struct Ploc_pet_u5 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
        } pet_u5;
        struct Ploc_pet_u6 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
            Ppoint3       point1;       /∗ point 1 for echo ∗/
            Ppoint3       point2;       /∗ point 2 for echo ∗/
        } pet_u6;
        struct Ploc_pet_u7 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
            Ppoint3       point1;       /∗ point 1 for echo ∗/
            Ppoint3       point2;       /∗ point 2 for echo ∗/
        } pet_u7;
        struct Ploc_pet_u8 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
            Ppoint3       point1;       /∗ point 1 for echo ∗/
            Ppoint3       point2;       /∗ point 2 for echo ∗/
        } pet_u8;
        struct Ploc_pet_u9 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
        } pet_u9;
        struct Ploc_pet_u10 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
        } pet_u10;
        struct Ploc_pet_u11 {
            Pint          impl_dep;     /∗ implementation-dependent ∗/
        } pet_u11;
        struct Ploc_pet_u12 {
            Pline_attrs   line_attrs;   /∗ polyline attributes ∗/
        } pet_u12;
    } pets;
} Ploc_data;
    typedef struct {
        Pasf           type_asf;      /∗ line type asf ∗/
        Pasf           width_asf;     /∗ line width asf ∗/
        Pasf           colr_ind_asf;  /∗ line color index asf ∗/
        Pint           ind;           /∗ line index ∗/
        Pline_bundle   bundle;        /∗ line bundle ∗/
    } Pline_attrs;
        typedef enum {
            PASF_BUNDLED,   /∗ bundled attributes ∗/
            PASF_INDIV      /∗ individual attributes ∗/
        } Pasf;
        typedef struct {
            Pint      type;      /∗ line type ∗/
            Pfloat    width;     /∗ line width scale factor ∗/
            Pint      colr_ind;  /∗ color index ∗/
        } Pline_bundle;
    typedef enum {
        PFLAG_LINE,      /∗ polyline ∗/
        PFLAG_FILL,      /∗ fill area ∗/
        PFLAG_FILL_SET   /∗ fill area set ∗/
    } Pline_fill_ctrl_flag;
    typedef union {
        Pline_attrs    line_attrs;    /∗ polyline attributes ∗/
        Pint_attrs     int_attrs;     /∗ interior attributes ∗/
        Ploc_fill_set  fill_set;      /∗ fill set ∗/
    } Ploc_attrs;
        typedef struct {
            Pasf         style_asf;       /∗ interior asf ∗/
            Pasf         style_ind_asf;   /∗ interior style asf ∗/
            Pasf         colr_ind_asf;    /∗ interior color index asf ∗/
            Pint         ind;             /∗ interior index ∗/
            Pint_bundle  bundle;          /∗ interior bundle ∗/
        } Pint_attrs;
            typedef struct {
                Pint_style   style;       /∗ interior style ∗/
                Pint         style_ind;   /∗ interior style index ∗/
                Pint         colr_ind;    /∗ interior color index ∗/
            } Pint_bundle;
                typedef enum {
                    PSTYLE_HOLLOW,   /∗ hollow interior ∗/
                    PSTYLE_SOLID,    /∗ solid interior ∗/
                    PSTYLE_PAT,      /∗ patterned interior ∗/
                    PSTYLE_HATCH,    /∗ hatched interior ∗/
                    PSTYLE_EMPTY     /∗ empty interior ∗/
                } Pint_style;
        typedef struct {
            Pint_attrs    int_attrs;    /∗ interior attributes ∗/
            Pedge_attrs   edge_attrs;   /∗ edge attributes ∗/
        } Ploc_fill_set;
            typedef struct {
                Pasf           flag_asf;       /∗ edge flag asf ∗/
                Pasf           type_asf;       /∗ edge type asf ∗/
                Pasf           width_asf;      /∗ edge width asf ∗/
                Pasf           colr_ind_asf;   /∗ edge color index asf ∗/
                Pint           ind;            /∗ edge index ∗/
                Pedge_bundle   bundle;         /∗ edge bundle ∗/
            } Pedge_attrs;
                typedef struct {
                    Pedge_flag   flag;       /∗ edge flag ∗/
                    Pint         type;       /∗ edge type ∗/
                    Pfloat       width;      /∗ edge width scale factor ∗/
                    Pint         colr_ind;   /∗ edge color index ∗/
                } Pedge_bundle;
                    typedef enum {
                       PEDGE_OFF,   /∗ edges off ∗/
                       PEDGE_ON     /∗ edges on ∗/
                    } Pedge_flag;
    typedef struct {
        Pfloat     x;    /∗ x coordinate ∗/
        Pfloat     y;    /∗ y coordinate ∗/
        Pfloat     z;    /∗ z coordinate ∗/
    } Ppoint3;

Constants

 
Data Structure Constants        Constant           Description
---------------------------------------------------------------------------
Line and edge types             PLINE_SOLID        Solid line
                                PLINE_DASH         Dashed line
                                PLINE_DOT          Dotted line
                                PLINE_DOTDASH      Dashed-dotted line
---------------------------------------------------------------------------

Description

pinit_loc sets the locator device to application-specific values.  You specify the initial locator position (in world coordinate values), and the initial view index of the view transformation Digital PHIGS uses to translate the device coordinate point to a normalized projection coordinate point. The z-component of a previously specified locator position remains unchanged. 

This function accepts the echo area in a 4-component list of x- and y-coordinates, in device coordinates.  The order of the list components is XMIN < XMAX, YMIN < YMAX.  The z-components of a previously specified echo volume remain unchanged. 

When an application calls pinit_loc, the workstation surface cannot contain the locator device’s prompt.  To remove an existing prompt from the surface, call the pset_loc_mode function and place the device in request mode. 

The size and contents of the data record depend on the prompt and echo type you specify.  If the size or contents of the data record does not match the requirements of your chosen prompt and echo type, Digital PHIGS generates an error. 

See Locator-Class PETs for information on locator-class prompt and echo types. 

See Also

pget_loc
pinit_loc3
pinq_def_loc_data
pinq_loc_st
preq_loc
psample_loc
pset_loc_mode
pset_view_tran_in_pri

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026