Helper used to build ColorMesh instances from primitives.
More...
#include <spk_color_painter.hpp>
|
|
| Builder ()=default |
| | Builds an empty builder.
|
| Builder & | clear () |
| | Clears all stored polygons.
|
| Builder & | insertTriangle (const Vector2Int &p_a, const Vector2Int &p_b, const Vector2Int &p_c, const Color &p_color) |
| | Inserts a colored triangle.
|
| Builder & | insertQuad (const Vector2Int &p_a, const Vector2Int &p_b, const Vector2Int &p_c, const Vector2Int &p_d, const Color &p_color, PolygonOrder p_order=PolygonOrder::TriangleFanFromFirst) |
| | Inserts a colored quad.
|
| Builder & | insertRectangle (const Vector2Int &p_anchor, const Vector2UInt &p_size, const Color &p_color) |
| | Inserts an axis-aligned rectangle.
|
| ColorMesh | construct () |
| | Builds a ColorMesh from stored polygons.
|
Helper used to build ColorMesh instances from primitives.
Helper used to build ColorMesh instances from primitives.
Definition spk_color_painter.hpp:63
ColorMesh construct()
Builds a ColorMesh from stored polygons.
Definition spk_color_painter.hpp:134
Builder & insertTriangle(const Vector2Int &p_a, const Vector2Int &p_b, const Vector2Int &p_c, const Color &p_color)
Inserts a colored triangle.
Definition spk_color_painter.hpp:91
◆ clear()
| Builder & spk::ColorMesh::Builder::clear |
( |
| ) |
|
|
inline |
Clears all stored polygons.
- Returns
- Reference to this builder.
◆ construct()
| ColorMesh spk::ColorMesh::Builder::construct |
( |
| ) |
|
|
inline |
◆ insertQuad()
Inserts a colored quad.
- Parameters
-
| p_a | First vertex position. |
| p_b | Second vertex position. |
| p_c | Third vertex position. |
| p_d | Fourth vertex position. |
| p_color | Vertex color. |
| p_order | Triangulation order. |
- Returns
- Reference to this builder.
◆ insertRectangle()
Inserts an axis-aligned rectangle.
- Parameters
-
| p_anchor | Top-left anchor position. |
| p_size | Rectangle size. |
| p_color | Vertex color. |
- Returns
- Reference to this builder.
◆ insertTriangle()
Inserts a colored triangle.
- Parameters
-
| p_a | First vertex position. |
| p_b | Second vertex position. |
| p_c | Third vertex position. |
| p_color | Vertex color. |
- Returns
- Reference to this builder.
The documentation for this class was generated from the following file: