xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
xcal
render
impl
opengl
object
object.cc
浏览该文件的文档.
1
#include <
xcal/render/impl/opengl/utils/openglapiloadhelper.inc
>
2
//
3
#include <
xcal/mobject/core/abs_mobject.hpp
>
4
#include <
xcal/mobject/mobject_all.hpp
>
5
#include <
xcal/mobject/objects/axis.hpp
>
6
#include <
xcal/render/impl/opengl/object/axis.hpp
>
7
#include <
xcal/render/impl/opengl/object/circle.hpp
>
8
#include <
xcal/render/impl/opengl/object/line.hpp
>
9
#include <
xcal/render/impl/opengl/object/object.hpp
>
10
#include <
xcal/render/impl/opengl/object/path.hpp
>
11
12
#define ROLE OpenGLRender
13
#define LABEL Object
14
#include <
xcal/utils/logmacrohelper.inc
>
15
xcal::render::opengl::object::Object::Object
() {
16
17
};
18
template
<
class
T>
19
requires
std::is_base_of_v<xcal::mobject::AbsMObject, T>
20
xcal::render::opengl::object::object_ptr
xcal::render::opengl::object::create
(
21
T* ) {
22
_E(
"UnImplemented MObject type: "
<< T::META_INFO::type_name);
23
return
nullptr
;
24
}
25
xcal::render::opengl::object::Object::~Object
() {};
26
xcal::render::opengl::object::object_ptr
xcal::render::opengl::object::create
(
27
xcal::mobject::AbsMObject
* mobject) {
28
switch
(mobject->
type
()) {
29
case
xcal::mobject::Type::Axis
:
30
return
create<xcal::mobject::Axis>((
xcal::mobject::Axis
*)mobject);
31
case
xcal::mobject::Type::Axis3D
:
32
return
create<xcal::mobject::Axis3D>(
33
(
xcal::mobject::Axis3D
*)mobject);
34
case
xcal::mobject::Type::Polygone
:
35
return
create<xcal::mobject::Polygone>(
36
(
xcal::mobject::Polygone
*)mobject);
37
case
xcal::mobject::Type::Circle
:
38
return
create<xcal::mobject::Circle>(
39
(
xcal::mobject::Circle
*)mobject);
40
case
xcal::mobject::Type::Line
:
41
return
create<xcal::mobject::Line>((
xcal::mobject::Line
*)mobject);
42
case
xcal::mobject::Type::Path
:
43
return
create<xcal::mobject::Path>((
xcal::mobject::Path
*)mobject);
44
case
xcal::mobject::Type::Rectangle
:
45
return
create<xcal::mobject::Rectangle>(
46
(
xcal::mobject::Rectangle
*)mobject);
47
case
xcal::mobject::Type::Ellipse
:
48
return
create<xcal::mobject::Ellipse>(
49
(
xcal::mobject::Ellipse
*)mobject);
50
default
:
51
return
nullptr
;
52
}
53
}
abs_mobject.hpp
抽象图形对象基类
xcal::mobject::AbsMObject
图形对象命名空间
Definition
abs_mobject.hpp:31
xcal::mobject::AbsMObject::type
Type type() const
Definition
abs_mobject.hpp:75
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::render::opengl::object::Object::~Object
virtual ~Object()
Definition
object.cc:25
xcal::render::opengl::object::Object::Object
Object()
Definition
object.cc:15
logmacrohelper.inc
axis.hpp
mobject_all.hpp
xcal::mobject::Type::Ellipse
@ Ellipse
xcal::mobject::Type::Polygone
@ Polygone
xcal::mobject::Type::Circle
@ Circle
xcal::mobject::Type::Axis
@ Axis
xcal::mobject::Type::Line
@ Line
xcal::mobject::Type::Path
@ Path
xcal::mobject::Type::Axis3D
@ Axis3D
xcal::mobject::Type::Rectangle
@ Rectangle
xcal::render::opengl::object::create
xcal::render::opengl::object::object_ptr create(T *mobject)
xcal::render::opengl::object::object_ptr
std::unique_ptr< Object > object_ptr
Definition
object.hpp:36
object.hpp
openglapiloadhelper.inc
axis.hpp
circle.hpp
line.hpp
path.hpp
生成于 2025年 九月 19日 星期五 21:12:12 , 为 xcal使用
1.9.8