| 185 | std::stringstream result; |
| 186 | |
| 187 | for (const auto ch : text) |
| 188 | { |
| 189 | if (std::isalpha(ch)) |
| 190 | { |
| 191 | if (std::isspace(ch)) |
| 192 | { |
| 193 | result << "_"; |
| 194 | } |
| 195 | else |
| 196 | { |
| 197 | if (std::isupper(ch)) |
| 198 | { |
| 199 | result << "_"; |
| 200 | } |
| 201 | |
| 202 | result << static_cast<char>(std::tolower(ch)); |
| 203 | } |
| 204 | } |
| 205 | else |
| 206 | { |
| 207 | result << ch; |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | return result.str(); |
| 212 | } |
| 213 | |
| 214 | sg::Light &add_light(vkb::scene_graph::SceneC &scene, |
| 215 | sg::LightType type, |
| 216 | const glm::vec3 &position, |
| 217 | const glm::quat &rotation, |
| 218 | const sg::LightProperties &props, |
| 219 | vkb::scene_graph::NodeC *parent_node) |