File indexing completed on 2026-04-09 07:49:37
0001 #pragma once
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <vector>
0015 #include "plog/Severity.h"
0016
0017 struct float3 ;
0018 struct float4 ;
0019 struct NP ;
0020 template <typename T> struct Tran ;
0021
0022 #include "SYSRAP_API_EXPORT.hh"
0023
0024 struct SYSRAP_API SFrameGenstep
0025 {
0026 static constexpr const char* CEGS = "CEGS" ;
0027 static constexpr const char* CEGS_RADIAL_RANGE = "CEGS_RADIAL_RANGE" ;
0028 static constexpr char CEGS_delim = ':' ;
0029
0030
0031 static const plog::Severity LEVEL ;
0032 static void CE_OFFSET(std::vector<float3>& ce_offset, const float4& ce ) ;
0033 static std::string Desc(const std::vector<float3>& ce_offset );
0034 static std::string Desc(const std::vector<int>& cegs );
0035
0036 static void GetGridConfig_(std::vector<int>& cegs, const char* ekey, char delim, const char* fallback );
0037 static std::string GetGridConfig(std::vector<int>& cegs);
0038
0039
0040 static const char* CEGS_XY ;
0041 static const char* CEGS_XZ ;
0042
0043 static bool HasConfigEnv();
0044
0045 #ifdef WITH_OLD_FRAME
0046 static NP* MakeCenterExtentGenstep_FromFrame(sframe& fr);
0047 #else
0048 static NP* MakeCenterExtentGenstep_FromFrame(sfr& fr);
0049 #endif
0050 static NP* MakeCenterExtentGenstep_From_CE_geotran(const float4& ce, const std::vector<int>& cegs, float gridscale, const Tran<double>* geotran, int prim);
0051
0052 static void Maybe_Add_PRIOR_SIMTRACE_Genstep( std::vector<NP*>& gsl, int prim );
0053 static NP* Make_PRIOR_SIMTRACE_Genstep( const NP* _simtrace, int prim );
0054
0055 static NP* Make_CEGS_NPY_Genstep( const NP* CEGS_NPY, const Tran<double>* geotran );
0056
0057 static NP* MakeCenterExtentGenstep(
0058 const float4& ce,
0059 const std::vector<int>& cegs,
0060 float gridscale,
0061 const Tran<double>* geotran,
0062 const std::vector<float3>& ce_offset,
0063 bool ce_scale,
0064 std::vector<float>* cegs_radial_range ) ;
0065
0066
0067
0068 static void StandardizeCEGS( std::vector<int>& cegs );
0069 static void GetBoundingBox(
0070 float3& mn,
0071 float3& mx,
0072 const float4& ce,
0073 const std::vector<int>& standardized_cegs,
0074 float gridscale,
0075 const float3& ce_offset ) ;
0076
0077 static void GenerateCenterExtentGenstepPhotons(
0078 std::vector<quad4>& pp,
0079 const NP* gsa,
0080 float gridscale );
0081
0082 static NP* GenerateCenterExtentGenstepPhotons_(
0083 const NP* gsa,
0084 float gridscale ) ;
0085
0086 static void GenerateSimtracePhotons(
0087 std::vector<quad4>& simtrace,
0088 const std::vector<quad6>& genstep );
0089
0090 static void SetGridPlaneDirection(
0091 float4& dir,
0092 int gridaxes,
0093 double cosPhi,
0094 double sinPhi,
0095 double cosTheta,
0096 double sinTheta );
0097 };
0098
0099