7 #ifndef ISEEML_ROB_ORIENT_POINT_HH
8 #define ISEEML_ROB_ORIENT_POINT_HH
12 #include <iSeeML/rob/Object.hpp>
14 #include <iSeeML/geom/Point.hpp>
79 Position(P), Orientation(
mod2pi(theta) ) {}
93 const double& theta) :
94 Position(x, y), Orientation(
mod2pi(theta) ) {}
206 #ifdef ISEEML_CHECK_ORPT_CONFIG_PRECOND
207 cerr <<
ClassName <<
"::coord: parameter " << i << endl
208 <<
" outside allowed values (1, 2 or 3),"
209 <<
" returning zero..." << endl;
226 Orientation += (Orientation > 0 ? - M_PI : M_PI);
349 other.orientation() ) / 2)
396 #endif // end of definition
void writeTo(ostream &O) const
Description method, writing the configuration in a given output stream: coordinate in each dimension ...
Definition: OrPtConfig.hpp:124
bool operator==(const OrPtConfig &other) const
Equality operator between oriented points.
Definition: OrPtConfig.hpp:241
virtual void algWriteTo(ostream &O) const
Description method for algebraic vectors, writing this vector in a given output stream: coordinates f...
Definition: Object.hpp:166
OrPtConfig projection(const OrPtConfig &q) const
Projects a configuration in the frame of this configuration.
Definition: OrPtConfig.hpp:168
OrPtConfig(const iSeeML::geom::Point &P, const double &theta)
The main constructor.
Definition: OrPtConfig.hpp:78
iSeeML::Object & clone() const
Description method, giving a copy of the current configuration.
Definition: OrPtConfig.hpp:113
int algDimension() const
Description method, giving the dimension of the containing space (3) when this configuration is consi...
Definition: OrPtConfig.hpp:184
iSeeML::geom::Vector projection(const iSeeML::geom::Point &P) const
Gives the projection of a point in the frame of this configuration.
Definition: OrPtConfig.hpp:151
const double & yCoord() const
Description method, giving the point's second coordinate.
Definition: Point.hpp:96
const double & orientation() const
Description method, giving the orientation of the robot's main axis in this configuration.
Definition: OrPtConfig.hpp:139
bool isSymmetricTo(const OrPtConfig &other) const
Various method, checking whether two oriented points are symmetric, ie whether their orientations are...
Definition: OrPtConfig.hpp:345
const double & xCoord() const
Description method, giving the point's first coordinate.
Definition: Point.hpp:90
This class defines a standard robotic configuration, containing the position of a reference point and...
Definition: OrPtConfig.hpp:45
void operator+=(const OrPtConfig &other)
Adds an oriente point to the current one: gives the oriented point obtained when the added oriented p...
Definition: OrPtConfig.hpp:255
static const string ClassName
The class name is public, as this class can be instanced.
Definition: OrPtConfig.hpp:56
static double mod2pi(const double &theta)
Method giving the angle between - (excluded) and (included), which is equal to a given angle modulo...
Definition: Object.hpp:252
const iSeeML::geom::Point & position() const
Description method, giving the position of the robot's reference point in this configuration.
Definition: OrPtConfig.hpp:132
Vector & rotate(const double &theta)
Modification method, rotating the vector of a given angle.
Definition: Vector.hpp:247
OrPtConfig & uTurn()
Modification method, turning the current oriented point to its opposite: the position does not change...
Definition: OrPtConfig.hpp:224
bool isParallelTo(const OrPtConfig &other) const
Various method, checking whether two oriented points are parallel, ie whether their orientations are ...
Definition: OrPtConfig.hpp:325
static bool isZero(const double &x)
Method comparing a double to zero.
Definition: Object.hpp:312
double distance2(const OrPtConfig &other) const
Various method, giving the distance between two oriented points' positions.
Definition: OrPtConfig.hpp:309
virtual ~OrPtConfig()
The virtual destructor does nothing.
Definition: OrPtConfig.hpp:100
This class defines 2D geometric vectors, which can be defined by their Polar or Cartesian coordinates...
Definition: Vector.hpp:34
This class is the base class of ISeeML: every class of ISeeML inherits this one.
Definition: Object.hpp:47
bool hasInFront(const iSeeML::geom::Point &point) const
Various method, checking whether a point is in the front half-plane of the current oriented point: th...
Definition: OrPtConfig.hpp:389
bool isAlignedWith(const OrPtConfig &other) const
Various method, checking whether two oriented points are aligned: their orientations should be equal,...
Definition: OrPtConfig.hpp:366
This class is the base class of robotic namespace of ISeeML: every robotic object inherits this one.
Definition: Object.hpp:21
OrPtConfig operator+(const OrPtConfig &other) const
Addition operator between oriented points: gives the oriented point obtained when the second oriented...
Definition: OrPtConfig.hpp:271
This class defines 2D geometric points, defined by their Cartesian coordinates.
Definition: Point.hpp:29
OrPtConfig()
The default constructor should only be used for array initializations: it correspond to a default poi...
Definition: OrPtConfig.hpp:67
OrPtConfig opposite() const
Various method, giving the opposite oriented point of the current one: the opposite oriented point ha...
Definition: OrPtConfig.hpp:290
OrPtConfig(const double &x, const double &y, const double &theta)
A usefull constructor.
Definition: OrPtConfig.hpp:92
double algCoord(const int i) const
Description method, giving the coordinate of given index of the configuration (both coordinates of th...
Definition: OrPtConfig.hpp:202