336 writelog(
LOG_WARNING,
"<prism> with vertices a and b is deprecated, use <triangular-prism> instead");
341 prism->readMaterial(reader);
349 std::vector<LateralVec<double>> vertices;
350 boost::tokenizer<boost::char_separator<char>>
tokens(
vertex_spec, boost::char_separator<char>(
" \t\n\r",
";"));
352 for (
const std::string& t :
tokens) {
354 if (
vi != 2)
throw Exception(
"each vertex must have two coordinates");
357 if (
vi == 2)
throw Exception(
"end of vertex (\";\") was expected, but got \"{0}\"", t);
358 if (
vi == 0) vertices.emplace_back();
360 vertices.back()[
vi++] = boost::lexical_cast<double>(t);
361 }
catch (
const boost::bad_lexical_cast&) {
362 throw Exception(
"bad vertex coordinate: {0}", t);
366 prism->vertices = std::move(vertices);