 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
34 #define M_PI 3.1415926535897932384626433832795
37 #define DEG2RAD(x) static_cast<double>((x) * M_PI / 180.)
38 #define RAD2DEG(x) static_cast<double>((x) * 180. / M_PI)
63 std::vector<double>& into);
74 const Position& p,
bool perpendicular =
true);
78 const Position& p,
bool perpendicular =
true);
116 static double angleDiff(
const double angle1,
const double angle2);
140 static double legacyDegree(
const double angle,
const bool positive =
false);
static double angleDiff(const double angle1, const double angle2)
Returns the difference of the second angle to the first angle in radiants.
static double getMinAngleDiff(double angle1, double angle2)
Returns the minimum distance (clockwise/counter-clockwise) between both angles.
static double nearest_offset_on_line_to_point25D(const Position &lineStart, const Position &lineEnd, const Position &p, bool perpendicular=true)
static double legacyDegree(const double angle, const bool positive=false)
static double naviDegree(const double angle)
static double nearest_offset_on_line_to_point2D(const Position &lineStart, const Position &lineEnd, const Position &p, bool perpendicular=true)
static PositionVector makeRing(const double radius1, const double radius2, const Position ¢er, unsigned int nPoints)
static const double INVALID_OFFSET
a value to signify offsets outside the range of [0, Line.length()]
static Position crossPoint(const Boundary &b, const PositionVector &v)
static void findLineCircleIntersections(const Position &c, double radius, const Position &p1, const Position &p2, std::vector< double > &into)
Returns the positions the given circle is crossed by the given line.
A class that stores a 2D geometrical boundary.
A point in 2D or 3D with translation and scaling methods.
Some static methods performing geometrical operations.
static double getCWAngleDiff(double angle1, double angle2)
Returns the distance of second angle from first angle clockwise.
static double angle2D(const Position &p1, const Position &p2)
Returns the angle between two vectors on a plane The angle is from vector 1 to vector 2,...
static double fromNaviDegree(const double angle)
static PositionVector makeCircle(const double radius, const Position ¢er, unsigned int nPoints)
static double getCCWAngleDiff(double angle1, double angle2)
Returns the distance of second angle from first angle counter-clockwise.