Dandelion
2.0.0
A light-weight 3D builder for educational usage
Toggle main menu visibility
载入中...
搜索中...
未找到
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
11
template
<
class
... Ts>
12
struct
overloaded
: Ts...
13
{
14
using
Ts::operator()...;
15
};
16
17
class
Object
;
18
struct
Halfedge
;
19
struct
Vertex
;
20
struct
Edge
;
21
struct
Face
;
22
struct
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
*/
36
using
SelectableType
=
37
std::variant<std::monostate, Object*, const Halfedge*, Vertex*, Edge*, Face*, Light*>;
38
39
#endif
// DANDELION_UI_SELECTION_HELPER_H
Object
表示物体的类。
定义
object.h:39
SelectableType
std::variant< std::monostate, Object *, const Halfedge *, Vertex *, Edge *, Face *, Light * > SelectableType
场景中可被选择的元素类型。
定义
selection_helper.h:36
Edge
半边网格中的边。
定义
halfedge.h:115
Face
半边网格中的面片。
定义
halfedge.h:148
Halfedge
半边网格中最关键的几何元素。
定义
halfedge.h:43
Light
表示一个点光源的类。
定义
light.h:19
Vertex
半边网格中的顶点。
定义
halfedge.h:83
overloaded
定义
halfedge_mesh.cpp:35
src
scene
selection_helper.h
制作者
1.18.0