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