ContRap-Libraries
Public Member Functions | Protected Attributes

crp::Image< T >::LineIterator Class Reference

Class LineIterator iterates over a line. More...

#include <image.h>

Inheritance diagram for crp::Image< T >::LineIterator:
crp::Image< T >::PrimitiveIterator

Public Member Functions

 LineIterator (Image< T > &image, Line2D &line)
 Creates a new rectangular iterator.
virtual ~LineIterator ()
 Virtual destructor.
virtual LineIteratoroperator++ (int)
 Takes the next pixel.
virtual LineIteratoroperator-- (int)
 Takes the previous pixel.
virtual bool at_end ()
 Returns true if the operator is at the end.
virtual bool at_begin ()
 Returns true if the operator is at the beginning.

Protected Attributes

Line2D line
 Primitive.
double px
 Double precision position.
double py
double dx
 Step size.
double dy

Detailed Description

template<class T>
class crp::Image< T >::LineIterator

Class LineIterator iterates over a line.


Constructor & Destructor Documentation

template<class T >
crp::Image< T >::LineIterator::LineIterator ( Image< T > &  image,
Line2D line 
) [inline]

Creates a new rectangular iterator.

Parameters:
imageAssociated image
lineLine
template<class T >
virtual crp::Image< T >::LineIterator::~LineIterator ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

template<class T >
virtual bool crp::Image< T >::LineIterator::at_begin ( ) [inline, virtual]

Returns true if the operator is at the beginning.

Returns:
True if the operator will not move backwards

Implements crp::Image< T >::PrimitiveIterator.

template<class T >
virtual bool crp::Image< T >::LineIterator::at_end ( ) [inline, virtual]

Returns true if the operator is at the end.

Returns:
True if the operator will not move any further

Implements crp::Image< T >::PrimitiveIterator.

template<class T >
virtual LineIterator& crp::Image< T >::LineIterator::operator++ ( int  ) [inline, virtual]

Takes the next pixel.

Returns:
Reference to itself

Implements crp::Image< T >::PrimitiveIterator.

template<class T >
virtual LineIterator& crp::Image< T >::LineIterator::operator-- ( int  ) [inline, virtual]

Takes the previous pixel.

Returns:
Reference to itself

Implements crp::Image< T >::PrimitiveIterator.


Field Documentation

template<class T >
double crp::Image< T >::LineIterator::dx [protected]

Step size.

template<class T >
double crp::Image< T >::LineIterator::dy [protected]
template<class T >
Line2D crp::Image< T >::LineIterator::line [protected]

Primitive.

template<class T >
double crp::Image< T >::LineIterator::px [protected]

Double precision position.

template<class T >
double crp::Image< T >::LineIterator::py [protected]

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