Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #pragma once
0002 
0003 #include <array>
0004 #include <vector>
0005 
0006 /**
0007 DemoGrid
0008 =========
0009 
0010 Input high level specification example. 
0011 Should not be part of the CSG model.
0012 
0013 Currently using glm::mat4 for the transforms but as 
0014 there are no rotations there is not much reason for this. 
0015 Using qat4.h would avoid the Sys.h, due to inherent multi-typing. 
0016 
0017 Actually is makes more sense for the foundry to hold
0018 the transforms and for DemoGrid+Geo to just act as an example interface 
0019 to populating the foundry.
0020 
0021 The foundry is central to the CSG model.
0022 
0023 **/
0024 
0025 struct CSGFoundry ; 
0026 
0027 
0028 struct DemoGrid
0029 { 
0030     static float4 AddInstances( CSGFoundry* foundry_, unsigned ias_idx_, unsigned num_solid_ ); 
0031 
0032     CSGFoundry*            foundry ; 
0033     unsigned               ias_idx ; 
0034     unsigned               num_solid ; 
0035     float                  gridscale ; 
0036 
0037     std::array<int,9>      grid ; 
0038     std::vector<unsigned>  solid_modulo ;  
0039     std::vector<unsigned>  solid_single ;  
0040 
0041     DemoGrid(CSGFoundry* foundry, unsigned ias_idx, unsigned num_solid);
0042     const float4 center_extent() const ;
0043 
0044     void init(); 
0045 
0046 };
0047 
0048