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

SCM Repository

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

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

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

revision 2666, Wed Jun 4 01:59:49 2014 UTC revision 2667, Thu Jun 5 18:54:12 2014 UTC
# Line 35  Line 35 
35  {  {
36      return ((s-1 < pos) && (pos < (img->size[0] - s)));      return ((s-1 < pos) && (pos < (img->size[0] - s)));
37  }  }
38    /*
39  STATIC_INLINE Diderot_real_t ToImageSpace1 (Diderot_image1D_t *img, Diderot_real_t pos)  STATIC_INLINE Diderot_real_t ToImageSpace1 (Diderot_image1D_t *img, Diderot_real_t pos)
40  {  {
41      return img->s * pos + img->t;      return img->s * pos + img->t;
42  }  }
43    
44    */
45  /***** 2D Image functions *****/  /***** 2D Image functions *****/
46    
47  // check if pos is inside the img, assuming that we have a border of width s.  // check if pos is inside the img, assuming that we have a border of width s.
# Line 57  Line 57 
57          &&  (s-1 < pos.r[1]) && (pos.r[1] < (img->size[1] - s)));          &&  (s-1 < pos.r[1]) && (pos.r[1] < (img->size[1] - s)));
58  }  }
59    
60    /*
61  STATIC_INLINE Diderot_vec2_t ToImageSpace2 (Diderot_image2D_t *img, Diderot_vec2_t p)  STATIC_INLINE Diderot_vec2_t ToImageSpace2 (Diderot_image2D_t *img, Diderot_vec2_t p)
62  {  {
63      return vec2(dot2(img->w2i[0].v, p), dot2(img->w2i[1].v, p)) + img->tVec;      return vec2(dot2(img->w2i[0].v, p), dot2(img->w2i[1].v, p)) + img->tVec;
64  }  }
65    
66    
67  STATIC_INLINE Diderot_vec2_t ToWorldSpace2 (Diderot_image2D_t *img, Diderot_vec2_t g)  STATIC_INLINE Diderot_vec2_t ToWorldSpace2 (Diderot_image2D_t *img, Diderot_vec2_t g)
68  {  {
69      return vec2(      return vec2(
# Line 92  Line 94 
94    
95  #undef PROD  #undef PROD
96  }  }
97    */
98    
99  /***** 3D Image functions *****/  /***** 3D Image functions *****/
100    
# Line 109  Line 111 
111          &&  (s-1 < pos.r[1]) && (pos.r[1] < (img->size[1] - s))          &&  (s-1 < pos.r[1]) && (pos.r[1] < (img->size[1] - s))
112          &&  (s-1 < pos.r[2]) && (pos.r[2] < (img->size[2] - s)));          &&  (s-1 < pos.r[2]) && (pos.r[2] < (img->size[2] - s)));
113  }  }
114    /*
115  STATIC_INLINE Diderot_vec3_t ToImageSpace3 (Diderot_image3D_t *img, Diderot_vec3_t p)  STATIC_INLINE Diderot_vec3_t ToImageSpace3 (Diderot_image3D_t *img, Diderot_vec3_t p)
116  {  {
117      return vec3(dot3(img->w2i[0].v, p), dot3(img->w2i[1].v, p), dot3(img->w2i[2].v, p)) + img->tVec;      return vec3(dot3(img->w2i[0].v, p), dot3(img->w2i[1].v, p), dot3(img->w2i[2].v, p)) + img->tVec;
# Line 152  Line 154 
154      }      }
155    
156  #undef PROD  #undef PROD
157  }  }*/
158    
159  #endif /* !_DIDEROT_INLINE_IMAGE_H_ */  #endif /* !_DIDEROT_INLINE_IMAGE_H_ */

Legend:
Removed from v.2666  
changed lines
  Added in v.2667

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