GDDM-GKS V1R1 Programming Guide and Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Segment transformations

GDDM-GKS V1R1 Programming Guide and Reference
SC33-0334-00



To place the piece of furniture inside the room, a segment transformation must be applied to the new segment. The program uses the point returned by the locator input to compute a shift vector that does this. You enter a shift vector for the transformation as a relative displacement value from a fixed point. In this case, the new segment is located at the origin (0,0). The shift vector should then be the locator point less the dimensions of the furniture itself.


          EVALUATE TRANSFORMATION MATRIX (0.0, 0.0,
               xcor-furnwidth, ycor-furnheight, 0.0, 1.0,
               1.0, 0, matrix1)
          SET SEGMENT TRANSFORMATION (segment name, matrix1)
          SET VISIBILITY (segment name, 1)

After the matrix is evaluated, the transformation is set and the piece of furniture is moved inside the room. Visibility is then set to 1 so that the primitive appears on the display.

The program branches back to the menu of options.

This is what the screen looks like after the desk has been picked and located within the room:


   PICTURE 19          

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012