Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Loris::BreakpointEnvelope Class Reference

A BreakpointEnvelope represents a linear segment breakpoint function with infinite extension at each end (that is, evalutaing the envelope past either end of the breakpoint function yields the value at the nearest end point). More...

#include <BreakpointEnvelope.h>

Inheritance diagram for Loris::BreakpointEnvelope:

Loris::Envelope List of all members.

Public Member Functions

 BreakpointEnvelope (void)
 Construct a new BreakpointEnvelope having no breakpoints (and an implicit value of 0 everywhere).

 BreakpointEnvelope (double initialValue)
 Construct and return a new BreakpointEnvelope having a single breakpoint at 0 (and an implicit value everywhere) of initialValue.

virtual BreakpointEnvelopeclone (void) const
 Return an exact copy of this BreakpointEnvelope (polymorphic copy, following the Prototype pattern).

virtual double valueAt (double t) const
 Return the linearly-interpolated value of this BreakpointEnvelope at the specified time.

void insert (double time, double value)
 Insert a breakpoint representing the specified (time, value) pair into this BreakpointEnvelope.

void insertBreakpoint (double time, double value)
 Insert a breakpoint representing the specified (time, value) pair into this BreakpointEnvelope.


Detailed Description

A BreakpointEnvelope represents a linear segment breakpoint function with infinite extension at each end (that is, evalutaing the envelope past either end of the breakpoint function yields the value at the nearest end point).

BreakpointEnvelope implements the Envelope interface, described by the abstract class Envelope.

BreakpointEnvelope inherits the types

and the member functions from std::map< double, double >.


Constructor & Destructor Documentation

Loris::BreakpointEnvelope::BreakpointEnvelope void   ) 
 

Construct a new BreakpointEnvelope having no breakpoints (and an implicit value of 0 everywhere).

Loris::BreakpointEnvelope::BreakpointEnvelope double  initialValue  )  [explicit]
 

Construct and return a new BreakpointEnvelope having a single breakpoint at 0 (and an implicit value everywhere) of initialValue.

Parameters:
initialValue is the value of this BreakpointEnvelope at time 0.


Member Function Documentation

void Loris::BreakpointEnvelope::insert double  time,
double  value
 

Insert a breakpoint representing the specified (time, value) pair into this BreakpointEnvelope.

If there is already a breakpoint at the specified time, it will be replaced with the new breakpoint.

Parameters:
time is the time at which to insert a new breakpoint
value is the value of the new breakpoint

void Loris::BreakpointEnvelope::insertBreakpoint double  time,
double  value
 

Insert a breakpoint representing the specified (time, value) pair into this BreakpointEnvelope.

Same as insert, retained for backwards-compatibility.

virtual double Loris::BreakpointEnvelope::valueAt double  t  )  const [virtual]
 

Return the linearly-interpolated value of this BreakpointEnvelope at the specified time.

Parameters:
t is the time at which to evaluate this BreakpointEnvelope.

Implements Loris::Envelope.


Generated on Thu Apr 14 22:01:56 2005 for Loris by doxygen 1.3.4