SET WORKSTATION WINDOW 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET WORKSTATION WINDOW 3 − specify a 3D window to be displayed on the specified workstation
SYNOPSIS
C Syntax
void
pset_ws_win3 ( ws, window )
Pintws;workstation id
Plimit3∗window;workstation window limits
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET WORKSTATION WINDOW 3 defines the 3D volume in Normalized Projection Coordinate (NPC) space to be displayed on the specified workstation. The workstation window is a rectangular box in NPC space, which is mapped to the workstation viewport, defined in Device Coordinate (DC) space.
Together, the workstation window and the workstation viewport define the workstation transformation that converts the image from NPC to DC on the workstation’s physical display surface. The workstation window defines what within NPC space is displayed; the workstation viewport defines where the image is displayed in DC space.
Control of the workstation window allows you to choose a portion of the abstract image composed in NPC space for display on the workstation, without changing the definition of the image in NPC space.
C Input Parameters
wsThe identifier of the workstation for which the window is to be set.
window
A pointer to a structure containing the six NPC workstation window limits, defined as follows:
typedef struct {
Pfloatx_min;/∗ x minimum ∗/
Pfloatx_max;/∗ x maximum ∗/
Pfloaty_min;/∗ y minimum ∗/
Pfloaty_max;/∗ y maximum ∗/
Pfloatz_min;/∗ z minimum ∗/
Pfloatz_max;/∗ z maximum ∗/
} Plimit3;
Execution
The current workstation window defines the rectangular box in Normalized Projection Coordinates (NPC) containing the portion of the abstract image to be displayed within the current workstation viewport. Together, the workstation window and the workstation viewport define an isotropic workstation transformation that converts the image from NPC to DC on the workstation’s physical display surface.
The range for each of the workstation window limits is [0,1]. In addition, x minimum must be less than x maximum, y minimum must be less than y maximum, and z minimum must be less than or equal to z maximum. Output is automatically clipped at the workstation window limits, and this clipping cannot be disabled.
SET WORKSTATION WINDOW 3 sets the requested workstation window in the specified workstation’s state list to the values specified in window. The effect of calling SET WORKSTATION WINDOW 3 is visible only after the requested workstation window replaces the current workstation window. The time at which this occurs depends on the workstation’s display update state. This action is performed immediately, and the workstation transformation update state is set to NOTPENDING, if any one of the following is true:
•The workstation’s display update state allows update.
•The workstation’s modification mode is any value other than No Immediate Visual Effect, and the dynamic modification accepted for workstation transformation entry in the workstation description table is set to Immediate.
•The display space empty status in the workstation state list is EMPTY.
Otherwise, the workstation transformation update state is set to PENDING, and the requested workstation window will not replace the current workstation window until the next time the workstation is updated. The workstation transformation update state will be set to NOTPENDING at that time.
If the current workstation window and viewport do not have the same aspect ratios, the workstation transformation will preserve the proportions of the image by mapping the workstation window to the largest parallelopiped within the workstation viewport so that:
•The aspect ratio of the window in x and y is maintained.
•The lower left hand corner of the window closest to 0 is mapped to the lower left hand corner of the viewport furthest from the observer.
•The z extent of the workstation window is mapped to the entire z extent of the workstation viewport.
If the aspect ratios of the workstation window and viewport are different, there will be unused space along the upper or right-hand edges of the viewport, but not both.
The default workstation transformation maps the entire NPC view volume, [0,1] × [0,1] × [0,1], onto the largest parallelopiped in the workstation display space including the display’s lower left corner furthest from the observer.
ERRORS
003Ignoring function, function requires state ( PHOP, WSOP, ∗, ∗)
054Ignoring function, the specified workstation is not open
057Ignoring function, specified workstation is of category MI
151Ignoring function, invalid window; XMIN ≥ XMAX, YMIN ≥ YMAX, or ZMIN > ZMAX
156Ignoring function, the workstation window limits are not within NPC range
SEE ALSO
SET WORKSTATION VIEWPORT 3 (3P)
SET WORKSTATION WINDOW (3P)
September 02, 1992