RobWorkProject
24.8.23-
|
Describes a line in 2D in polar coordinates. More...
#include <Line2DPolar.hpp>
Public Member Functions | |
Line2DPolar (double rho=0, double theta=0) | |
constructor More... | |
Line2DPolar (const rw::math::Vector2D<> &pnt, double theta) | |
constructor More... | |
Line2DPolar (const rw::math::Vector2D<> &start, const rw::math::Vector2D<> &end) | |
constructor - The line moving through the segment from 'start' to 'end'. More... | |
Line2DPolar (const Line2D &line) | |
constructor - The line moving through the line segment. More... | |
double | getRho () const |
the shortest distance from origo the line More... | |
double | getTheta () const |
angle in radians from x-axis up to the line that connects the origo and the point on the line that is closest to origo. More... | |
rw::math::Vector2D | calcNormal () const |
get normal of line | |
double | dist2 (const rw::math::Vector2D<> &pnt) const |
The L_2 distance from 'pnt' to the line. | |
Static Public Member Functions | |
static rw::math::Vector2D | projectionPoint (const Line2DPolar &line, const rw::math::Vector2D<> &pnt) |
The point for the projection of 'pnt' onto 'line'. | |
static rw::math::Vector2D | linePoint (const Line2DPolar &line) |
A supporting point on the line (equal to rho * normal). | |
static rw::math::Vector2D | normalProjectionVector (const Line2DPolar &line, const rw::math::Vector2D<> &pnt) |
The vector for the projection of pnt onto the normal of line. More... | |
static Line2DPolar | lineToLocal (const rw::math::Pose2D<> &pose, const Line2DPolar &line) |
line given relative to the coordinate frame of pose. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<> | |
void | write (const rw::math::Line2DPolar &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | read (rw::math::Line2DPolar &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
Describes a line in 2D in polar coordinates.
Line2DPolar | ( | double | rho = 0 , |
double | theta = 0 |
||
) |
constructor
rho * (cos(theta), sin(theta)) is the point on the line nearest to origo.
rho | [in] distance to the point on line which is closest to origo |
theta | [in] angle from x-axis up to the line that connects the origo and the point on the line that is closest to origo. |
Line2DPolar | ( | const rw::math::Vector2D<> & | pnt, |
double | theta | ||
) |
constructor
pnt | [in] is any point on the line |
theta | [in] angle in radians from x-axis up to the line that connects the origo and the point on the line that is closest to origo. |
Line2DPolar | ( | const rw::math::Vector2D<> & | start, |
const rw::math::Vector2D<> & | end | ||
) |
constructor - The line moving through the segment from 'start' to 'end'.
start | [in] point on line |
end | [in] point on line |
Line2DPolar | ( | const Line2D & | line | ) |
constructor - The line moving through the line segment.
line | [in] the line described as a segment |
|
inline |
the shortest distance from origo the line
|
inline |
angle in radians from x-axis up to the line that connects the origo and the point on the line that is closest to origo.
|
static |
line given relative to the coordinate frame of pose.
pose | [in] the pose. |
line | [in] the line. |
|
static |
The vector for the projection of pnt onto the normal of line.
line | [in] a line. |
pnt | [in] a point. |
|
related |
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
sobject | [out] the object in which the data should be streamed into |
iarchive | [in] the InputArchive from which to read data. |
id | [in] The id of the serialized sobject. |
|
related |
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
sobject | [in] the object from which the data should be streamed. |
oarchive | [out] the OutputArchive in which data should be written. |
id | [in] The id of the serialized sobject. |