csl::LineSegment Class Reference

#include <Envelope.h>

Inheritance diagram for csl::LineSegment:

csl::UnitGenerator List of all members.

Detailed Description

A linearly interpolated segment -- this has start and end values, and a duration (in seconds).


Public Member Functions

 LineSegment ()
 empty constructor
 LineSegment (float d, float s, float e, LineMode mode=kLine)
 Declare dur in sec, start, stop values.
float start ()
 Accessors Returns the initial value of the line segment.
float end ()
 Returns the target value of the line segment.
float duration ()
 Returns the total time it will take to get from start to end value.
unsigned currentFrame ()
void setEnd (float end)
void setStart (float start)
void setDuration (unsigned duration)
 Overloaded to accept either float or unsigned.
void setDuration (float duration)
void setMode (LineMode mode)
 Sets the interpolation kind (linear or exponential).
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
 next buffer interpolator
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum, Port *scalePort, Port *offsetPort) throw (CException)
 handy version given Scalable port pointers
void reset ()
 reset counters
void trigger ()
void dump ()
 reset internal time to restart envelope Prints to screen the start and end values and the duration of the line.

Protected Attributes

float mStart
 Start value.
float mEnd
 Ending value.
float mDuration
 Length of the line segment (IN SECONDS).
LineMode mMode
 How am I to calculate the values from start to end values of the line.
float mCurrentValue
 Internal book-keeping.
unsigned mCurrentFrame
 cache


Constructor & Destructor Documentation

LineSegment::LineSegment  ) 
 

empty constructor

LineSegment::LineSegment float  d,
float  s,
float  e,
LineMode  mode = kLine
 

Declare dur in sec, start, stop values.


Member Function Documentation

float csl::LineSegment::start void   )  [inline]
 

Accessors Returns the initial value of the line segment.

float csl::LineSegment::end  )  [inline]
 

Returns the target value of the line segment.

float csl::LineSegment::duration  )  [inline]
 

Returns the total time it will take to get from start to end value.

unsigned csl::LineSegment::currentFrame  )  [inline]
 

void csl::LineSegment::setEnd float  end  )  [inline]
 

void csl::LineSegment::setStart float  start  )  [inline]
 

void csl::LineSegment::setDuration unsigned  duration  )  [inline]
 

Overloaded to accept either float or unsigned.

void csl::LineSegment::setDuration float  duration  )  [inline]
 

void csl::LineSegment::setMode LineMode  mode  )  [inline]
 

Sets the interpolation kind (linear or exponential).

void LineSegment::nextBuffer Buffer outputBuffer,
unsigned  outBufNum
throw (CException)
 

next buffer interpolator

void LineSegment::nextBuffer Buffer outputBuffer,
unsigned  outBufNum,
Port scalePort,
Port offsetPort
throw (CException)
 

handy version given Scalable port pointers

calculate the increment for the linear interpolation, the number of frames to calculate and the number of frames that are constant (at the end of the interpolations)

This test to see if we're at the end works for now, but we should use a bool to check if we are done in case mCurrentFrame loops

< Generate the interpolated frames

< Generate the interpolated frames

< Generate the constant frames

< if we're not already at the end increment my internal counters

void LineSegment::reset  ) 
 

reset counters

void csl::LineSegment::trigger void   )  [inline]
 

void LineSegment::dump  ) 
 

reset internal time to restart envelope Prints to screen the start and end values and the duration of the line.


Member Data Documentation

float csl::LineSegment::mStart [protected]
 

Start value.

float csl::LineSegment::mEnd [protected]
 

Ending value.

float csl::LineSegment::mDuration [protected]
 

Length of the line segment (IN SECONDS).

LineMode csl::LineSegment::mMode [protected]
 

How am I to calculate the values from start to end values of the line.

float csl::LineSegment::mCurrentValue [protected]
 

Internal book-keeping.

unsigned csl::LineSegment::mCurrentFrame [protected]
 

cache


The documentation for this class was generated from the following files:
Generated on Fri Apr 6 20:18:20 2007 for CSL by  doxygen 1.4.5-20051010