You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.8 KiB

#pragma once
#include <string>
#include "cxxopts.hpp"
namespace MeshLib {
class FeatureSampleConfig {
public:
// 文件路径
struct FilePaths {
std::string input_mesh; // 输入网格文件
std::string input_feature; // 输入特征文件
std::string input_pointcloud; // 输入点云文件
std::string input_pointcloud_face; // 输入点云面片文件
std::string output_file; // 输出文件
std::string output_mask; // 输出掩码文件
} files;
// 采样参数
struct SamplingParams {
int feature_samples = 10000; // 特征边采样点数
int nonfeature_samples = 40000; // 非特征面采样点数
double sigma = 0.0; // 位置噪声标准差
double sigma_normal = 0.0; // 法向噪声标准差
bool use_cotweight = false; // 是否使用余切权重
} sampling;
// 处理选项
struct ProcessingOptions {
int mode = 1; // 处理模式 (0:标准化, 1:特征采样)
bool use_color = false; // 是否使用颜色
int max_patches = -1; // 每个颜色簇的最大面片数
bool generate_csg = false; // 是否生成CSG树
bool is_convex = false; // 第一层是否为凸的
bool repair_turn = true; // 是否修复转角顶点
bool repair_tree = false; // 是否修复树特征
bool strict_mode = false; // 是否使用严格模式
int verbose = 0; // 详细输出级别
} processing;
// 从命令行参数解析配置
static FeatureSampleConfig FromCommandLine(int argc, char** argv);
// 验证配置是否有效
bool Validate() const;
};
} // namespace MeshLib