xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
xcal
render
impl
opengl
object
line.hpp
浏览该文件的文档.
1
#pragma once
2
#include <
xcal/public.h
>
3
4
#include <
xcal/mobject/objects/line.hpp
>
5
#include <
xcal/render/impl/opengl/gl/buffer.hpp
>
6
#include <
xcal/render/impl/opengl/object/object.hpp
>
7
#include <
xcal/render/impl/opengl/utils/singlemobjectwrapper.hpp
>
8
#include <
xcmath/mobject/mat.hpp
>
9
#include <
xcmath/xcmath.hpp
>
10
class
StaticLine
;
11
namespace
xcal::render::opengl::object
{
12
class
XCAL_API
Line
:
public
Object
{
13
public
:
14
using
mat
=
xcmath::mat<float_t, 4, 4>
;
15
16
private
:
17
mutable
struct
{
18
xcmath::vec4<float_t>
direction
;
19
xcmath::vec4<float_t>
color
;
20
xcmath::mat4<float_t>
model
;
21
} ubo_data_;
22
mutable
GL::Buffer
ubo_;
23
std::shared_ptr<StaticLine> static_line_;
24
utils::SingleComposedMObjectWrapper<mobject::Line>
mobject_{
nullptr
};
25
26
public
:
27
explicit
Line(
mobject::Line
*mobject);
28
void
create()
override
;
29
void
destroy()
override
;
30
void
render()
const override
;
31
void
update_ubo_data()
const
;
32
void
update_projection_view(
33
const
xcmath::mat4<float_t>
&view_projection)
override
;
34
35
Line
(
const
Line
&) =
delete
;
36
};
37
}
// namespace xcal::render::opengl::object
38
XCAL_OPENGL_REGIST_OBJECT
(
xcal::render::opengl::object::Line
, Line);
buffer.hpp
xcal::mobject::Line
Definition
line.hpp:12
xcal::render::opengl::GL::Buffer
Definition
buffer.hpp:10
xcal::render::opengl::object::Line
Definition
line.hpp:12
xcal::render::opengl::object::Line::Line
Line(const Line &)=delete
xcal::render::opengl::object::Line::color
xcmath::vec4< float_t > color
Definition
line.hpp:19
xcal::render::opengl::object::Line::model
xcmath::mat4< float_t > model
Definition
line.hpp:20
xcal::render::opengl::object::Line::direction
xcmath::vec4< float_t > direction
Definition
line.hpp:18
xcal::render::opengl::object::Object
Definition
object.hpp:15
xcal::render::opengl::utils::SingleComposedMObjectWrapper
Definition
singlemobjectwrapper.hpp:13
xcmath::mat< float_t, 4, 4 >
xcmath::vec
Vector class template
Definition
vec.hpp:206
mat.hpp
Header file for matrix class template and related utilities
line.hpp
xcal::render::opengl::object
Definition
typedef.hpp:36
object.hpp
XCAL_OPENGL_REGIST_OBJECT
#define XCAL_OPENGL_REGIST_OBJECT(class_, type)
Definition
object.hpp:44
public.h
XCAL_API
#define XCAL_API
Definition
public.h:69
singlemobjectwrapper.hpp
StaticLine
Definition
line.cc:42
xcmath.hpp
生成于 2025年 九月 19日 星期五 21:12:12 , 为 xcal使用
1.9.8