Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:54

0001 // ./GeoTest.sh
0002 
0003 #include <vector>
0004 #include <cassert>
0005 #include <iostream>
0006 
0007 #include "scuda.h"
0008 #include "CSGFoundry.h"
0009 #include "CSGSolid.h"
0010 
0011 #include "Scan.h"
0012 #include "Geo.h"
0013 #include "Util.h"
0014 #include "View.h"
0015 
0016 int main(int argc, char** argv)
0017 {
0018     CSGFoundry foundry ;  
0019     Geo geo(&foundry) ; 
0020 
0021     unsigned width = 1280u ; 
0022     unsigned height = 720u ; 
0023 
0024     glm::vec4 eye_model ; 
0025     Util::GetEVec(eye_model, "EYE", "-1.0,-1.0,1.0,1.0"); 
0026 
0027     const float4 gce = geo.getCenterExtent() ;   
0028     glm::vec4 ce(gce.x,gce.y,gce.z, gce.w*1.4f );   // defines the center-extent of the region to view
0029 
0030     View view = {} ; 
0031     view.update(eye_model, ce, width, height) ; 
0032     view.dump("View::dump"); 
0033     view.save("/tmp");  
0034 
0035     const char* dir = "/tmp/GeoTest_scans" ; 
0036 
0037     const CSGSolid* solid0 = foundry.getSolid(0); 
0038 
0039     Scan scan(dir, &foundry, solid0 ); 
0040     scan.axis_scan() ; 
0041     scan.rectangle_scan() ; 
0042     scan.circle_scan() ; 
0043 
0044     return 0 ;  
0045 }