ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/mat4.c
(Generate patch)

Comparing ray/src/common/mat4.c (file contents):
Revision 1.5 by greg, Sat Dec 15 15:01:38 1990 UTC vs.
Revision 2.1 by greg, Tue Nov 12 16:54:53 1991 UTC

# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  "mat4.h"
14  
15 + MAT4  m4ident = MAT4IDENT;
16 +
17   static MAT4  m4tmp;             /* for efficiency */
18  
19  
18 setident4(m4)
19 MAT4  m4;
20 {
21        static MAT4  ident = {
22                1.,0.,0.,0.,
23                0.,1.,0.,0.,
24                0.,0.,1.,0.,
25                0.,0.,0.,1.,
26        };
27        copymat4(m4, ident);
28 }
29
30
20   multmat4(m4a, m4b, m4c)         /* multiply m4b X m4c and put into m4a */
21   MAT4  m4a;
22   register MAT4  m4b, m4c;
# Line 72 | Line 61 | register MAT4  m4;
61   }
62  
63  
75 #ifdef  INVMAT
64   /*
65   * invmat - computes the inverse of mat into inverse.  Returns 1
66   * if there exists an inverse, 0 otherwise.  It uses Gaussian Elimination
# Line 89 | Line 77 | MAT4  mat, inverse;
77          register double temp;
78  
79          copymat4(m4tmp, mat);
80 <        setident(inverse);
80 >        setident4(inverse);
81  
82          for(i = 0; i < 4; i++) {
83                  /* Look for row with largest pivot and swap rows */
# Line 127 | Line 115 | MAT4  mat, inverse;
115   #undef ABS
116   #undef SWAP
117   }
130 #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines