xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
mobject_types.hpp
浏览该文件的文档.
1#pragma once
2
3#include <xcal/public.h>
4namespace xcal::mobject {
5enum class Type {
7 Axis,
8 Axis3D,
9 Circle,
10 Line,
11 Path,
13 Ellipse,
15};
16
17class MObject;
18class Polygone;
19class Circle;
20class Line;
21class Path;
22class Rectangle;
23class 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
36namespace xcal {
37XCAL_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
圆形图形对象类
Definition circle.hpp:18
XCAL_API const char * to_string(xcal::camera::CameraType type)
#define XCAL_API
Definition public.h:69