载入中...
搜索中...
未找到
Quad.h
浏览该文件的文档.
1#pragma once
2
3namespace eve::graphics {
4
9class Quad {
10public:
12 Quad(int x, int y, int w, int h);
14
15 void setViewport(int x, int y, int w, int h);
16 int getX() const { return x; }
17 int getY() const { return y; }
18 int getWidth() const { return w; }
19 int getHeight() const { return h; }
20
22 void getUV(int texW, int texH, float &u0, float &v0, float &u1, float &v1) const;
23
24 int x = 0;
25 int y = 0;
26 int w = 0;
27 int h = 0;
28};
29
30} // namespace eve::graphics
Pixel-space sub-rectangle of a Texture (atlas cell / sprite frame). UV conversion uses the texture's ...
Definition Quad.h:9
int getWidth() const
Definition Quad.h:18
void getUV(int texW, int texH, float &u0, float &v0, float &u1, float &v1) const
Convert pixel rect to normalized UVs for a texture of size texW×texH.
Definition Quad.cpp:18
int getX() const
Definition Quad.h:16
int getHeight() const
Definition Quad.h:19
int getY() const
Definition Quad.h:17
void setViewport(int x, int y, int w, int h)
Definition Quad.cpp:11
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6