class Core::SegmentInterpolator
Overview
Base Class for multiple segment linear interpolators. More…
#include <coreinterpolator.h> class SegmentInterpolator: public Core::Interpolator { public: // structs struct BreakPoint; // construction SegmentInterpolator(int numPoints, const BreakPoint points[]); // methods virtual void setRange(float minRange, float maxRange, float midRange = 1.f); virtual float normalizedToRange(float normalized) const; virtual float rangeToNormalized(float value) const; };
Inherited Members
public: // methods CStringPtr getName() const; void setName(CStringPtr _name); float getMinRange() const; float getMaxRange() const; float getMidRange() const; virtual void setRange(float minRange, float maxRange, float midRange = 1.f); virtual float normalizedToRange(float normalized) const; virtual float rangeToNormalized(float value) const;
Detailed Documentation
Base Class for multiple segment linear interpolators.
Construction
SegmentInterpolator(int numPoints, const BreakPoint points[])
First and last points need to be minRange / maxRange.
Methods
virtual void setRange(float minRange, float maxRange, float midRange = 1.f)
Set value range [min..max].
(middle value optional)
virtual float normalizedToRange(float normalized) const
Convert from normalized domain [0..1] to value range [min..max].
virtual float rangeToNormalized(float value) const
Convert from value range [min..max] to normalized domain [0..1].