xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
xcal
mobject
core
mobject_types.hpp
浏览该文件的文档.
1
#pragma once
2
3
#include <
xcal/public.h
>
4
namespace
xcal::mobject
{
5
enum class
Type
{
6
Polygone
,
7
Axis
,
8
Axis3D
,
9
Circle
,
10
Line
,
11
Path
,
12
Rectangle
,
13
Ellipse
,
14
Unknown
15
};
16
17
class
MObject;
18
class
Polygone;
19
class
Circle;
20
class
Line;
21
class
Path;
22
class
Rectangle;
23
class
Ellipse;
24
25
#define XCAL_MOBJECT_TYPE(type) \
26
Type type_() const override { return Type::type; } \
27
\
28
public: \
29
struct META_INFO { \
30
static constexpr auto type_name = #type; \
31
}; \
32
\
33
private:
34
35
}
// namespace xcal::mobject
36
namespace
xcal
{
37
XCAL_API
inline
const
char
*
to_string
(
xcal::mobject::Type
type) {
38
using namespace
xcal::mobject
;
39
switch
(type) {
40
case
Type::Axis:
41
return
"Axis"
;
42
case
Type::Axis3D:
43
return
"Axis3D"
;
44
case
Type::Polygone:
45
return
"Polygone"
;
46
case
Type::Circle:
47
return
"Circle"
;
48
case
Type::Line:
49
return
"Line"
;
50
case
Type::Path:
51
return
"Path"
;
52
case
Type::Rectangle:
53
return
"Rectangle"
;
54
case
Type::Ellipse:
55
return
"Ellipse"
;
56
case
Type::Unknown:
57
return
"Unknown"
;
58
default
:
59
return
"Unknown"
;
60
}
61
}
62
}
// namespace xcal
xcal::mobject::Axis3D
Definition
axis.hpp:39
xcal::mobject::Axis
Definition
axis.hpp:12
xcal::mobject::Circle
圆形图形对象类
Definition
circle.hpp:18
xcal::mobject::Ellipse
Definition
ellipse.hpp:11
xcal::mobject::Line
Definition
line.hpp:12
xcal::mobject::Path
Definition
path.hpp:12
xcal::mobject::Polygone
Definition
polygone.hpp:10
xcal::mobject::Rectangle
Definition
rectangle.hpp:12
xcal::mobject
Definition
abs_mgroup.hpp:14
xcal::mobject::Type
Type
Definition
mobject_types.hpp:5
xcal::mobject::Type::Unknown
@ Unknown
xcal
Definition
test_perspective_camera.cc:11
xcal::to_string
XCAL_API const char * to_string(xcal::camera::CameraType type)
Definition
abs_camera.hpp:234
public.h
XCAL_API
#define XCAL_API
Definition
public.h:69
生成于 2025年 九月 19日 星期五 21:12:12 , 为 xcal使用
1.9.8