Debian Codegraph @

packages/seacas/libraries/plt/mport2.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 LOGICAL FUNCTION MPORT2(LEFT,RIGHT,BOTTOM,TOP)
9 REAL LEFT
10 CHARACTER*6 SUBNAM
11 PARAMETER (SUBNAM='MPORT2')
12 COMMON /MAP/MODEL(4,4),VIEW(4,4),PROJ(4,4),CPNEAR,CPFAR,VWPORT(4),
13 * MVP(4,4),VP(4,4),CPLINE(2,2,10),CPPLAN(2,3,10),PEYE(3),
14 * PLOOK(3),ETWIST,NCPLIN,NCPLAN,TMAT1(4,4),TMAT2(4,4),
15 * TMAT3(4,4),TVEC1(4),TVEC2(4),TVEC3(4),TVEC4(4),TARR1(32),
16 * TARR2(32),TARR3(32),TARR4(32),TARR5(32),TARR6(32),
17 * TARR7(32),TARR8(32)
18 REAL MODEL,MVP
19
20 MPORT2 = .FALSE.
21 IF (RIGHT.EQ.LEFT) THEN
22 CALL PLTFLU
23 CALL SIORPT(SUBNAM,
24 *'You cannot specify the right and left edges of the clipping recta
25 *ngle as equal',2)
26 RETURN
27
28 END IF
29
30 IF (TOP.EQ.BOTTOM) THEN
31 CALL PLTFLU
32 CALL SIORPT(SUBNAM,
33 *'You cannot specify the top and bottom edges of the clipping recta
34 *ngle as equal',2)
35 RETURN
36
37 END IF
38
39 MPORT2 = .TRUE.
40 CALL MXZERO(4,PROJ)
41 PROJ(1,1) = 2./ (RIGHT-LEFT)
42 PROJ(2,2) = 2./ (TOP-BOTTOM)
43 PROJ(3,3) = -1.
44 PROJ(4,4) = 1.
45 PROJ(4,1) = - (RIGHT+LEFT)/ (RIGHT-LEFT)
46 PROJ(4,2) = - (TOP+BOTTOM)/ (TOP-BOTTOM)
47 CALL MXMULT(4,VIEW,PROJ,VP)
48 CALL MXMULT(4,MODEL,VP,MVP)
49 RETURN
50
51 END