ShitEngine
1.4.2
基于 C++20 与 SDL3 的轻量级 2D 游戏引擎
Toggle main menu visibility
载入中...
搜索中...
未找到
Math.h
浏览该文件的文档.
1
#pragma once
2
#include <glm/glm.hpp>
3
4
struct
SDL_FRect;
5
6
namespace
Shit
{
7
using
Vector2
= glm::vec2;
8
10
struct
Rect
{
11
float
x
= 0.0f;
12
float
y
= 0.0f;
13
float
w
= 0.0f;
14
float
h
= 0.0f;
15
16
Rect
() =
default
;
17
Rect
(
float
x
,
float
y
,
float
w
,
float
h
) :
x
(
x
),
y
(
y
),
w
(
w
),
h
(
h
) {}
18
19
SDL_FRect
toSDL
()
const
;
20
static
Rect
fromSDL
(
const
SDL_FRect &r);
21
};
22
}
Shit
定义
AnimationClip.h:12
Shit::Vector2
glm::vec2 Vector2
定义
Math.h:7
Shit::Rect::w
float w
定义
Math.h:13
Shit::Rect::Rect
Rect(float x, float y, float w, float h)
定义
Math.h:17
Shit::Rect::Rect
Rect()=default
Shit::Rect::h
float h
定义
Math.h:14
Shit::Rect::y
float y
定义
Math.h:12
Shit::Rect::toSDL
SDL_FRect toSDL() const
Shit::Rect::x
float x
定义
Math.h:11
Shit::Rect::fromSDL
static Rect fromSDL(const SDL_FRect &r)
include
ShitEngine
Math.h
制作者
1.17.0