File indexing completed on 2026-04-09 07:49:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <iostream>
0012 #include "OpticksCSG.h"
0013 #include "snd.hh"
0014 #include "sndtree.h"
0015
0016 #include "stree.h"
0017
0018 void test_Inorder(int root)
0019 {
0020 std::vector<int> order ;
0021 snd::Inorder(order, root );
0022
0023 std::cout << " snd::Inorder [ " ;
0024 for(int i=0 ; i < int(order.size()) ; i++) std::cout << order[i] << " " ;
0025 std::cout << "]" << std::endl ;
0026 }
0027
0028
0029
0030 int main(int argc, char** argv)
0031 {
0032 stree st ;
0033
0034 int a = snd::Sphere(100.) ;
0035 int b = snd::Sphere(100.) ;
0036 int c = snd::Sphere(100.) ;
0037 int d = snd::Sphere(100.) ;
0038
0039 std::vector<int> leaves = {a,b,c,d} ;
0040
0041 int root = sndtree::CommonTree( leaves, CSG_UNION );
0042
0043 std::cout << "root " << root << std::endl ;
0044 std::cout << "snd::Render(root) " << snd::Render(root) << std::endl ;
0045
0046
0047 test_Inorder(root);
0048
0049
0050 return 0 ;
0051 }