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

SCM Repository

[diderot] Diff of /trunk/test/MIP/mip_c.c
ViewVC logotype

Diff of /trunk/test/MIP/mip_c.c

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

revision 437, Tue Oct 19 16:50:13 2010 UTC revision 438, Tue Oct 19 20:38:10 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      pos = pos + stepSz*dir;  //    pos = pos + stepSz*dir;
97      if (inside (pos,F)) {  //    if (inside (pos,F)) {
98        real val = F@pos;  //      real val = F@pos;
99        maxval = max(val, maxval);  //      maxval = max(val, maxval);
100      }  //    }
101      if (t > 20.0)  //    if (t > 20.0)
102          stabilize;  //      stabilize;
103      t = t + stepSz;  //    t = t + stepSz;
104        Diderot_AddScaledV3 (&pos, &pos, glob->stepSz, &pos);
105  }  }
106    
107  void Global_init (GlobalState_t *glob)  void Global_init (GlobalState_t *glob)
108  {  {
109      if (Diderot_input_string("dataFile", &(glob->dataFile))      glob->stepSz = 0.1f;  // default value
110      || Diderot_input_real_with_default("stepSz", &(glob->stepSz), 0.1f)  
111      || Diderot_input_vec3("eye", &(glob->eye))      if ((Diderot_InputString("dataFile", &(glob->dataFile), false) != DIDEROT_OK)
112      || Diderot_input_vec3("orig", &(glob->orig))      || (Diderot_InputReal("stepSz", &(glob->stepSz), true) != DIDEROT_OK)
113      || Diderot_input_vec3("cVec", &(glob->cVec))      || (Diderot_InputVec3("eye", &(glob->eye), false) != DIDEROT_OK)
114      || Diderot_input_vec3("rVec", &(glob->rVec)))      || (Diderot_InputVec3("orig", &(glob->orig), false) != DIDEROT_OK)
115        || (Diderot_InputVec3("cVec", &(glob->cVec), false) != DIDEROT_OK)
116        || (Diderot_InputVec3("rVec", &(glob->rVec), false) != DIDEROT_OK))
117        // error processing inputs        // error processing inputs
118          exit (1);          exit (1);
119    
120    // image(3)[] img = load (dataFile);    // image(3)[] img = load (dataFile);
121        if (Diderot_LoadImage3D(glob->dataFile, &(glob->img)))
122          // error loading image data
123            exit (1);
124    
125  }  }
126    

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

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