载入中...
搜索中...
未找到
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.
 
 Quad (int x, int y, int w, int h)
 Quad.
 
 ~Quad ()
 Quad.
 
void setViewport (int x, int y, int w, int h)
 Sets the viewport.
 
int getX () const
 Returns the x.
 
int getY () const
 Returns the y.
 
int getWidth () const
 Returns the width.
 
int getHeight () const
 Returns the height.
 
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.h 第 11 行定义.

构造及析构函数说明

◆ Quad() [1/2]

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

Quad.

◆ Quad() [2/2]

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

Quad.

在文件 Quad.cpp 第 7 行定义.

引用了 setViewport().

◆ ~Quad()

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

Quad.

成员函数说明

◆ getHeight()

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

Returns the height.

在文件 Quad.h 第 29 行定义.

引用了 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.cpp 第 18 行定义.

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

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

◆ getWidth()

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

Returns the width.

在文件 Quad.h 第 27 行定义.

引用了 w.

◆ getX()

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

Returns the x.

在文件 Quad.h 第 23 行定义.

引用了 x.

◆ getY()

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

Returns the y.

在文件 Quad.h 第 25 行定义.

引用了 y.

◆ setViewport()

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

Sets the viewport.

在文件 Quad.cpp 第 11 行定义.

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

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

类成员变量说明

◆ h

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

在文件 Quad.h 第 37 行定义.

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

◆ w

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

在文件 Quad.h 第 36 行定义.

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

◆ x

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

在文件 Quad.h 第 34 行定义.

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

◆ y

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

在文件 Quad.h 第 35 行定义.

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


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