xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
xcal
mobject
objects
rectangle.hpp
浏览该文件的文档.
1
#pragma once
2
#include <
xcal/public.h
>
3
4
#include <
xcal/mobject/core/composedmobject.hpp
>
5
#include <
xcal/mobject/core/mobject.hpp
>
6
#include <
xcal/property/vec.hpp
>
7
8
namespace
xcal::mobject
{
9
10
class
XCAL_API
Rectangle
11
:
public
ComposedMObject
<Rectangle, BaseTransformableMobject,
12
StrokeableMObject> {
13
XCAL_MOBJECT_TYPE
(
Rectangle
)
14
private
:
15
property::Position
pos_;
16
property::Scalar
width_;
17
property::Scalar
height_;
18
19
public
:
20
Rectangle
(
const
property::Vec<float, 3>::data_t
& pos,
float_t
width,
21
float_t
height)
22
: width_(width), height_(height) {
23
set_pos(pos);
24
register_properties(pos_, width_, height_);
25
}
26
const
property::Scalar
&
width
()
const
{
return
width_; }
27
property::Scalar
&
width
() {
return
width_; }
28
const
property::Scalar
&
height
()
const
{
return
height_; }
29
property::Scalar
&
height
() {
return
height_; }
30
~Rectangle
()
override
=
default
;
31
};
32
33
}
// namespace xcal::mobject
xcal::mobject::ComposedMObject
Definition
composedmobject.hpp:122
xcal::mobject::Rectangle
Definition
rectangle.hpp:12
xcal::mobject::Rectangle::width
property::Scalar & width()
Definition
rectangle.hpp:27
xcal::mobject::Rectangle::height
const property::Scalar & height() const
Definition
rectangle.hpp:28
xcal::mobject::Rectangle::width
const property::Scalar & width() const
Definition
rectangle.hpp:26
xcal::mobject::Rectangle::height
property::Scalar & height()
Definition
rectangle.hpp:29
xcal::mobject::Rectangle::~Rectangle
~Rectangle() override=default
xcal::mobject::Rectangle::Rectangle
Rectangle(const property::Vec< float, 3 >::data_t &pos, float_t width, float_t height)
Definition
rectangle.hpp:20
xcal::property::Position
Definition
position.hpp:9
xcal::property::Scalar
Definition
scalar.hpp:8
xcmath::vec
Vector class template
Definition
vec.hpp:206
composedmobject.hpp
mobject.hpp
基础图形对象类
XCAL_MOBJECT_TYPE
#define XCAL_MOBJECT_TYPE(type)
Definition
mobject_types.hpp:25
xcal::mobject
Definition
abs_mgroup.hpp:14
xcal::float_t
float float_t
Definition
public.h:27
public.h
XCAL_API
#define XCAL_API
Definition
public.h:69
vec.hpp
生成于 2025年 九月 19日 星期五 21:12:12 , 为 xcal使用
1.9.8