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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/include/Diderot/diderot.h
ViewVC logotype

Diff of /branches/pure-cfg/src/include/Diderot/diderot.h

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

revision 578, Sun Mar 6 19:53:19 2011 UTC revision 579, Sun Mar 6 22:26:51 2011 UTC
# Line 14  Line 14 
14  #ifndef _DIDEROT_H_  #ifndef _DIDEROT_H_
15  #define _DIDEROT_H_  #define _DIDEROT_H_
16    
17    #ifdef NDEBUG
18  #define STATIC_INLINE   static inline  #define STATIC_INLINE   static inline
19    #else
20    #define STATIC_INLINE   static
21    #endif
22    
23  #include <stdint.h>  #include <stdint.h>
24  #include <stdbool.h>  #include <stdbool.h>
# Line 88  Line 92 
92  typedef Diderot_real_t Diderot_Mat2x2_t[4];  typedef Diderot_real_t Diderot_Mat2x2_t[4];
93  typedef Diderot_real_t Diderot_Mat3x3_t[9];  typedef Diderot_real_t Diderot_Mat3x3_t[9];
94  typedef union4f_t Diderot_Mat4x4_t[4];  // represented as row vectors  typedef union4f_t Diderot_Mat4x4_t[4];  // represented as row vectors
95    //typedef struct {
96    //    float     m[16] __attribute__((aligned(16)));     // individual elements
97    //} Diderot_Mat4x4_t;
98    
99  typedef struct {                // wrapper for 1D image data  typedef struct {                // wrapper for 1D image data
100      uint32_t    dim;            // dimension (== 1)      uint32_t    dim;            // dimension (== 1)
# Line 229  Line 236 
236    
237  STATIC_INLINE vec3f_t Diderot_ToImageSpace3f (Diderot_image3D_t *img, vec3f_t posArg)  STATIC_INLINE vec3f_t Diderot_ToImageSpace3f (Diderot_image3D_t *img, vec3f_t posArg)
238  {  {
239        Diderot_Mat4x4_t *m = &(img->mInv);
240    
241      vec4f_t p = vec4f(      vec4f_t p = vec4f(
242          ((union3f_t)posArg).r[0],          ((union3f_t)posArg).r[0],
243          ((union3f_t)posArg).r[0],          ((union3f_t)posArg).r[1],
244          ((union3f_t)posArg).r[0],          ((union3f_t)posArg).r[2],
245          1.0f);          1.0f);
246    
247    //    return vec3f(
248    //      dot4f(vec4f(m->m[0], m->m[1], m->m[2], m->m[3]), p),
249    //      dot4f(vec4f(m->m[4], m->m[5], m->m[6], m->m[7]), p),
250    //      dot4f(vec4f(m->m[8], m->m[9], m->m[10], m->m[11]), p));
251      return vec3f(      return vec3f(
252          dot4f(img->mInv[0].v, p),          dot4f(img->mInv[0].v, p),
253          dot4f(img->mInv[1].v, p),          dot4f(img->mInv[1].v, p),

Legend:
Removed from v.578  
changed lines
  Added in v.579

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