5 * Revision 1.1.1.1 1995/10/24 10:20:23 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 29/03/94 15.41.26 by S.Giani
14 C. ******************************************************************
16 C. * Initialize the drawing package *
18 C. * ==>Called by : <USER> UGINIT *
19 C. * Author : P.Zanarini ; S.Giani ********* *
21 C. ******************************************************************
23 #include "geant321/gcbank.inc"
24 #include "geant321/gcflag.inc"
25 #include "geant321/gcdraw.inc"
26 #include "geant321/gconsp.inc"
27 #include "geant321/gcgobj.inc"
28 #include "geant321/gcmutr.inc"
29 #include "geant321/gcspee.inc"
31 DIMENSION GR0(10),GT0(3)
32 #if defined(CERNLIB_CG)
37 DATA GR0/1.,0.,0.,0.,1.,0.,0.,0.,1.,0./
40 C. ------------------------------------------------------------------
42 C Initialize general drawing parameters:
44 C NGVIEW = Flag for GDFR3D, set to 0 if one wants GDFR3D to
45 C compute new transformation matrix
46 C NKVIEW = Total number of view banks
47 C IDVIEW = Actual view bank (0 means screen)
48 C GTHETA,GPHI,...,GSCV = Initial values for GDRAW calling parameters
49 C GZUA,GZVA,GZUB,GZVB,GZUC,GZVC = Zoom parameters
50 C DPERS = Distance from the center of projection
51 C (i.e. viewing position) at Z=-DPERS
52 C and the projection plane at Z=0
53 C LINBUF = Flag to determine if GDRAWV has to perform
54 C line buffering logic (LINBUF=1) or not
55 C IPIONS = Flag for GDFR3D, set to 1 if PIONS is used
56 C IGMR = Flag for GDFR3D, set to 1 if APOLLO-GMR is used
57 C IPKHIT = Flag for GPHITS (normally 0); if >0 then print only
59 C IDRNUM = Flag for GDRAW, set to 1 when called by GDRVOL
60 C PLTRNX = Screen and plotter X range, PLTRNX x PLTRNY cm.
61 C PLTRNY = Screen and plotter Y range, PLTRNX x PLTRNY cm.
62 *** RNGU1,RNGU2,RNGV1,RNGV2 = Limits of user coordinates (2D window)
64 IF(IFINIT(14).NE.0)RETURN
77 SINPSI=SIN(GPSI*DEGRAD)
78 COSPSI=COS(GPSI*DEGRAD)
94 C LINATT = Current line attributes
95 C LINATP = Permanent line attributes
96 C ITXATT = Current text attributes
105 CALL MVBITS(LINCOL,0,8,LINATT,16)
106 CALL MVBITS(LINWID,0,3,LINATT,7)
107 CALL MVBITS(LINSTY,0,3,LINATT,10)
108 CALL MVBITS(LINFIL,0,3,LINATT,13)
116 CALL MVBITS(ITXWID,0,3,ITXATT,0)
117 CALL MVBITS(ITXCOL,0,4,ITXATT,3)
119 C Initialize drawing options:
121 C ITR3D = Flag for GDFR3D : ITR3D=0 for standard projection,
122 C ITR3D <> 0 for rotation + projection i.e. R-Z projection
123 C (refer to the header comments of GDFR3D
124 C to have a detailed explanation of the steps
127 C ITHRZ = Flag for GDHITS/GDCXYZ/GDXYZ : if not set to 'OFF ' all t
128 C hits and tracks drawing routines will apply an R-Z
129 C projection in case of SIDE or TOP view
131 C IOBJ = Type of object being currently drawn :
136 C 0 : None or any other object (axes,header,text,etc.)
138 C IPRJ = Flag for GDFR3D :
140 C 'PARA' : Ortographic parallel projection (default)
141 C 'PERS' : Perspective projection
143 C ITRKOP = Flag for GDXYZ :
145 C 'LINE' : Lines joining track points are drawn
146 C 'POIN' : Only the track points are drawn
149 CALL UCTOH('OFF ',ITHRZ,4,4)
151 CALL UCTOH('PARA',IPRJ,4,4)
152 CALL UCTOH('LINE',ITRKOP,4,4)
153 CALL UCTOH('OFF ',IHIDEN,4,4)
155 C Initialize Color look up table
160 C Define tree parameters:
162 C NWCUT = Max words allocated to be used by the cut routines
166 C Initialize to unitary transformation
173 C Set display and user coordinate systems
175 CALL ISWN(1,0.,PLTRNX,0.,PLTRNY)
176 CALL ISVP(1,0.,1.,0.,1.)
177 CALL IGSET('TXFP',-61.)
178 CALL IGRNG(PLTRNX,PLTRNY)
182 * Setting the Viewing parameters to THETA =0., PHI=0., PSI=0.
184 #if defined(CERNLIB_CG)
199 CALL CGTSET(NTRCG,T,IREP)
203 C Book JDRAW structure for view banks
205 IF (JDRAW.LE.0) CALL MZBOOK(IXCONS,JDRAW,JDRAW,1,'DRAW',0,0,0,3,0)