String helper class.
More...
#include <stringz.h>
|
static void | objectify (const std::unique_ptr< maze > &m, std::vector< std::tuple< int, int, int, int > > &vertices, std::vector< std::vector< std::uint32_t > > &faces, std::string_view sv=std::string_view{}) noexcept |
| Compute the 3D geometries of a maze.
|
|
static void | objectify (lab &labyrinth, std::string_view sv=std::string_view{}) noexcept |
| Compute the 3D geometries of a maze.
|
|
static void | to_pixels (const std::string &s, std::vector< std::uint8_t > &pixels, int &width, int &height, int stride=4) noexcept |
| Converts a string representation of an image to a pixel array.
|
|
static void | to_pixels (const std::unique_ptr< maze > &m, std::vector< std::uint8_t > &pixels, int &width, int &height, int stride=4) noexcept |
| Converts a maze to a pixel representation.
|
|
static std::string | stringify (const std::unique_ptr< maze > &m) noexcept |
| Convert a maze into a string representation.
|
|
String helper class.
This class provides methods to convert mazes into string representations
◆ objectify() [1/2]
static void mazes::stringz::objectify |
( |
const std::unique_ptr< maze > & | m, |
|
|
std::vector< std::tuple< int, int, int, int > > & | vertices, |
|
|
std::vector< std::vector< std::uint32_t > > & | faces, |
|
|
std::string_view | sv = std::string_view{} ) |
|
staticnoexcept |
Compute the 3D geometries of a maze.
- Parameters
-
m | the maze to convert |
vertices | the vertices of the maze |
faces | the faces of the maze |
s | the string representation of the maze |
◆ objectify() [2/2]
static void mazes::stringz::objectify |
( |
lab & | labyrinth, |
|
|
std::string_view | sv = std::string_view{} ) |
|
staticnoexcept |
Compute the 3D geometries of a maze.
- Parameters
-
labyrinth | the collection of mazes |
sv |
|
◆ stringify()
static std::string mazes::stringz::stringify |
( |
const std::unique_ptr< maze > & | m | ) |
|
|
staticnoexcept |
Convert a maze into a string representation.
- Parameters
-
- Returns
- the string representation
◆ to_pixels() [1/2]
static void mazes::stringz::to_pixels |
( |
const std::string & | s, |
|
|
std::vector< std::uint8_t > & | pixels, |
|
|
int & | width, |
|
|
int & | height, |
|
|
int | stride = 4 ) |
|
staticnoexcept |
Converts a string representation of an image to a pixel array.
- Parameters
-
s | |
pixels | vector to store the resulting pixel data |
width | integer reference to store the width of the image |
height | integer reference to store the height of the image |
◆ to_pixels() [2/2]
static void mazes::stringz::to_pixels |
( |
const std::unique_ptr< maze > & | m, |
|
|
std::vector< std::uint8_t > & | pixels, |
|
|
int & | width, |
|
|
int & | height, |
|
|
int | stride = 4 ) |
|
staticnoexcept |
Converts a maze to a pixel representation.
- Parameters
-
m | A unique pointer to the maze object to be converted. |
pixels | A vector to store the resulting pixel data. |
width | An integer reference to store the width of the pixel data. |
height | An integer reference to store the height of the pixel data. |
stride | The number of bytes per row in the pixel data. |
The documentation for this class was generated from the following file: