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

Comparing ray/src/util/rmatrix.h (file contents):
Revision 2.13 by greg, Tue Jan 19 23:32:00 2021 UTC vs.
Revision 2.14 by greg, Fri Mar 4 01:27:12 2022 UTC

# Line 16 | Line 16 | extern "C" {
16          transmission, reflection front (normal side), reflection back */
17   typedef enum {RMPtrans=0, RMPreflF, RMPreflB} RMPref;
18  
19 < /* General plane-ordered component matrix */
19 > /* General [row][col][cmp] component matrix */
20   typedef struct {
21 +        char    *info;
22 +        void    *mapped;
23 +        double  *mtx;
24 +        COLOR   cexp;
25          int     nrows, ncols;
26          short   ncomp;
27          uby8    dtype;
28          uby8    swapin;
25        char    *info;
26        double  mtx[3];                 /* extends struct */
29   } RMATRIX;
30  
31   #define rmx_lval(rm,r,c,i)      (rm)->mtx[(i)+(rm)->ncomp*((c)+(size_t)(rm)->ncols*(r))]
32  
33 < /* Allocate a nr x nc matrix with n components */
33 > /* Initialize a RMATRIX struct but don't allocate array space */
34 > extern RMATRIX  *rmx_new(int nr, int nc, int n);
35 >
36 > /* Prepare a RMATRIX for writing (allocate array if needed) */
37 > extern int      rmx_prepare(RMATRIX *rm);
38 >
39 > /* Call rmx_new() and rmx_prepare() */
40   extern RMATRIX  *rmx_alloc(int nr, int nc, int n);
41  
42   /* Free a RMATRIX array */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines