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

Comparing ray/src/cv/pabopto2xml.c (file contents):
Revision 2.6 by greg, Sun Aug 26 19:40:02 2012 UTC vs.
Revision 2.7 by greg, Sun Sep 2 15:33:15 2012 UTC

# Line 38 | Line 38 | typedef struct {
38          unsigned char   gx, gy;         /* grid position */
39   } RBFVAL;                       /* radial basis function value */
40  
41 < typedef struct s_rbflist {
42 <        struct s_rbflist        *next;          /* next in our RBF list */
41 > struct s_rbfnode;               /* forward declaration of RBF struct */
42 >
43 > typedef struct s_migration {
44 >        struct s_migration      *next;          /* next in global edge list */
45 >        struct s_rbfnode        *rbfv[2];       /* from,to vertex */
46 >        struct s_migration      *enxt[2];       /* next from,to sibling */
47 >        float                   mtx[1];         /* matrix (extends struct) */
48 > } MIGRATION;                    /* migration link (winged edge structure) */
49 >
50 > typedef struct s_rbfnode {
51 >        struct s_rbfnode        *next;          /* next in global RBF list */
52 >        MIGRATION               *ejl;           /* edge list for this vertex */
53          FVECT                   invec;          /* incident vector direction */
54          int                     nrbf;           /* number of RBFs */
55          RBFVAL                  rbfa[1];        /* RBF array (extends struct) */
# Line 50 | Line 60 | static double  theta_in_deg, phi_in_deg;
60   static GRIDVAL  dsf_grid[GRIDRES][GRIDRES];
61  
62                                  /* processed incident DSF measurements */
63 < static RBFLIST  *dsf_list = NULL;
63 > static RBFLIST          *dsf_list = NULL;
64  
65 +                                /* edge (linking) matrices */
66 + static MIGRATION        *mig_list = NULL;
67 +
68 + #define mtxval(m,i,j)   (m)->mtx[(i)*(m)->rbfv[1]->nrbf+(j)]
69 + #define nextedge(rbf,m) (m)->enxt[(rbf)==(m)->rbfv[1]]
70 +
71   /* Compute outgoing vector from grid position */
72   static void
73   vec_from_pos(FVECT vec, int xpos, int ypos)
# Line 123 | Line 139 | make_rbfrep(void)
139                  exit(1);
140          }
141          newnode->next = NULL;
142 +        newnode->ejl = NULL;
143          newnode->invec[2] = sin(M_PI/180.*theta_in_deg);
144          newnode->invec[0] = cos(M_PI/180.*phi_in_deg)*newnode->invec[2];
145          newnode->invec[1] = sin(M_PI/180.*phi_in_deg)*newnode->invec[2];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines