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/inline-image.h
ViewVC logotype

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

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

revision 723, Fri Apr 1 22:55:25 2011 UTC revision 724, Fri Apr 1 22:56:25 2011 UTC
# Line 17  Line 17 
17    
18  // 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.
19  //  //
20  STATIC_INLINE bool Diderot_Inside2f (vec2f_t posArg, Diderot_image3D_t *img, int s)  STATIC_INLINE bool Diderot_Inside2f (vec2f_t posArg, Diderot_image2D_t *img, int s)
21  {  {
22  // NOTE: there might be a vectorized way to do this compare!  // NOTE: there might be a vectorized way to do this compare!
23  // cvtps2pi -- converts vector of floats to vector of int32_t values  // cvtps2pi -- converts vector of floats to vector of int32_t values
# Line 28  Line 28 
28          &&  (s-1 < pos.r[1]) && (pos.r[1] < (img->size[1] - s)));          &&  (s-1 < pos.r[1]) && (pos.r[1] < (img->size[1] - s)));
29  }  }
30    
31    STATIC_INLINE vec2f_t Diderot_ToImageSpace2f (Diderot_image2D_t *img, vec2f_t posArg)
32    {
33        vec3f_t p = __extension__ vec3f(
34            ((union2f_t)posArg).r[0],
35            ((union2f_t)posArg).r[1],
36            1.0f);
37    
38        return vec2f(
39            dot3f(img->mInv[0].v, p),
40            dot3f(img->mInv[1].v, p));
41    }
42    
43  // 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.
44  //  //
45  STATIC_INLINE bool Diderot_Inside3f (vec3f_t posArg, Diderot_image3D_t *img, int s)  STATIC_INLINE bool Diderot_Inside3f (vec3f_t posArg, Diderot_image3D_t *img, int s)

Legend:
Removed from v.723  
changed lines
  Added in v.724

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