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

Comparing ray/src/common/mat4.h (file contents):
Revision 1.1 by greg, Sat Dec 15 14:18:18 1990 UTC vs.
Revision 2.12 by schorsch, Mon Jul 14 22:23:59 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1990 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   * Definitions for 4x4 matrix operations
4   */
5 + #ifndef _RAD_MAT4_H_
6 + #define _RAD_MAT4_H_
7  
8 + #include  <string.h>
9 +
10   #include  "fvect.h"
11  
12 < typedef double  MAT4[4][4];
12 > #ifdef __cplusplus
13 > extern "C" {
14 > #endif
15  
16 < #ifdef  BSD
17 < #define  copymat4(m4a,m4b)      bcopy((char *)m4b,(char *)m4a,sizeof(MAT4))
18 < #else
19 < #define  copymat4(m4a,m4b)      (void)memcpy((char *)m4a,(char *)m4b,sizeof(MAT4))
20 < extern char  *memcpy();
16 > typedef RREAL  MAT4[4][4];
17 >
18 > #define  copymat4(m4a,m4b)      (void)memcpy((void *)m4a,(void *)m4b,sizeof(MAT4))
19 >
20 > #define  MAT4IDENT              { {1.,0.,0.,0.}, {0.,1.,0.,0.}, \
21 >                                {0.,0.,1.,0.}, {0.,0.,0.,1.} }
22 >
23 > extern MAT4  m4ident;
24 >
25 > #define  setident4(m4)          copymat4(m4, m4ident)
26 >
27 >
28 > extern void     multmat4(MAT4 m4a, MAT4 m4b, MAT4 m4c);
29 > extern void     multv3(FVECT v3a, FVECT v3b, MAT4 m4);
30 > extern void     multp3(FVECT p3a, FVECT p3b, MAT4 m4);
31 > extern int      invmat4(MAT4 inverse, MAT4 mat);
32 >
33 >
34 > #ifdef __cplusplus
35 > }
36   #endif
37 + #endif /* _RAD_MAT4_H_ */
38 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines