Ignore:
Timestamp:
01/09/08 11:14:26 (17 years ago)
Author:
bittner
Message:

Havran Ray Caster compiles and links, but still does not work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp

    r2574 r2582  
    2727  //#define Q_SEARCH_STEPS 3 
    2828 
    29 #define SORT_RAY_ENTRIES 1 
     29  // VH - commened out !!!!! 8/1/2008 
     30  // #define SORT_RAY_ENTRIES 1 
    3031 
    3132// use avg ray contribution as importance 
     
    367368  static Vector3 dirs[packetSize]; 
    368369  static Vector3 shifts[packetSize]; 
     370  static Vector3 origs[packetSize]; 
    369371  // now find the silhouette along the line 
    370372  int i; 
     
    378380          shifts[i] = r*line; 
    379381          dirs[i] = Normalize(newPivot + shifts[i] - termination ); 
    380           mlrtaStoreRayASEye4(&termination.x, 
    381                                                   &dirs[i].x, 
    382                                                   i); 
    383         } 
    384          
    385         mlrtaTraverseGroupASEye4(&box.Min().x, 
    386                                                          &box.Max().x, 
    387                                                          hit_triangles, 
    388                                                          dist); 
     382          origs[i] = termination; 
     383          // mlrtaStoreRayASEye4(&termination.x, &dirs[i].x, i); 
     384        } 
     385 
     386        // mlrtaTraverseGroupASEye4(&box.Min().x, &box.Max().x, hit_triangles, dist); 
     387        assert(preprocessor->mRayCaster); 
     388        preprocessor->mRayCaster->CastRaysPacket4(box.Min(), 
     389                                                                                          box.Max(), 
     390                                                                                          origs, dirs, 
     391                                                                                          hit_triangles, 
     392                                                                                          dist);        
    389393         
    390394        for (i=0; i < packetSize; i++) { 
    391395          if (hit_triangles[i] == -1) { 
    392                 // break on first passing ray 
    393                 break; 
     396            // break on first passing ray 
     397            break; 
    394398          } 
    395399        } 
     
    473477  static Vector3 dirs[packetSize]; 
    474478  static Vector3 shifts[packetSize]; 
     479  static Vector3 origs[packetSize]; 
    475480  // mutate the  
    476481  float alpha = RandomValue(0.0f, Real(2.0*M_PI)); 
     
    491496          shifts[i] = r*line; 
    492497          dirs[i] = Normalize(ray.mTermination + shifts[i] - origin ); 
    493           mlrtaStoreRayASEye4(&origin.x, 
    494                                                   &dirs[i].x, 
    495                                                   i); 
    496         } 
    497          
    498         mlrtaTraverseGroupASEye4(&box.Min().x, 
    499                                                          &box.Max().x, 
    500                                                          hit_triangles, 
    501                                                          dist); 
     498          origs[i] = origin; 
     499          //mlrtaStoreRayASEye4(&origin.x, &dirs[i].x, i); 
     500        } 
     501         
     502        // mlrtaTraverseGroupASEye4(&box.Min().x, &box.Max().x, hit_triangles, dist); 
     503        assert(preprocessor->mRayCaster); 
     504        preprocessor->mRayCaster->CastRaysPacket4(box.Min(), box.Max(), 
     505                                                  origs, dirs, hit_triangles, dist);        
    502506         
    503507        for (i=0; i < packetSize; i++) { 
Note: See TracChangeset for help on using the changeset viewer.