6#include <boost/regex.hpp>
10 std::string indent(indentwidth,
' ');
11 std::string indent2(indentwidth + 8,
' ');
14 std::cout << indent <<
"rectangle, \n"
15 << indent2 <<
"w: " <<
width_m <<
", \n"
16 << indent2 <<
"h: " <<
height_m <<
", \n"
17 << indent2 <<
"origin: " << origin[0] <<
", " << origin[1] <<
",\n"
18 << indent2 <<
"angle: " << angle <<
"\n"
34 Vector_t llc = corners[0], urc = corners[0];
35 for (
unsigned int i = 1; i < 4; ++ i) {
36 if (corners[i][0] < llc[0]) llc[0] = corners[i][0];
37 else if (corners[i][0] > urc[0]) urc[0] = corners[i][0];
39 if (corners[i][1] < llc[1]) llc[1] = corners[i][1];
40 else if (corners[i][1] > urc[1]) urc[1] = corners[i][1];
46 item->computeBoundingBox();
57 if (item->isInside(
R))
71 unsigned int width = out.precision() + 8;
72 for (
unsigned int i = 0; i < 5; ++ i) {
76 out << std::setw(width) << pt[0]
77 << std::setw(width) << pt[1]
83 item->writeGnuplot(out);
90 bfuncs.emplace_back(this->
clone());
94 std::shared_ptr<Rectangle> rect(
new Rectangle);
101 rect->divisor_m.emplace_back(item->clone());
104 return std::static_pointer_cast<Base>(rect);
108 std::string str(it,
end);
117 }
catch (std::runtime_error &
e) {
123 std::cout <<
"Rectangle: a negative width provided '"
124 << arguments.
get(0) <<
" = " << rect->
width_m <<
"'"
129 std::cout <<
"Rectangle: a negative height provided '"
130 << arguments.
get(1) <<
" = " << rect->
height_m <<
"'"
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
Inform & endl(Inform &inf)
constexpr double e
The value of.
double parseMathExpression(const std::string &str)
std::string::iterator iterator
static const std::string UDouble
std::vector< std::shared_ptr< Base > > divisor_m
AffineTransformation trafo_m
Vector_t getOrigin() const
Vector_t transformTo(const Vector_t &v) const
Vector_t transformFrom(const Vector_t &v) const
std::string get(unsigned int i) const
unsigned int getLengthConsumed() const
bool isInside(const Vector_t &X) const
virtual bool isInside(const Vector_t &R) const
virtual void computeBoundingBox()
virtual void apply(std::vector< std::shared_ptr< Base > > &bfuncs)
static bool parse_detail(iterator &it, const iterator &end, Function *fun)
virtual void writeGnuplot(std::ofstream &out) const
virtual std::shared_ptr< Base > clone() const
virtual void print(int indentwidth)
Vektor< double, 3 > Vector_t