MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_texture_with_bounds.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_TEXTURE_WITH_BOUNDS_H_1626494743
12#define INCGUARD_MGL_TEXTURE_WITH_BOUNDS_H_1626494743
13
14#include <utility>
15
17
18namespace MGL::Render
19{
22{
23public:
24 /* ------------------------------------------------------------------------- */
28 /* ------------------------------------------------------------------------- */
29 constexpr TextureWithBounds() noexcept = default;
30
31 /* ------------------------------------------------------------------------- */
37 /* ------------------------------------------------------------------------- */
38 TextureWithBounds(Texture texture, const Rectangle &bound) noexcept
39 : _texture(std::move(texture))
40 , _bounds(bound)
41 {}
42
43 /* ------------------------------------------------------------------------- */
48 /* ------------------------------------------------------------------------- */
49 [[nodiscard]] constexpr const Texture &GetTexture() const noexcept
50 {
51 return _texture;
52 }
53
54 /* ------------------------------------------------------------------------- */
59 /* ------------------------------------------------------------------------- */
60 [[nodiscard]] constexpr const Rectangle &GetBounds() const noexcept
61 {
62 return _bounds;
63 }
64
65private:
66 Texture _texture;
67 Rectangle _bounds;
68};
69} // namespace MGL::Render
70
71#endif // INCGUARD_MGL_TEXTURE_WITH_BOUNDS_H_1626494743
72
73// vim: et ts=4 sw=4 sts=4
MGL テクスチャクラス
Definition mgl_texture.h:20
領域付きテクスチャクラス
Definition mgl_texture_with_bounds.h:22
constexpr const Rectangle & GetBounds() const noexcept
領域を取得
Definition mgl_texture_with_bounds.h:60
constexpr const Texture & GetTexture() const noexcept
テクスチャを取得
Definition mgl_texture_with_bounds.h:49
constexpr TextureWithBounds() noexcept=default
コンストラクタ
MGL テクスチャ
矩形
Definition mgl_rectangle.h:20