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

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/MIP/mip_c.c
ViewVC logotype

Diff of /branches/pure-cfg/test/MIP/mip_c.c

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

revision 438, Tue Oct 19 20:38:10 2010 UTC revision 439, Tue Oct 19 22:38:54 2010 UTC
# Line 93  Line 93 
93    
94  void RayCast_update (GlobalState_t *glob, RayCast_t *self)  void RayCast_update (GlobalState_t *glob, RayCast_t *self)
95  {  {
96      // shadow state variables
97        Diderot_vec3 pos, dir;
98        Diderot_real t, maxval;
99    
100  //    pos = pos + stepSz*dir;  //    pos = pos + stepSz*dir;
101  //    if (inside (pos,F)) {  //    if (inside (pos,F)) {
102  //      real val = F@pos;  //      real val = F@pos;
# Line 101  Line 105 
105  //    if (t > 20.0)  //    if (t > 20.0)
106  //      stabilize;  //      stabilize;
107  //    t = t + stepSz;  //    t = t + stepSz;
108      Diderot_AddScaledV3 (&pos, &pos, glob->stepSz, &pos);  
109        Diderot_CopyV3 (&dir, &(glob->dir));
110        Diderot_vec3 _t1;
111        Diderot_ScaleV3 (&_t1, glob->stepSz,, &dir);
112        Diderot_CopyV3 (&pos, &(glob->pos));
113        Diderot_AddV3 (&pos, &pos, &_t);
114    
115    /* ??? */
116        if (/* ?? inside ?? */) {
117            /* ?? probe ?? */
118            maxval = self->maxval;
119            maxval = Diderot_max(val, maxval);
120            self->maxval = maxval;
121        }
122    
123        t = self->t;
124        if (t > 20.0f) {
125            Diderot_CopyV3 (&(glob->pos), &pos);
126            RayCast_stabilize (glob, self);
127            return;
128        }
129    
130        t = t + glob->stepSz;
131    
132        Diderot_CopyV3 (&(glob->pos), &pos);
133        self->t = t;
134        self->maxval = maxval;
135    
136  }  }
137    
138  void Global_init (GlobalState_t *glob)  void Global_init (GlobalState_t *glob)

Legend:
Removed from v.438  
changed lines
  Added in v.439

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