]> git.uio.no Git - u/mrichter/AliRoot.git/blame - GEANT321/gdraw/gdinit.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdinit.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:23 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.26 by S.Giani
11*-- Author :
12 SUBROUTINE GDINIT
13C.
14C. ******************************************************************
15C. * *
16C. * Initialize the drawing package *
17C. * *
18C. * ==>Called by : <USER> UGINIT *
19C. * Author : P.Zanarini ; S.Giani ********* *
20C. * *
21C. ******************************************************************
22C.
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"
30 COMMON/INIFIR/NFIRST
31 DIMENSION GR0(10),GT0(3)
32#if defined(CERNLIB_CG)
33 DIMENSION V(3),T(4,3)
34#endif
35C
36 SAVE GR0,GT0
37 DATA GR0/1.,0.,0.,0.,1.,0.,0.,0.,1.,0./
38 DATA GT0/0.,0.,0./
39C.
40C. ------------------------------------------------------------------
41C.
42C Initialize general drawing parameters:
43C
44C NGVIEW = Flag for GDFR3D, set to 0 if one wants GDFR3D to
45C compute new transformation matrix
46C NKVIEW = Total number of view banks
47C IDVIEW = Actual view bank (0 means screen)
48C GTHETA,GPHI,...,GSCV = Initial values for GDRAW calling parameters
49C GZUA,GZVA,GZUB,GZVB,GZUC,GZVC = Zoom parameters
50C DPERS = Distance from the center of projection
51C (i.e. viewing position) at Z=-DPERS
52C and the projection plane at Z=0
53C LINBUF = Flag to determine if GDRAWV has to perform
54C line buffering logic (LINBUF=1) or not
55C IPIONS = Flag for GDFR3D, set to 1 if PIONS is used
56C IGMR = Flag for GDFR3D, set to 1 if APOLLO-GMR is used
57C IPKHIT = Flag for GPHITS (normally 0); if >0 then print only
58C hit nr. IPKHIT
59C IDRNUM = Flag for GDRAW, set to 1 when called by GDRVOL
60C PLTRNX = Screen and plotter X range, PLTRNX x PLTRNY cm.
61C PLTRNY = Screen and plotter Y range, PLTRNX x PLTRNY cm.
62*** RNGU1,RNGU2,RNGV1,RNGV2 = Limits of user coordinates (2D window)
63C
64 IF(IFINIT(14).NE.0)RETURN
65 IFINIT(14)=1
66 NFIRST=0
67 NGVIEW=0
68 NKVIEW = 0
69 IDVIEW= 0
70 GTHETA=45.
71 GPHI=135.
72 GPSI=0.
73 GU0=10.
74 GV0=10.
75 GSCU=0.015
76 GSCV=0.015
77 SINPSI=SIN(GPSI*DEGRAD)
78 COSPSI=COS(GPSI*DEGRAD)
79 GZUA=1
80 GZVA=1
81 GZUB=0
82 GZVB=0
83 GZUC=0
84 GZVC=0
85 DPERS=1000
86 LINBUF=0
87 IPIONS=0
88 IGMR=0
89 IPKHIT=0
90 IDRNUM=0
91 PLTRNX=20.
92 PLTRNY=20.
93C
94C LINATT = Current line attributes
95C LINATP = Permanent line attributes
96C ITXATT = Current text attributes
97C
98 LINCOL=1
99 LINWID=1
100 LINSTY=1
101 LINFIL=0
102 LEP=1
103C
104 LINATT=0
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)
109C
110 LINATP=LINATT
111C
112 ITXWID=1
113 ITXCOL=1
114C
115 ITXATT=0
116 CALL MVBITS(ITXWID,0,3,ITXATT,0)
117 CALL MVBITS(ITXCOL,0,4,ITXATT,3)
118C
119C Initialize drawing options:
120C
121C ITR3D = Flag for GDFR3D : ITR3D=0 for standard projection,
122C ITR3D <> 0 for rotation + projection i.e. R-Z projection
123C (refer to the header comments of GDFR3D
124C to have a detailed explanation of the steps
125C from 3D to 2D)
126C
127C ITHRZ = Flag for GDHITS/GDCXYZ/GDXYZ : if not set to 'OFF ' all t
128C hits and tracks drawing routines will apply an R-Z
129C projection in case of SIDE or TOP view
130C
131C IOBJ = Type of object being currently drawn :
132C
133C 1 : VOLUME
134C 2 : TRACK
135C 3 : HIT
136C 0 : None or any other object (axes,header,text,etc.)
137C
138C IPRJ = Flag for GDFR3D :
139C
140C 'PARA' : Ortographic parallel projection (default)
141C 'PERS' : Perspective projection
142C
143C ITRKOP = Flag for GDXYZ :
144C
145C 'LINE' : Lines joining track points are drawn
146C 'POIN' : Only the track points are drawn
147C
148 ITR3D=0
149 CALL UCTOH('OFF ',ITHRZ,4,4)
150 IOBJ=0
151 CALL UCTOH('PARA',IPRJ,4,4)
152 CALL UCTOH('LINE',ITRKOP,4,4)
153 CALL UCTOH('OFF ',IHIDEN,4,4)
154C
155C Initialize Color look up table
156C
157 DO 10 I=1,16
158 10 LOOKTB(I)=I
159C
160C Define tree parameters:
161C
162C NWCUT = Max words allocated to be used by the cut routines
163C
164 NWCUT=5000
165C
166C Initialize to unitary transformation
167C
168 DO 20 I=1,3
169 20 GTRAN0(I)=GT0(I)
170 DO 30 I=1,10
171 30 GRMAT0(I)=GR0(I)
172C
173C Set display and user coordinate systems
174C
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)
179 CALL IGSA(0)
180*JS
181*
182* Setting the Viewing parameters to THETA =0., PHI=0., PSI=0.
183*
184#if defined(CERNLIB_CG)
185 NCVOLS=0
186 NSHIFT=0
187 KSHIFT=0
188 IHOLE=0
189 CGXMIN=-10000.
190 CGXMAX=-9999.
191 CGYMIN=-10000.
192 CGYMAX=-9999.
193 CGZMIN=-10000.
194 CGZMAX=-9999.
195 V(1)=0.
196 V(2)=0.
197 V(3)=0.
198 CALL GDCGVW(V,T)
199 CALL CGTSET(NTRCG,T,IREP)
200#endif
201*JS
202C
203C Book JDRAW structure for view banks
204C
205 IF (JDRAW.LE.0) CALL MZBOOK(IXCONS,JDRAW,JDRAW,1,'DRAW',0,0,0,3,0)
206C
207 END
208