ISeeML  1.0
Public Member Functions | Protected Member Functions | List of all members
iSeeML::rob::CompoundPath Class Referenceabstract

This class defines compound (or complex, or composed) paths, which are made of a set of basic paths. More...

#include <CompoundPath.hpp>

Inheritance diagram for iSeeML::rob::CompoundPath:
Inheritance graph
[legend]
Collaboration diagram for iSeeML::rob::CompoundPath:
Collaboration graph
[legend]

Public Member Functions

void writeTo (ostream &O) const
 Description method, writing a description of the path in a given output stream (the array of pieces is written). More...
 
const iSeeML::rob::OrPtConfigstart () const
 Description method, giving the path's starting configuration (first piece's starting configuration). More...
 
const iSeeML::rob::OrPtConfigend () const
 Description method, giving the path's final configuration (last piece's starting configuration). More...
 
const iSeeML::rob::BasicPathpiece (const int index) const
 Description method, returning the (constant) basic path of given index in the list of which this compound path is made. More...
 
double length () const
 Description method, giving the path's length (sum of the pieces' length). More...
 
double deflection () const
 Description method, giving the path's deflection (sum of the pieces' deflection). More...
 
virtual int nbPieces () const =0
 Description method, giving the number of pieces of the path. More...
 
iSeeML::rob::BasicPathpiece (const int index)
 Modification method, returning (for modification) the basic path of given index in the list of which this compound path is made. More...
 
iSeeML::rob::CurvConfig operator[] (const double &s) const
 Description method, giving a configuration at a given arc length along the path. More...
 
- Public Member Functions inherited from iSeeML::rob::Path
bool operator< (const Path &other) const
 Order operator, defining an order relation on the paths' set, based on the path's length. More...
 
- Public Member Functions inherited from iSeeML::Object
virtual ~Object ()
 This virtual class needs a virtual destructor.
 
virtual const string className () const
 Description method, giving the object's class name. More...
 
virtual iSeeML::Objectclone () const =0
 Description method, giving a copy of the current object. More...
 
bool sameClass (const iSeeML::Object &other)
 Method verifying that a given object has the same type (same class name) than the current one. More...
 

Protected Member Functions

iSeeML::rob::BasicPathgetPiece (const int index) const
 Method returning the basic path of given index in the list of which this compound path is made. More...
 
virtual iSeeML::rob::BasicPath_piece (const int index) const =0
 Virtual method returning the basic path of given index in the list of which this compound path is made (no verification). More...
 
- Protected Member Functions inherited from iSeeML::Object
virtual int algDimension () const
 Description method for algebraic vectors, giving the dimension of the containing space (default is zero). More...
 
virtual double algCoord (const int) const
 Description method for algebraic vectors, giving coordinate of given index for this vector. More...
 
virtual void algWriteTo (ostream &O) const
 Description method for algebraic vectors, writing this vector in a given output stream: coordinates for each dimension are written, between paranthesis and separated by commas. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from iSeeML::Object
template<class T >
static const T & min (const T &a, const T &b)
 Method giving the minimum of two elements. More...
 
template<class T >
static const T & max (const T &a, const T &b)
 Method giving the maximum of two elements. More...
 
static double sqr (const double &x)
 Method giving the square of a double. More...
 
static double mod2pi (const double &theta)
 Method giving the angle between - $\pi$ (excluded) and $\pi$ (included), which is equal to a given angle modulo 2 $\pi$. More...
 
static double rad2deg (const double &theta)
 Method transforming an angle in radian, $x \pi$ with $x$ between -1 (excluded) and 1 (included), into its equivalent in degree, i.e. More...
 
static double deg2rad (const double &theta)
 Method transforming an angle in degree, $90 x$ with $x$ between -1 (excluded) and 1 (included), into its equivalent in radian, i.e. More...
 
static bool isPositive (const double &x)
 Method telling whether a double is strictly positive. More...
 
static bool isNegative (const double &x)
 Method telling whether a double is strictly negative. More...
 
static bool isZero (const double &x)
 Method comparing a double to zero. More...
 
static int sign (const double &x)
 Method giving the sign of a double. More...
 

Detailed Description

This class defines compound (or complex, or composed) paths, which are made of a set of basic paths.

Nearly all virtual methods of iSeeML::rob::Path are defined in this class (except className and clone), sub-classes ``just'' have to define this one and constructors (this is not so easy, as it generally requires a planning method).

Author
Alexis Scheuer.
Version
1.0

Member Function Documentation

virtual iSeeML::rob::BasicPath& iSeeML::rob::CompoundPath::_piece ( const int  index) const
protectedpure virtual

Virtual method returning the basic path of given index in the list of which this compound path is made (no verification).

Parameters
indexthe index of the desired piece (between 1 and the result of nbPieces).
Returns
the basic path whose index has been given.
See also
nbPieces, piece, getPiece.

Implemented in iSeeML::rob::DubinsLikePath, and iSeeML::rob::ArrayPaths.

double iSeeML::rob::CompoundPath::deflection ( ) const
inlinevirtual

Description method, giving the path's deflection (sum of the pieces' deflection).

Returns
the path's deflection.
See also
piece, BasicPath::deflection.

Implements iSeeML::rob::Path.

const iSeeML::rob::OrPtConfig& iSeeML::rob::CompoundPath::end ( ) const
inlinevirtual

Description method, giving the path's final configuration (last piece's starting configuration).

Returns
the path's final configuration.
See also
piece, BasicPath::end.

Implements iSeeML::rob::Path.

Examples:
wxGuiFwd.cpp.
iSeeML::rob::BasicPath& iSeeML::rob::CompoundPath::getPiece ( const int  index) const
inlineprotected

Method returning the basic path of given index in the list of which this compound path is made.

Parameters
indexthe index of the desired piece (between 1 and the result of nbPieces).
Precondition
parameter is an index, and should be in the correct interval. An error message is generated if this index is not correct and ISEEML_CHECK_COMP_PATH_PRECOND is defined, and index is corrected (to one if smaller, to nbPieces if bigger) if ISEEML_CHECK_ARRAY_ELEMT is defined (see CompilerFlags.h).
Returns
the basic path whose index has been given.
See also
nbPieces, piece, _piece.
double iSeeML::rob::CompoundPath::length ( ) const
inlinevirtual

Description method, giving the path's length (sum of the pieces' length).

Returns
the path's length.
See also
piece, BasicPath::length.

Implements iSeeML::rob::Path.

Examples:
LengthFwd.cpp.
virtual int iSeeML::rob::CompoundPath::nbPieces ( ) const
pure virtual

Description method, giving the number of pieces of the path.

Returns
the number of pieces of the path.
Version
1.1

Implemented in iSeeML::rob::DubinsLikePath, and iSeeML::rob::ArrayPaths.

iSeeML::rob::CurvConfig iSeeML::rob::CompoundPath::operator[] ( const double &  s) const
inlinevirtual

Description method, giving a configuration at a given arc length along the path.

Parameters
sthe arc length.
Precondition
the given arc length should be positive and less than the path's length. If this is not true, an error message is generated if ISEEML_CHECK_COMP_PATH_PRECOND is defined, and the arc length is considered as zero if smaller and as path's length if bigger, if ISEEML_CHECK_ARRAY_ELEMT is defined (see CompilerFlags.h).
Returns
the configuration at given arc length along the path.
See also
nbPieces, length, piece, BasicPath::operator[].

Implements iSeeML::rob::Path.

const iSeeML::rob::BasicPath& iSeeML::rob::CompoundPath::piece ( const int  index) const
inline

Description method, returning the (constant) basic path of given index in the list of which this compound path is made.

This method, as well as the other piece method, calls a protected one (getPiece).

Parameters
indexthe index of the desired piece (between 1 and the result of nbPieces).
Precondition
parameter is an index, and should be in the correct interval. An error message is generated if this index is not correct and ISEEML_CHECK_COMP_PATH_PRECOND is defined, and index is corrected (to one if smaller, to nbPieces if bigger) if ISEEML_CHECK_ARRAY_ELEMT is defined (see CompilerFlags.h).
Returns
the piece of the path whose index has been given.
See also
nbPieces.
iSeeML::rob::BasicPath& iSeeML::rob::CompoundPath::piece ( const int  index)
inline

Modification method, returning (for modification) the basic path of given index in the list of which this compound path is made.

Parameters
indexthe index of the basic path to change (between 1 and the result of nbPieces).
Precondition
parameter is an index, and should be in the correct interval. An error message is generated if this index is not correct and ISEEML_CHECK_COMP_PATH_PRECOND is defined, and index is corrected (to one if smaller, to nbPieces if bigger) if ISEEML_CHECK_ARRAY_ELEMT is defined (see CompilerFlags.h).
See also
nbPieces.
const iSeeML::rob::OrPtConfig& iSeeML::rob::CompoundPath::start ( ) const
inlinevirtual

Description method, giving the path's starting configuration (first piece's starting configuration).

Returns
the path's starting configuration.
See also
piece, BasicPath::start.

Implements iSeeML::rob::Path.

Examples:
wxGuiFwd.cpp.
void iSeeML::rob::CompoundPath::writeTo ( ostream &  O) const
inlinevirtual

Description method, writing a description of the path in a given output stream (the array of pieces is written).

The array of basic paths is written between accolades ('{' and '}'), paths being separated by commas.

Parameters
Othe output stream in which description is written.
See also
nbPieces, piece.

Implements iSeeML::Object.

Reimplemented in iSeeML::rob::FscPath, and iSeeML::rob::DubinsPath.


The documentation for this class was generated from the following file: