Rose
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
rose::color::Interpolator< Representation > Class Template Reference

Provide linear interpolation between two color Values. More...

#include <Color.h>

Collaboration diagram for rose::color::Interpolator< Representation >:
Collaboration graph
[legend]

Classes

class  Iterator
 An iterator over the range of the interpolator. More...
 

Public Types

using color_type = Representation
 
using index_type = ssize_t
 
using color_type = Representation
 
using index_type = ssize_t
 

Public Member Functions

 Interpolator (Representation start, Representation finish, size_t steps)
 
color_type operator() (index_type index)
 Get the interpolated value at index. More...
 
Iterator begin ()
 Get an iterator pointing to the start of the interpolated range. More...
 
Iterator end ()
 Get an iterator pointing one past the end of the interpolated range. More...
 
 Interpolator (Representation start, Representation finish, size_t steps)
 
color_type operator() (index_type index)
 Get the interpolated value at index. More...
 
Iterator begin ()
 Get an iterator pointing to the start of the interpolated range. More...
 
Iterator end ()
 Get an iterator pointing one past the end of the interpolated range. More...
 

Protected Attributes

color_type mStart
 The starting color.
 
color_type mFinish
 The finishing color.
 
index_type mSteps
 The number of steps in the interpolation.
 
Value mIncrement
 The amount to increment.
 

Detailed Description

template<class Representation>
class rose::color::Interpolator< Representation >

Provide linear interpolation between two color Values.

Template Parameters
RepresentationThe Representation type of the Value.

Member Function Documentation

◆ begin() [1/2]

template<class Representation>
Iterator rose::color::Interpolator< Representation >::begin ( )
inline

Get an iterator pointing to the start of the interpolated range.

Returns
an Iterator

◆ begin() [2/2]

template<class Representation>
Iterator rose::color::Interpolator< Representation >::begin ( )
inline

Get an iterator pointing to the start of the interpolated range.

Returns
an Iterator

◆ end() [1/2]

template<class Representation>
Iterator rose::color::Interpolator< Representation >::end ( )
inline

Get an iterator pointing one past the end of the interpolated range.

Returns
on Iterator

◆ end() [2/2]

template<class Representation>
Iterator rose::color::Interpolator< Representation >::end ( )
inline

Get an iterator pointing one past the end of the interpolated range.

Returns
on Iterator

◆ operator()() [1/2]

template<class Representation>
color_type rose::color::Interpolator< Representation >::operator() ( index_type  index)
inline

Get the interpolated value at index.

Parameters
indexThe index to interpolate at [0..steps)
Returns
The interpolated color Value.

◆ operator()() [2/2]

template<class Representation>
color_type rose::color::Interpolator< Representation >::operator() ( index_type  index)
inline

Get the interpolated value at index.

Parameters
indexThe index to interpolate at [0..steps)
Returns
The interpolated color Value.

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