Design: 06.03/P02

This is an abstract, language-independent design. Grim details may be found in the corresponding source code. You may return to the documentation for the module containing this program design, or to the entire hierarchical table of topics covered by the PVT.


PROGRAM 2: Initialization of the workstation transformation

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

msgsuf = message suffix = "opening workstation."

check_transform:
<open workstation>

<inquire workstation transformation 3> to determine
   update state:          wtupd
   requested 3D window:   rqwin
   current   3D window:   cuwin
   requested 3D viewport: rqvwp
   current   3D viewport: cuvwp

TEST: #SR 5 12
      "The workstation transformation update state should be
       initialized to NOTPENDING after " + msgsuf
pass/fail depending on (wtupd = NOTPENDING)

TEST: #SR 5 12
      "The current and requested workstation window should be
       initialized to [0,1] in all three dimensions after "
       + msgsuf
pass/fail depending on (rqwin = [0,1,0,1,0,1] and
                        cuwin = [0,1,0,1,0,1] )

TEST: #SR 2 5 12
      "The current and requested workstation viewport should be
       initialized to the 3D maximum display volume size after "
       + msgsuf
<inquire display space size 3> to determine
   dcmax  = maximum size in DC units
pass/fail depending on (rqvwp = [0,dcmax_x,0,dcmax_y,0,dcmax_z] and
                        cuvwp = [0,dcmax_x,0,dcmax_y,0,dcmax_z] )

alter workstation transformation:
<set workstation window 3>
   pxlo = rqwin_xlo / 2,  pxhi = rqwin_xhi / 2
   pylo = rqwin_ylo / 2,  pyhi = rqwin_yhi / 2
   pzlo = rqwin_zlo / 2,  pzhi = rqwin_zhi / 2

<set workstation viewport 3>
   pxlo = rqvwp_xlo / 2,  pxhi = rqvwp_xhi / 2
   pylo = rqvwp_ylo / 2,  pyhi = rqvwp_yhi / 2
   pzlo = rqvwp_zlo / 2,  pzhi = rqvwp_zhi / 2

<close workstation>
if (msgsuf = "opening workstation.") then
   msgsuf = "re-opening workstation."
   goto check_transform
endif

END PROGRAM 2