1. 核心类与构造
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
Linear_cell_complex_for_combinatorial_map<d,d2,LCCTraits,Items,Alloc> | Linear_cell_complex_for_combinatorial_map | () | 构造空的基于组合图的 d 维线性细胞复合体 | LCC_3 lcc; |
Linear_cell_complex_for_generalized_map<d,d2,LCCTraits,Items,Alloc> | Linear_cell_complex_for_generalized_map | () | 构造空的基于广义图的 d 维线性细胞复合体 | LCC_4 lcc; |
Cell_attribute_with_point<LCC,Info_,Tag,OnMerge,OnSplit> | Cell_attribute_with_point | () | 构造带点的细胞属性 | Cell_attribute_with_point<LCC_3, int> attr; |
Linear_cell_complex_traits<d,K> | Linear_cell_complex_traits | () | 构造线性细胞复合体几何特征类 | Linear_cell_complex_traits<3, Kernel> traits; |
Linear_cell_complex_min_items<d> | Linear_cell_complex_min_items | () | 构造最小项类(仅顶点带点属性) | Linear_cell_complex_min_items<3> items; |
2. 缝合与拆分操作
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
void | sew<unsigned int i> | Dart_descriptor d1, Dart_descriptor d2 | 沿 (i-1) 维细胞缝合两个 i 维细胞,自动合并顶点属性 | lcc.sew<3>(d1, d2); |
void | unsew<unsigned int i> | Dart_descriptor d | 拆分包含 dart d 的 (i-1) 维细胞的 i 维缝合,自动复制顶点属性 | lcc.unsew<3>(d); |
void | remove_cell<unsigned int i> | Dart_descriptor d | 移除包含 dart d 的 i 维细胞 | lcc.remove_cell<1>(d); |
Dart_descriptor | insert_cell_1_in_cell_2 | Dart_descriptor d1, Dart_descriptor d2 | 在包含 d1 的 2 维细胞中插入 1 维细胞,连接 d1 和 d2 所在顶点 | lcc.insert_cell_1_in_cell_2(d1, d2); |
Dart_descriptor | insert_cell_1_between_two_cells_2 | Dart_descriptor d1, Dart_descriptor d2 | 在两个 2 维细胞之间插入 1 维细胞,创建孔洞 | lcc.insert_cell_1_between_two_cells_2(d1, d2); |
Dart_descriptor | insert_cell_2_in_cell_3 | Dart_descriptor d1, Dart_descriptor d2 | 在包含 d1 的 3 维细胞中插入 2 维细胞 | lcc.insert_cell_2_in_cell_3(d1, d2); |
3. 基本几何体构造
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
Dart_descriptor | make_segment | const Point& p1, const Point& p2 | 创建 1 维线段细胞,返回指向 p1 的 dart | lcc.make_segment(Point(0,0,0), Point(1,0,0)); |
Dart_descriptor | make_triangle | const Point& p1, const Point& p2, const Point& p3 | 创建 2 维三角形细胞,返回指向 p1 的 dart | lcc.make_triangle(Point(0,0,0), Point(1,0,0), Point(0,1,0)); |
Dart_descriptor | make_quadrangle | const Point& p1, const Point& p2, const Point& p3, const Point& p4 | 创建 2 维四边形细胞,返回指向 p1 的 dart | lcc.make_quadrangle(Point(0,0,0), Point(1,0,0), Point(1,1,0), Point(0,1,0)); |
Dart_descriptor | make_tetrahedron | const Point& p1, const Point& p2, const Point& p3, const Point& p4 | 创建 3 维四面体细胞,返回指向 p1 的 dart | lcc.make_tetrahedron(Point(-1,0,0), Point(0,2,0), Point(1,0,0), Point(1,1,2)); |
Dart_descriptor | make_hexahedron | const Point& p1, const Point& p2, const Point& p3, const Point& p4, const Point& p5, const Point& p6, const Point& p7, const Point& p8 | 创建 3 维六面体细胞,返回指向 p1 的 dart | lcc.make_hexahedron(Point(0,0,0), Point(5,0,0), Point(5,5,0), Point(0,5,0), Point(0,5,4), Point(0,0,4), Point(5,0,4), Point(5,5,4)); |
4. 数据导入操作
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
void | import_from_triangulation_3 | LCC& lcc, const Triangulation_3& tr | 将 3D 三角剖分导入线性细胞复合体 | import_from_triangulation_3(lcc, tr); |
void | import_from_polyhedron_3 | LCC& lcc, const Polyhedron_3& p | 将 3D 多面体导入线性细胞复合体 | import_from_polyhedron_3(lcc, poly); |
void | import_from_plane_graph | LCC& lcc, std::istream& is | 从输入流读取平面图形并导入 | import_from_plane_graph(lcc, ifile); |
void | load_off | LCC& lcc, std::istream& is | 从 OFF 文件加载 2D 表面到 3D 嵌入的线性细胞复合体 | load_off(lcc, ifile); |
5. 细胞修改操作
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
Dart_descriptor | insert_barycenter_in_cell<unsigned int i> | Dart_descriptor d | 在包含 dart d 的 i 维细胞中插入重心点,返回指向新顶点的 dart(仅支持 i=1 和 i=2) | Dart_descriptor d3 = lcc.insert_barycenter_in_cell<2>(d2); |
Dart_descriptor | insert_point_in_cell<unsigned int i> | Dart_descriptor d, const Point& p | 在包含 dart d 的 i 维细胞中插入指定点 p,返回指向新顶点的 dart(仅支持 i=1 和 i=2) | lcc.insert_point_in_cell<1>(d1, Point(0.5,0,0)); |
Dart_descriptor | insert_dangling_cell_1_in_cell_2 | Dart_descriptor d, const Point& p | 在包含 dart d 的 2 维细胞中插入悬挂边,一端连接 d 所在顶点,另一端为新点 p | lcc.insert_dangling_cell_1_in_cell_2(d0, Point(1,1,1)); |
Dart_descriptor | insert_cell_0_in_cell_1 | Dart_descriptor d, const Point& p | 在包含 dart d 的 1 维细胞中插入 0 维细胞(顶点),位置为 p | lcc.insert_cell_0_in_cell_1(d, Point(0.5,0,0)); |
Dart_descriptor | insert_cell_0_in_cell_2 | Dart_descriptor d, const Point& p | 在包含 dart d 的 2 维细胞中插入 0 维细胞(顶点),位置为 p | lcc.insert_cell_0_in_cell_2(d, Point(0.5,0.5,0)); |
6. 属性与几何访问
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
Point& | point | Dart_descriptor d | 获取 / 设置 dart d 所在顶点的点坐标 | lcc.point(d) = Point(1,2,3); |
const Point& | point | Dart_descriptor d const | 只读获取 dart d 所在顶点的点坐标 | Point p = lcc.point(d); |
Point& | point_of_vertex_attribute | Vertex_attribute_iterator it | 获取 / 设置顶点属性迭代器指向的点坐标 | lcc.point_of_vertex_attribute(it) = Point(1,2,3); |
const Point& | point_of_vertex_attribute | Vertex_attribute_const_iterator it const | 只读获取顶点属性迭代器指向的点坐标 | Point p = lcc.point_of_vertex_attribute(it); |
Info& | info<unsigned int i> | Dart_descriptor d | 获取 / 设置 dart d 所在 i 维细胞的附加信息 | lcc.info<0>(d) = 1; |
const Info& | info<unsigned int i> | Dart_descriptor d const | 只读获取 dart d 所在 i 维细胞的附加信息 | int color = lcc.info<0>(d); |
Info& | info_of_attribute<unsigned int i> | Cell_attribute_iterator it | 获取 / 设置 i 维细胞属性迭代器指向的附加信息 | lcc.info_of_attribute<0>(it) = 5; |
const Info& | info_of_attribute<unsigned int i> | Cell_attribute_const_iterator it const | 只读获取 i 维细胞属性迭代器指向的附加信息 | int color = lcc.info_of_attribute<0>(it); |
Vertex_attribute_range | vertex_attributes | () | 返回所有顶点属性的范围,用于遍历 | for (auto& attr : lcc.vertex_attributes()) { ... } |
Vertex_attribute_const_range | vertex_attributes | () const | 只读返回所有顶点属性的范围 | for (const auto& attr : lcc.vertex_attributes()) { ... } |
7. 自动属性管理
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
void | set_automatic_attributes_management | bool enable | 启用 / 禁用自动属性管理(默认启用),禁用时操作后需手动调用启用以更新属性 | lcc.set_automatic_attributes_management(false); |
bool | automatic_attributes_management | () const | 查询是否启用自动属性管理 | bool enabled = lcc.automatic_attributes_management(); |
8. 增量构建器
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
Linear_cell_complex_incremental_builder_3<LCC> | Linear_cell_complex_incremental_builder_3 | LCC& lcc | 构造 3D 线性细胞复合体增量构建器 | Linear_cell_complex_incremental_builder_3<LCC_3> ib(lcc); |
std::size_t | add_vertex | const Point& p | 添加顶点,返回顶点索引 | ib.add_vertex(Point(0,0,0)); |
void | begin_surface | () | 开始构建表面 | ib.begin_surface(); |
void | add_facet | const std::vector<std::size_t>& indices | 添加面,参数为顶点索引列表 | ib.add_facet({0,1,2,3}); |
void | begin_facet | () | 开始添加单个面 | ib.begin_facet(); |
void | add_vertex_to_facet | std::size_t index | 向当前面添加顶点索引 | ib.add_vertex_to_facet(0); |
void | end_facet | () | 结束当前面的添加 | ib.end_facet(); |
void | end_surface | () | 结束表面构建 | ib.end_surface(); |
9. 遍历与查询
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
One_dart_per_cell_range<i> | one_dart_per_cell | () | 返回遍历每个 i 维细胞的一个 dart 的范围 | for (auto d : lcc.one_dart_per_cell<3>()) { ... } |
One_dart_per_incident_cell_range<i,j> | one_dart_per_incident_cell | Dart_descriptor d | 返回遍历包含 dart d 的 j 维细胞中所有 i 维细胞的一个 dart 的范围 | for (auto v : lcc.one_dart_per_incident_cell<0,3>(d)) { ... } |
Dart_descriptor | beta | Dart_descriptor d, unsigned int i | 获取 dart d 的 β_i 关系的 dart(组合图) | Dart_descriptor d2 = lcc.beta(d1, 1); |
Dart_descriptor | beta | Dart_descriptor d, unsigned int i1, unsigned int i2, ... | 连续应用多个 β 关系 | Dart_descriptor d3 = lcc.beta(d1, 1, 1, 2); |
Dart_descriptor | alpha | Dart_descriptor d, unsigned int i | 获取 dart d 的 α_i 关系的 dart(广义图) | Dart_descriptor d2 = lcc.alpha(d1, 1); |
Dart_descriptor | alpha | Dart_descriptor d, unsigned int i1, unsigned int i2, ... | 连续应用多个 α 关系 | Dart_descriptor d3 = lcc.alpha(d1, 1, 0, 1); |
Dart_descriptor | opposite<unsigned int i> | Dart_descriptor d | 获取 dart d 的 i 维相反 dart | Dart_descriptor d2 = lcc.opposite<2>(d1); |
Dart_descriptor | next | Dart_descriptor d | 获取 dart d 的下一个 dart(β_1) | Dart_descriptor d2 = lcc.next(d1); |
Dart_descriptor | previous | Dart_descriptor d | 获取 dart d 的上一个 dart(β_0) | Dart_descriptor d2 = lcc.previous(d1); |
std::size_t | number_of_darts | () const | 返回复合体中 dart 的总数 | std::size_t nb_darts = lcc.number_of_darts(); |
std::size_t | number_of_cells<unsigned int i> | () const | 返回复合体中 i 维细胞的总数 | std::size_t nb_volumes = lcc.number_of_cells<3>(); |
bool | is_valid | () const | 检查线性细胞复合体是否有效 | bool valid = lcc.is_valid(); |
std::ostream& | display_characteristics | std::ostream& os const | 输出复合体的特征信息(dart 数、各维细胞数等) | lcc.display_characteristics(std::cout); |
10. 可视化与调试
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
void | draw | const LCC& lcc, const GSOptions& gso=GSOptions() | 打开 Qt 窗口绘制线性细胞复合体(需 CGAL_Qt6 支持) | CGAL::draw(lcc); |
11. 全局辅助函数
| 返回值类型 | 函数名 | 参数 | 作用 | 用法 |
|---|---|---|---|---|
void | transform | LCC& lcc, const Affine_transformation_3& t | 对线性细胞复合体应用仿射变换 | transform(lcc, Affine_transformation_3(Translation(), Vector(3,1,1))); |

被折叠的 条评论
为什么被折叠?



