载入中...
搜索中...
未找到
eve::graphics::Quad类 参考

Pixel-space sub-rectangle of a Texture (atlas cell / sprite frame). UV conversion uses the texture's logical width/height. 更多...

#include <Quad.h>

Public 成员函数

 Quad ()
 
 Quad (int x, int y, int w, int h)
 
 ~Quad ()
 
void setViewport (int x, int y, int w, int h)
 
int getX () const
 
int getY () const
 
int getWidth () const
 
int getHeight () const
 
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.
 

Public 属性

int x = 0
 
int y = 0
 
int w = 0
 
int h = 0
 

详细描述

Pixel-space sub-rectangle of a Texture (atlas cell / sprite frame). UV conversion uses the texture's logical width/height.

在文件 Quad.h9 行定义.

构造及析构函数说明

◆ Quad() [1/2]

eve::graphics::Quad::Quad ( )
default

◆ Quad() [2/2]

eve::graphics::Quad::Quad ( int  x,
int  y,
int  w,
int  h 
)

在文件 Quad.cpp7 行定义.

引用了 setViewport().

◆ ~Quad()

eve::graphics::Quad::~Quad ( )
default

成员函数说明

◆ getHeight()

int eve::graphics::Quad::getHeight ( ) const
inline

在文件 Quad.h19 行定义.

引用了 h.

◆ getUV()

void eve::graphics::Quad::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.

在文件 Quad.cpp18 行定义.

引用了 h, w, x , 以及 y.

被这些函数引用 eve::graphics::RenderSystem::collectSprites().

◆ getWidth()

int eve::graphics::Quad::getWidth ( ) const
inline

在文件 Quad.h18 行定义.

引用了 w.

◆ getX()

int eve::graphics::Quad::getX ( ) const
inline

在文件 Quad.h16 行定义.

引用了 x.

◆ getY()

int eve::graphics::Quad::getY ( ) const
inline

在文件 Quad.h17 行定义.

引用了 y.

◆ setViewport()

void eve::graphics::Quad::setViewport ( int  x,
int  y,
int  w,
int  h 
)

在文件 Quad.cpp11 行定义.

引用了 h, w, x , 以及 y.

被这些函数引用 eve::animation::SpriteSheet::applyToQuad() , 以及 Quad().

类成员变量说明

◆ h

int eve::graphics::Quad::h = 0

在文件 Quad.h27 行定义.

被这些函数引用 getHeight(), getUV() , 以及 setViewport().

◆ w

int eve::graphics::Quad::w = 0

在文件 Quad.h26 行定义.

被这些函数引用 getUV(), getWidth() , 以及 setViewport().

◆ x

int eve::graphics::Quad::x = 0

在文件 Quad.h24 行定义.

被这些函数引用 getUV(), getX() , 以及 setViewport().

◆ y

int eve::graphics::Quad::y = 0

在文件 Quad.h25 行定义.

被这些函数引用 getUV(), getY() , 以及 setViewport().


该类的文档由以下文件生成: