ShitEngine 1.4.2
基于 C++20 与 SDL3 的轻量级 2D 游戏引擎
载入中...
搜索中...
未找到
Math.h
浏览该文件的文档.
1#pragma once
2#include <glm/glm.hpp>
3
4struct SDL_FRect;
5
6namespace 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}
定义 AnimationClip.h:12
glm::vec2 Vector2
定义 Math.h:7
float w
定义 Math.h:13
Rect(float x, float y, float w, float h)
定义 Math.h:17
Rect()=default
float h
定义 Math.h:14
float y
定义 Math.h:12
SDL_FRect toSDL() const
float x
定义 Math.h:11
static Rect fromSDL(const SDL_FRect &r)