|
Loris 1.5
|
#include <LinearEnvelope.h>
Public Member Functions | |
| LinearEnvelope (void) | |
| LinearEnvelope (double initialValue) | |
| virtual LinearEnvelope * | clone (void) const |
| virtual double | valueAt (double t) const |
| void | insert (double time, double value) |
| void | insertBreakpoint (double time, double value) |
| LinearEnvelope & | operator+= (double offset) |
| LinearEnvelope & | operator-= (double offset) |
| LinearEnvelope & | operator*= (double scale) |
| LinearEnvelope & | operator/= (double div) |
A LinearEnvelope 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).
LinearEnvelope implements the Envelope interface, described by the abstract class Envelope.
LinearEnvelope inherits the types
size_type value_type iterator const_iterator and the member functions
from std::map< double, double >.
| Loris::LinearEnvelope::LinearEnvelope | ( | void | ) |
Construct a new LinearEnvelope having no breakpoints (and an implicit value of 0 everywhere).
| Loris::LinearEnvelope::LinearEnvelope | ( | double | initialValue | ) | [explicit] |
Construct and return a new LinearEnvelope having a single breakpoint at 0 (and an implicit value everywhere) of initialValue.
| initialValue | is the value of this LinearEnvelope at time 0. |
| virtual LinearEnvelope* Loris::LinearEnvelope::clone | ( | void | ) | const [virtual] |
Return an exact copy of this LinearEnvelope (polymorphic copy, following the Prototype pattern).
Implements Loris::Envelope.
| void Loris::LinearEnvelope::insert | ( | double | time, |
| double | value | ||
| ) |
Insert a breakpoint representing the specified (time, value) pair into this LinearEnvelope. If there is already a breakpoint at the specified time, it will be replaced with the new breakpoint.
| time | is the time at which to insert a new breakpoint |
| value | is the value of the new breakpoint |
| void Loris::LinearEnvelope::insertBreakpoint | ( | double | time, |
| double | value | ||
| ) | [inline] |
Insert a breakpoint representing the specified (time, value) pair into this LinearEnvelope. Same as insert, retained for backwards-compatibility.
| time | is the time at which to insert a new breakpoint |
| value | is the value of the new breakpoint |
| LinearEnvelope& Loris::LinearEnvelope::operator*= | ( | double | scale | ) |
Scale this LinearEnvelope by a constant value and return a reference to self.
| scale | is the value by which to multiply to all points in the envelope |
| LinearEnvelope& Loris::LinearEnvelope::operator+= | ( | double | offset | ) |
Add a constant value to this LinearEnvelope and return a reference to self.
| offset | is the value to add to all points in the envelope |
| LinearEnvelope& Loris::LinearEnvelope::operator-= | ( | double | offset | ) | [inline] |
Subtract a constant value from this LinearEnvelope and return a reference to self.
| offset | is the value to subtract from all points in the envelope |
| LinearEnvelope& Loris::LinearEnvelope::operator/= | ( | double | div | ) | [inline] |
Divide this LinearEnvelope by a constant value and return a reference to self.
| div | is the value by which to divide to all points in the envelope |
| virtual double Loris::LinearEnvelope::valueAt | ( | double | t | ) | const [virtual] |
Return the linearly-interpolated value of this LinearEnvelope at the specified time.
| t | is the time at which to evaluate this LinearEnvelope. |
Implements Loris::Envelope.