For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
The PHIGS workstation resource encapsulates the PEX functionality to support the PHIGS abstraction of a workstation. The PHIGS definition of a workstation states that a workstation consists of zero or one display space. In X, many display spaces (windows) are possible in a single workstation display. The PHIGS workstation resource ties together a single X drawable, a set of lookup tables, highlighting and invisibility name sets, and all of the state needed to make it perform as a PHIGS user expects a workstation should perform.
The PHIGS workstation resource is maintained in PEX 5.2 and PEXlib 5.2 solely for backwards-compatiblity reasons. No new PEX 5.2 functionality is added to the workstation resource. For example, the PEX 5.2 texture mapping lookup table has not been added to the list of attributes defined below. However, some PEX 5.2 functionality may still be usable from the workstation subset, such as new output commands that do not implicitly reference new lookup tables or other new resources.
Each PHIGS workstation resource contains the following attributes defined at the time it is created:
You can inquire these attributes but not modify them during the life of the PHIGS workstation. These attributes function in a way identical to their counterparts in a renderer resource. There is no view table as in the renderer. The workstation has a built-in view table that you can access only through the defined workstation functions. However, this view table is functionally the same as that used by the renderer.
For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
A workstation contains the following attributes that can be modified or inquired with various functions:
For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
Posted structure networks is one attribute that a workstation contains that you can modify or inquiry with various functions. The other attributes include:
The posted structure network attributes maintains a list of structure resource identifiers, together with a priority value for each. The priority values are relative, and are specified at the time the structure network is added to the list (posted).
Whenever a structure traversal is requested, each of the structure networks in this list is traversed. If multiple structures that would overlap on the screen are posted, the structure network with the higher priority is guaranteed to be visible. If two structures have the same priority and would overlap on the screen, the structure posted later has the higher priority.
Invoke the PEXPostStructure function to post structure networks to a PHIGS workstation resource. Invoke the PEXUnpostStructure function to unpost a structure network. Invoke the PEXUnpostAllStructures function to reset the posted structure network list to the null list. Finally, given a structure resource id, invoke the PEXGetWorkstationPostings function to get a list of all PHIGS workstations to which the structure has been posted.
For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
Requested and current values are attributes that a workstation contains that you can modify or inquiry with various functions. The other attributes include:
The PHIGS workstation resource supports the concepts of requested changes and current values. You can change the viewport, NPC subvolume, HLHSR mode and buffer mode attributes, but the changes are not actually applied until the next structure traversal occurs or you call the PEXExecuteDeferredActions function. Thus, there are pairs of attributes for the NPC subvolume, viewport, HLHSR mode and buffer mode; the requested value and the current value:
requested NPC subvolume current NPC subvolume requested viewport current viewport requested HLHSR mode current HLHSR mode requested buffer mode current buffer mode
Defined views are attributes that a workstation contains that you can modify or inquiry with various functions. The other attributes include:
For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
The list of defined views is similar to a view table. However, a PHIGS workstation must also be able to separate requested views from current views.
Views also have an input priority value associated with them in PHIGS workstation resources. Because of these differences in semantics, the PHIGS workstation resource was designed to have a built-in view table rather than an associated view lookup table.
When doing a picking or mapping operation, it is necessary to map device coordinates through the inverse of the viewing/projection transform to determine the primitive that was selected. The reason for the view priority is that several views can produce a projection onto the same area of the screen. Thus, specifying a device coordinate point for the picking operation can be ambiguous. If there is more than one view that projects onto the specified device coordinate point, it is not clear which set of viewing parameters to use to compute the inverse transform. Adding a priority to each of the views removes the ambiguity.
Use the PEXSetWorkstationViewPriority function to adjust the view priorities. The PEXMapDCToWC function is provided as an aid for mapping device coordinate points back into world coordinates. The function PEXMapWCToDC aids in mapping world coordinates to device coordinates. Views are modified with the PEXSetWorkstationViewRep function, but are not actually applied until the next structure traversal occurs or when you invoke the PEXExecuteDeferredActions function.
Display update mode is an attribute that a workstation contains that you can modify or inquiry with various functions. The other attributes include:
For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
The display update mode indicates how the PHIGS workstation should attempt to visualize changes that occur. PEXlib defines the following types:
For a list of all PHIGS Workstation functions and related topics, see PHIGS Workstation.
A PHIGS workstation contains the following attributes to maintain the state of the PHIGS workstation resource:
and specify whether there are any requested changes to the list of views, the NPC subvolume or viewport, the HLHSR mode or the buffer mode respectively.
You can inquire these attributes but not modify them: they are modified as side effects of various requests.
Invoke the PEXRedrawAllStructures function to explicitly retraverse a PHIGS workstation's posted structure networks. Invoke the PEXUpdateWorkstation function to perform a traversal if the visual state is not correct. Invoke the PEXGetWorkstationDynamics function to obtain information about how changes to various attributes are visualized.
Structure traversal using a PHIGS workstation resource has side effects beyond those of a renderer. When a traversal is performed using a PHIGS workstation, the drawable is cleared to the color stored in entry zero of the associated color lookup table. Furthermore, all pending changes to the PHIGS workstation attributes are made current as a traversal begins. Finally, the displayed image state is set to PEXCorrect at the end of the traversal.
Pick device descriptors are also a part of the workstation resource. They are defined in Workstation Pick Devices.
If the drawable associated with a workstation resource is destroyed, then the workstation resource is implicitly freed. The next access to the workstation generates a BadPEXWorkstation error.
Lookup tables and name set resource can be bound to a workstation resource and then freed. The contents of these resources remain, because they are still being referenced by the workstation. However, when you inquire a workstation's attributes, the value PEXAlreadyFreed is returned for those resources that have been freed and thus no longer have a valid resource identifier by which they can be referenced.