20 {{0, 1, 5, 4},
false},
21 {{1, 2, 6, 5},
false},
22 {{2, 3, 7, 6},
false},
23 {{3, 0, 4, 7},
false},
24 {{4, 5, 6, 7},
true}},
36 if (!std::isfinite(cot_alpha) || cot_alpha < 0)
37 throw std::runtime_error(
"Pyramid2: angle alpha out of bounds");
41 std::ostringstream ostr;
42 ostr <<
"Pyramid2() -> Error in class initialization with parameters";
46 ostr <<
" alpha[rad]:" <<
m_alpha <<
"\n\n";
47 ostr <<
"Check for '2*height <= (length,width)*tan(alpha)' failed.";
48 throw std::runtime_error(ostr.str());
54 double w =
m_width / 2 * (1 - s);
57 m_height * (.5 - (r + s) / 3 + r * s / 4) / (1 - (r + s) / 2 + r * s / 3);
Defines M_PI and some more mathematical constants.
void checkNodeArgs() const
Raises exception if a parameter value is invalid.
A frustum (truncated pyramid) with rectangular base.
Pyramid2(double length, double width, double height, double alpha)
static const ff::PolyhedralTopology topology
double cot(double x)
cotangent function: