Dandelion 2.0.0
A light-weight 3D builder for educational usage
载入中...
搜索中...
未找到
selection_helper.h
1#ifndef DANDELION_UI_SELECTION_HELPER_H
2#define DANDELION_UI_SELECTION_HELPER_H
3
4#include <variant>
5
6/*!
7 * \file ui/selection_helper.h
8 * \ingroup ui
9 */
10
11template<class... Ts>
12struct overloaded : Ts...
13{
14 using Ts::operator()...;
15};
16
17class Object;
18struct Halfedge;
19struct Vertex;
20struct Edge;
21struct Face;
22struct Light;
23
24/*!
25 * \ingroup ui
26 * \~chinese
27 * \brief 场景中可被选择的元素类型。
28 *
29 * 此类型包含所有选中元素的指针类型以及额外的 `std::monostate` 类型。
30 * 这些类型可分为三类:
31 *
32 * - `std::monostate` 表示选中元素为空(没有选中任何元素)
33 * - 指向 `const` 对象的指针表示该类型可选中但不可通过 GUI 修改
34 * - 一般指针表示该类型可选中且可通过 GUI 修改
35 */
37 std::variant<std::monostate, Object*, const Halfedge*, Vertex*, Edge*, Face*, Light*>;
38
39#endif // DANDELION_UI_SELECTION_HELPER_H
表示物体的类。
定义 object.h:39
std::variant< std::monostate, Object *, const Halfedge *, Vertex *, Edge *, Face *, Light * > SelectableType
场景中可被选择的元素类型。
定义 selection_helper.h:36
半边网格中的边。
定义 halfedge.h:115
半边网格中的面片。
定义 halfedge.h:148
半边网格中最关键的几何元素。
定义 halfedge.h:43
表示一个点光源的类。
定义 light.h:19
半边网格中的顶点。
定义 halfedge.h:83
定义 halfedge_mesh.cpp:35