Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/include/Diderot/inline-image.h
ViewVC logotype

Diff of /branches/vis12/src/include/Diderot/inline-image.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1963, Tue Jul 10 22:44:33 2012 UTC revision 1964, Tue Jul 10 23:36:20 2012 UTC
# Line 130  Line 130 
130      mulMat3x3Mat3x3 (dst, tmp, img->w2i);      mulMat3x3Mat3x3 (dst, tmp, img->w2i);
131  }  }
132    
133    STATIC_INLINE void ToWorldSpace3x3x3 (Diderot_Ten3x3x3_t dst, Diderot_image3D_t *img, Diderot_Ten3x3x3_t src)
134    {
135    #define PROD(m,n,p)     img->w2i[i].r[m] * img->w2i[j].r[n] * img->w2i[k].r[p] * src[m][n].r[p]
136    
137        for (int i = 0;  i < 3;  i++) {
138            for (int j = 0;  j < 3;  j++) {
139                for (int k = 0;  k < 3;  k++) {
140                    dst[i][j].r[k] =
141                        PROD(0,0,0) + PROD(0,0,1) + PROD(0,0,2) +
142                        PROD(0,1,0) + PROD(0,1,1) + PROD(0,1,2) +
143                        PROD(0,2,0) + PROD(0,2,1) + PROD(0,2,2) +
144                        PROD(1,0,0) + PROD(1,0,1) + PROD(1,0,2) +
145                        PROD(1,1,0) + PROD(1,1,1) + PROD(1,1,2) +
146                        PROD(1,2,0) + PROD(1,2,1) + PROD(1,2,2) +
147                        PROD(2,0,0) + PROD(2,0,1) + PROD(2,0,2) +
148                        PROD(2,1,0) + PROD(2,1,1) + PROD(2,1,2) +
149                        PROD(2,2,0) + PROD(2,2,1) + PROD(2,2,2);
150                }
151            }
152        }
153    
154    #undef PROD
155    }
156    
157  #endif /* !_DIDEROT_INLINE_IMAGE_H_ */  #endif /* !_DIDEROT_INLINE_IMAGE_H_ */

Legend:
Removed from v.1963  
changed lines
  Added in v.1964

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0