13 #include <iSeeML/rob/OrPtConfig.hpp> 22 class State :
public iSeeML::rob::Object {
41 State() : t(0), config(), translation_vel(0), rotation_vel(0) {}
50 State(
const double&
date,
const iSeeML::rob::OrPtConfig& q,
51 const double& trans_vel,
const double& rot_vel)
52 : t(date), config(q), translation_vel(trans_vel),
53 rotation_vel(rot_vel) {}
61 const double&
date()
const {
return t; }
109 {
return *( (iSeeML::Object*) (
new State(*
this)) ); }
116 const iSeeML::geom::Point& P = q.position();
117 O <<
'(' << P.xCoord() <<
", " << P.yCoord() <<
", " 132 {
State res(*
this); res += q;
return(res); }
142 void operator+=(
const iSeeML::rob::OrPtConfig& q) { config += q; }
146 #endif // QTCTRL_STATE State(const double &date, const iSeeML::rob::OrPtConfig &q, const double &trans_vel, const double &rot_vel)
The main constructor.
bool operator==(const State &other) const
Equality operator between states.
const double & rotationVelocity() const
Gives the rotation velocity of the state.
State operator+(const iSeeML::rob::OrPtConfig &q) const
Returns the addition of a configuration to the current state.
const iSeeML::rob::OrPtConfig & configuration() const
Gives the configuration of the state.
void operator+=(const iSeeML::rob::OrPtConfig &q)
Adds a configuration to the current state: moves the state in the configuration's frame...
double t
Date of the state.
const double & translationVelocity() const
Gives the translation velocity of the state.
const double & date() const
Gives the configuration of the state.
This class defines a state, i.e. a configuration and its (translation and rotation) velocities...
iSeeML::Object & clone() const
double translation_vel
Translation velocity of the state.
State()
The default constructor should only be used for array initializations: it correspond to a default poi...
double rotation_vel
Rotation velocity of the state.
iSeeML::rob::OrPtConfig config
Configuration of the state.
void writeTo(std::ostream &O) const
Writes the configuration's values in an output stream.
static const string ClassName