Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:22

0001 #include <cstdlib>
0002 #include <iostream>
0003 #include <glm/gtx/string_cast.hpp>
0004 
0005 #include "ssys.h"
0006 #include "strid.h"
0007 #include "snode.h"
0008 #include "stree.h"
0009 
0010 const char* BASE = getenv("BASE"); 
0011 
0012 int main(int argc, char** argv)
0013 {
0014     stree st ; 
0015 
0016     snode nd ; 
0017     nd = {} ; 
0018     nd.sensor_id = -1 ; 
0019     nd.sensor_index = -1 ; 
0020  
0021     st.nds.push_back(nd); 
0022 
0023     glm::tmat4x4<double> tr_m2w(1.) ;   
0024     glm::tmat4x4<double> tr_w2m(1.) ; 
0025     int gas_idx = 1 ; 
0026     int nidx = 0 ; 
0027     st.add_inst(tr_m2w, tr_w2m, gas_idx, nidx ); 
0028 
0029     st.narrow_inst(); 
0030 
0031     std::cout << st.desc_inst() << std::endl ; 
0032     std::cout << " tr_m2w " << strid::Desc<double, int64_t>(tr_m2w) << std::endl ; 
0033 
0034     const glm::tmat4x4<double>& inst_0 = st.inst[0] ;  
0035     std::cout << " inst_0 " << strid::Desc<double, int64_t>(inst_0) << std::endl ; 
0036 
0037     const glm::tmat4x4<float>& inst_f4_0 = st.inst_f4[0] ;  
0038     std::cout << " inst_f4_0 " << strid::Desc<float, int32_t>(inst_f4_0) << std::endl ; 
0039 
0040 
0041     st.save(BASE); 
0042 
0043 
0044     return 0 ; 
0045 }
0046 
0047 
0048