File indexing completed on 2026-04-09 07:48:57
0001 #pragma once
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <functional>
0023 struct float4 ;
0024 struct float3 ;
0025 struct NP ;
0026
0027 #include "CSG_API_EXPORT.hh"
0028
0029 struct CSG_API CSGGrid
0030 {
0031 static const char* BASE ;
0032
0033 float4 ce ;
0034 float margin ;
0035 int nx ;
0036 int ny ;
0037 int nz ;
0038 float3 gridscale ;
0039 int ni ;
0040 int nj ;
0041 int nk ;
0042 NP* sdf ;
0043 float* sdf_v ;
0044 NP* xyzd ;
0045 float* xyzd_v ;
0046
0047 CSGGrid( const float4& ce_, int nx_, int ny_, int nz_ );
0048
0049 void init();
0050 void init_meta();
0051 void scan( std::function<float(const float3&)> sdf ) ;
0052
0053 void save(const char* geom, const char* base=nullptr) const ;
0054 };
0055
0056