105 std::copy (poly.begin(), poly.end() - 1,
106 std::ostream_iterator<Point3D>(os,
", "));
125 moved.push_back(at(0) +
Point3D(0.0, dist, 0.0));
139 lastAng = (at(1) - lastPos).getAngleAroundZ();
144 for (i = 1; i < size(); i++)
147 ang = (pt - lastPos).getAngleAroundZ();
149 double halfAngBetween = diffAng / 2.0;
153 double cosHalfAngBetween = std::abs(cos(halfAngBetween));
157 if ((cosHalfAngBetween) > 0.195)
159 edgeDist = dist / cosHalfAngBetween;
160 shiftVec =
Point3D(0.0, edgeDist, 0.0);
162 Point3D np = lastPos + shiftVec;
171 moved.push_back(lastPos + shiftVec);
std::string toString() const
Text output for debugging; opposite of fromString().
This class defines a point in the three-dimensional plane.
double getAngleAroundZ() const
Returns the rotation angle around z (in the x-y-plane)
void rotateAroundZ(double dYawAngle)
Rotate the point around the Z-axis ("Yaw angle")
Polygon3D getMovedPath(double dist) const
void sortForAngleXYPlane()
Polygon3D()
Constructor for an empty polygon.
std::vector< Point3D > base_class
The base type. (Naming according to boost convention.)
static bool comparePointAngleXYPlane(const Point3D &p1, const Point3D &p2)
Compare-function for the sort algorithm sortForAngleXYPlane().
std::ostream & operator<<(std::ostream &os, const EvalCaseResult &result)