Next: 7 Internal programs
Up: 6 Input management
Prev: 6.2 Interaction subroutines
Contents
To introduce a position into the 3D space, it is firstly necessary to indicate in which part of the user space we are interested. The following subroutine is used in this case:
SUBROUTINE DEFWSP(X, Y, Z, U, V, W, SC) REAL X, Y, Z, U, V, W, SC
defines a rectangle to delimit the zone in the 3D space which interests us when entering a position. This zone is indicated by a vertex (X, Y, Z) and the main diagonal (U, V, W).
SC designates the scaling factor to apply to go from the input surface coordinates, expressed in centimeters, to the user coordinates.
Once the user space is specified, it is necessary to display several views (straight, front, bottom, perspective) of the context in which the position must be introduced, on the screen. The following subroutines are used for this purpose:
SUBROUTINE DI(OBJET) EXTERNAL OBJET
displays the object described by subroutine OBJET in the 4 standard views . The subroutines used to display the top, front and right views are:
SUBROUTINE FDESSU SUBROUTINE FFACE SUBROUTINE FDROIT
Once the context is displayed, it is possible to enter a position using 2 points entered successively on two distinct orthogonal views.
SUBROUTINE GTXYZC(X, Y, Z, IC, NOMDES) CHARACTER*(*) IC REAL X, Y, Z INTEGER NOMDES
returns the coordinates in the 3D space of a point obtained by entering two points in two distinct orthogonal views successively, in X, Y, Z. The coordinates are expressed in the user space specified in subroutine DEFWSP.
This subroutine also returns the last character typed (for the case when a character must be typed to enter a point), in IC.
NOMDES is the segment number used by this subroutine to ensure that the positions input are reflected on the screen.