RobWorkProject  24.5.15-
TrajectoryIterator< T > Class Template Referenceabstract

Forward declaration of Trajectory Iterator (needed for friend declaration) More...

#include <TrajectoryIterator.hpp>

Inherited by InterpolatorTrajectoryIterator< T >.

## Public Types

typedef rw::core::Ptr< TrajectoryIterator< T > > Ptr
smart pointer type

## Public Member Functions

virtual ~TrajectoryIterator ()
destructor

virtual double getTime () const =0
Returns the current position (time) of the iterator. More...

virtual void inc ()=0
Method for increasing the position of the iterator a fixed amount. More...

virtual void inc (double dt)=0
Method for increasing the position of the iterator by dt. More...

virtual void dec ()=0
Method for decreasing the position of the iterator a fixed amount. More...

virtual void dec (double dt)=0
Method for decreasing the position of the iterator a fixed amount. More...

virtual void operator-= (double dt)
This function can be used to decrease the iterator position. The position can be decreased no longer than to time equals 0. More...

virtual void operator+= (double dt)
This function can be used to increase the iterator position. The position can be increased no longer than the length of the complete trajectory. More...

virtual TrajectoryIteratoroperator++ ()

virtual void operator++ (int)

virtual TrajectoryIteratoroperator-- ()

virtual void operator-- (int)

virtual bool isEnd () const =0
Test if the end of the trajectory is reached. More...

virtual bool isBegin () const =0
Test if the beginning of the trajectory is reached. More...

virtual T operator* () const =0
Extracts a point at the current position in the trajectory. More...

virtual T x () const =0
Extracts a point at the current position in the trajectory. More...

virtual T dx () const =0
Extracts a point of the derivative of the trajectory at the current position in the trajectory. More...

virtual T ddx () const =0
Extracts a point of the double derivative of the trajectory at the current position in the trajectory. More...

## Detailed Description

### template<class T> class rw::trajectory::TrajectoryIterator< T >

Forward declaration of Trajectory Iterator (needed for friend declaration)

Bi-directional iterator for running efficiently through a trajectory.

## ◆ ddx()

 virtual T ddx ( ) const
pure virtual

Extracts a point of the double derivative of the trajectory at the current position in the trajectory.

Returns
the double derived point at the current position in the trajectory.

Implemented in InterpolatorTrajectoryIterator< T >.

## ◆ dec() [1/2]

 virtual void dec ( )
pure virtual

Method for decreasing the position of the iterator a fixed amount.

The decrement is equal to the dt specified in the constructor.

## ◆ dec() [2/2]

 virtual void dec ( double dt )
pure virtual

Method for decreasing the position of the iterator a fixed amount.

Parameters
 dt [in] Amount to decrease. A positive value is expected

## ◆ dx()

 virtual T dx ( ) const
pure virtual

Extracts a point of the derivative of the trajectory at the current position in the trajectory.

Returns
the derived point at the current position in the trajectory.

Implemented in InterpolatorTrajectoryIterator< T >.

## ◆ getTime()

 virtual double getTime ( ) const
pure virtual

Returns the current position (time) of the iterator.

Returns
The current time.

## ◆ inc() [1/2]

 virtual void inc ( )
pure virtual

Method for increasing the position of the iterator a fixed amount.

The increment is equal to the dt specified in the constructor.

## ◆ inc() [2/2]

 virtual void inc ( double dt )
pure virtual

Method for increasing the position of the iterator by dt.

Parameters
 dt [in] Amount to increase. A positive value is expected.

## ◆ isBegin()

 virtual bool isBegin ( ) const
pure virtual

Test if the beginning of the trajectory is reached.

Returns
true if the iterator has reached the beginning of the trajectory false otherwise.

## ◆ isEnd()

 virtual bool isEnd ( ) const
pure virtual

Test if the end of the trajectory is reached.

Returns
true if the iterator has reached the end of the trajectory false otherwise.

## ◆ operator*()

 virtual T operator* ( ) const
pure virtual

Extracts a point at the current position in the trajectory.

Returns
the point at the current position in the trajectory.

Implemented in InterpolatorTrajectoryIterator< T >.

## ◆ operator++() [1/2]

 virtual TrajectoryIterator& operator++ ( )
inlinevirtual

Usage: ++iterator

The increment is equal to the dt specified in the constructor.

Returns
Reference to the TrajectoryIterator

Reimplemented in InterpolatorTrajectoryIterator< T >.

## ◆ operator++() [2/2]

 virtual void operator++ ( int )
inlinevirtual

Usage: iterator++

The increment is equal to the dt specified in the constructor.

## ◆ operator+=()

 virtual void operator+= ( double dt )
inlinevirtual

This function can be used to increase the iterator position. The position can be increased no longer than the length of the complete trajectory.

Parameters
 dt [in] a double that describes how much to increase the iterator position

Reimplemented in InterpolatorTrajectoryIterator< T >.

## ◆ operator--() [1/2]

 virtual TrajectoryIterator& operator-- ( )
inlinevirtual

Usage: –iterator;

The decrement is equal to the dt specified in the constructor.

Returns
Reference to the TrajectoryIterator

Reimplemented in InterpolatorTrajectoryIterator< T >.

## ◆ operator--() [2/2]

 virtual void operator-- ( int )
inlinevirtual

Usage: iterator–;

The decrement is equal to the dt specified in the constructor.

## ◆ operator-=()

 virtual void operator-= ( double dt )
inlinevirtual

This function can be used to decrease the iterator position. The position can be decreased no longer than to time equals 0.

Parameters
 dt [in] a double that describes how much to decrease the iterator position

Reimplemented in InterpolatorTrajectoryIterator< T >.

## ◆ x()

 virtual T x ( ) const
pure virtual

Extracts a point at the current position in the trajectory.

Returns
the point at the current position in the trajectory.

Implemented in InterpolatorTrajectoryIterator< T >.

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