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

Accumulates solid / textured quads in logical (Y-down) coordinates. Used by RenderSystem; not a public script API. 更多...

#include <Batcher.h>

Public 成员函数

void clear ()
 Clears .
 
void addRect (float x, float y, float w, float h, const Color &color)
 Adds rect.
 
void addTriangle (glm::vec2 a, glm::vec2 b, glm::vec2 c, const Color &color)
 Adds one arbitrary solid triangle in logical Canvas coordinates.
 
void addTriangle (glm::vec2 a, glm::vec2 b, glm::vec2 c, const Color &colorA, const Color &colorB, const Color &colorC)
 Adds one arbitrary solid triangle with independent vertex colors.
 
void addRectRotated (float cx, float cy, float w, float h, float degrees, const Color &color)
 Adds rect rotated.
 
void addTexturedRect (float x, float y, float w, float h, const Color &color, float u0, float v0, float u1, float v1, bool rotatedUV=false)
 Adds textured rect.
 
void addTexturedRectRotated (float cx, float cy, float w, float h, float degrees, const Color &color, float u0, float v0, float u1, float v1, bool rotatedUV=false)
 Textured quad rotated degrees (clockwise, screen Y-down) around (cx, cy).
 
const std::vector< BatchVertex > & vertices () const
 Vertices.
 
bool empty () const
 Empty.
 
void toNDC (int logicalW, int logicalH)
 To ndc.
 

详细描述

Accumulates solid / textured quads in logical (Y-down) coordinates. Used by RenderSystem; not a public script API.

在文件 Batcher.h 第 24 行定义.

成员函数说明

◆ addRect()

void eve::graphics::Batcher::addRect ( float  x,
float  y,
float  w,
float  h,
const Color &  color 
)

Adds rect.

在文件 Batcher.cpp 第 10 行定义.

引用了 addTexturedRect(), color, h, w, x , 以及 y.

◆ addRectRotated()

void eve::graphics::Batcher::addRectRotated ( float  cx,
float  cy,
float  w,
float  h,
float  degrees,
const Color &  color 
)

Adds rect rotated.

在文件 Batcher.cpp 第 91 行定义.

引用了 color, cx, cy, degrees, dx, dy, h, tr , 以及 w.

◆ addTexturedRect()

void eve::graphics::Batcher::addTexturedRect ( float  x,
float  y,
float  w,
float  h,
const Color &  color,
float  u0,
float  v0,
float  u1,
float  v1,
bool  rotatedUV = false 
)

Adds textured rect.

在文件 Batcher.cpp 第 25 行定义.

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

被这些函数引用 addRect() , 以及 eve::graphics::vulkan::Graphics::drawUiTextureRects().

◆ addTexturedRectRotated()

void eve::graphics::Batcher::addTexturedRectRotated ( float  cx,
float  cy,
float  w,
float  h,
float  degrees,
const Color &  color,
float  u0,
float  v0,
float  u1,
float  v1,
bool  rotatedUV = false 
)

Textured quad rotated degrees (clockwise, screen Y-down) around (cx, cy).

在文件 Batcher.cpp 第 52 行定义.

引用了 color, cx, cy, degrees, dx, dy, h, tr , 以及 w.

被这些函数引用 eve::graphics::vulkan::Graphics::drawSceneColorDistortionUVRotated().

◆ addTriangle() [1/2]

void eve::graphics::Batcher::addTriangle ( glm::vec2  a,
glm::vec2  b,
glm::vec2  c,
const Color &  color 
)

Adds one arbitrary solid triangle in logical Canvas coordinates.

在文件 Batcher.cpp 第 14 行定义.

引用了 a, addTriangle(), b, c , 以及 color.

被这些函数引用 addTriangle().

◆ addTriangle() [2/2]

void eve::graphics::Batcher::addTriangle ( glm::vec2  a,
glm::vec2  b,
glm::vec2  c,
const Color &  colorA,
const Color &  colorB,
const Color &  colorC 
)

Adds one arbitrary solid triangle with independent vertex colors.

在文件 Batcher.cpp 第 18 行定义.

引用了 a, b , 以及 c.

◆ clear()

void eve::graphics::Batcher::clear ( )

Clears .

在文件 Batcher.cpp 第 8 行定义.

◆ empty()

bool eve::graphics::Batcher::empty ( ) const
inline

Empty.

在文件 Batcher.h 第 48 行定义.

引用了 verts.

◆ toNDC()

void eve::graphics::Batcher::toNDC ( int  logicalW,
int  logicalH 
)

To ndc.

Convert stored logical Y-down positions into Vulkan NDC in-place ((-1,-1)=top-left, (+1,+1)=bottom-right).

在文件 Batcher.cpp 第 119 行定义.

引用了 sx, sy , 以及 v.

被这些函数引用 eve::graphics::vulkan::Graphics::drawUiTextureRects().

◆ vertices()

const std::vector< BatchVertex > & eve::graphics::Batcher::vertices ( ) const
inline

Vertices.

在文件 Batcher.h 第 46 行定义.

引用了 verts.

被这些函数引用 eve::graphics::vulkan::Graphics::drawUiTextureRects().


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