12 void Point::rotat(
double angle,
bool bendplane) {
14 double ds = (*this)[bendplane];
15 double dz = (*this)[2];
17 (*this)[bendplane] = cos(
angle)*ds - sin(
angle)*dz;
21 std::string Point::str()
const {
23 std::ostringstream ost;
26 << std::setprecision(9) <<
"("
27 << std::setw(12) <<
m_x <<
", "
28 << std::setw(12) <<
m_y <<
", "
29 << std::setw(14) <<
m_z <<
")";
40 std::ostream&
operator<<(std::ostream& os,
const Point& p) { os << p.str();
return os; }
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Point operator*(double scalar, const Point &p)
std::ostream & operator<<(std::ostream &, const Beamline &)
Point operator+(const Point &lhs, const Point &rhs)
Point operator-(const Point &lhs, const Point &rhs)
Point(double x_, double y_, double slope_)
Single point and slope to next point.