RobWorkProject
23.9.11-
|
a model of a circle, represented as a normal, a center and a radius More...
#include <CircleModel.hpp>
Public Member Functions | |
CircleModel () | |
constructor | |
CircleModel (const rw::math::Vector3D<> &c, const rw::math::Vector3D<> &n, double radi) | |
contructor More... | |
CircleModel (rw::math::Vector3D<> &p1, rw::math::Vector3D<> &p2, rw::math::Vector3D<> &p3) | |
constructor from 3 unique points on circle More... | |
void | refit (const std::vector< rw::math::Vector3D<>> &points) |
refit the circle from a number of points. Use a least square fit. More... | |
bool | isClose (const CircleModel &circ, double epsilon) const |
tests if two circles are "equal" which is within some epsilon of each other More... | |
bool | isClose (const rw::math::Vector3D<> &p, double epsilon) const |
tests if a point is within a distance epsilon of this circle. More... | |
Static Public Member Functions | |
static CircleModel | fitTo (const std::vector< rw::math::Vector3D<>> &points) |
create a circle from a number of points. Use a least square fit. More... | |
Public Attributes | |
rw::math::Vector3D | _center |
rw::math::Vector3D | _n |
double | _r |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CircleModel &model) |
Ouputs CircleModel to stream. More... | |
a model of a circle, represented as a normal, a center and a radius
CircleModel | ( | const rw::math::Vector3D<> & | c, |
const rw::math::Vector3D<> & | n, | ||
double | radi | ||
) |
contructor
c | [in] center |
n | [in] normal |
radi | [in] radius |
CircleModel | ( | rw::math::Vector3D<> & | p1, |
rw::math::Vector3D<> & | p2, | ||
rw::math::Vector3D<> & | p3 | ||
) |
constructor from 3 unique points on circle
p1 | [in] point on circle |
p2 | [in] point on circle |
p3 | [in] point on circle |
|
static |
create a circle from a number of points. Use a least square fit.
points | [in] the vector of points that the circle is fitted to |
bool isClose | ( | const CircleModel & | circ, |
double | epsilon | ||
) | const |
tests if two circles are "equal" which is within some epsilon of each other
circ | [in] the other circle |
epsilon | [in] how close they need to be. |
bool isClose | ( | const rw::math::Vector3D<> & | p, |
double | epsilon | ||
) | const |
tests if a point is
within a distance epsilon of this circle.
p | [in] point in 3D |
epsilon | [in] max distance that p can be from this circle. |
void refit | ( | const std::vector< rw::math::Vector3D<>> & | points | ) |
refit the circle from a number of points. Use a least square fit.
points | [in] the vector of points that the circle is fitted to |
|
friend |
Ouputs CircleModel to stream.
os | [in/out] stream to use |
model | [in] a CircleModel |