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.
成员函数说明
◆ addRect()
| void eve::graphics::Batcher::addRect | ( | float | x, |
| float | y, | ||
| float | w, | ||
| float | h, | ||
| const Color & | color | ||
| ) |
◆ addRectRotated()
| void eve::graphics::Batcher::addRectRotated | ( | float | cx, |
| float | cy, | ||
| float | w, | ||
| float | h, | ||
| float | degrees, | ||
| const Color & | color | ||
| ) |
◆ 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 行定义.
被这些函数引用 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 |
||
| ) |
◆ 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 行定义.
◆ clear()
| void eve::graphics::Batcher::clear | ( | ) |
Clears .
在文件 Batcher.cpp 第 8 行定义.
◆ empty()
◆ 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 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::drawUiTextureRects().
◆ vertices()
|
inline |
该类的文档由以下文件生成:
- src/modules/graphics/Batcher.h
- src/modules/graphics/Batcher.cpp