Maze Builder Docs 6.0.1
Loading...
Searching...
No Matches
stringz.h
Go to the documentation of this file.
1#ifndef STRINGZ_H
2#define STRINGZ_H
3
4#include <cstdint>
5#include <memory>
6#include <string_view>
7#include <string>
8#include <tuple>
9#include <vector>
10
11namespace mazes {
12
13class maze;
14class lab;
15
17
21class stringz {
22public:
23
29 static void objectify(const std::unique_ptr<maze>& m,
30 std::vector<std::tuple<int, int, int, int>>& vertices,
31 std::vector<std::vector<std::uint32_t>>& faces,
32 std::string_view sv = std::string_view{}) noexcept;
33
37 static void objectify(lab& labyrinth,
38 std::string_view sv = std::string_view{}) noexcept;
39
45 static void to_pixels(const std::string& s, std::vector<std::uint8_t>& pixels, int& width, int& height,
46 int stride = 4) noexcept;
47
54 static void to_pixels(const std::unique_ptr<maze>& m, std::vector<std::uint8_t>& pixels, int& width, int& height, int stride = 4) noexcept;
55
59 static std::string stringify(const std::unique_ptr<maze>& m) noexcept;
60
61}; // class
62} // namespace
63
64#endif // STRINGZ_H
Holds mazes and provides search functions.
Definition lab.h:21
Data class representing a 2D or 3D maze.
Definition maze.h:15
String helper class.
Definition stringz.h:21
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 std::string stringify(const std::unique_ptr< maze > &m) noexcept
Convert a maze into a string representation.
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.
Namespace for the maze builder.
Definition algo_interface.h:9