00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifndef __LERPCHANS_H__
00020 #define __LERPCHANS_H__
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 class LerpChannelRange {
00033 private:
00034   float _low, _high;
00035 public:
00036   INLINE LerpChannelRange(float low, float high) : _low(low), _high(high) {
00037     if (low > high) {
00038       _low = high;
00039       _high = low;
00040     }
00041   }
00042   INLINE LerpChannelRange(const LerpChannelRange& c) : _low(c._low),
00043                                                        _high(c._high) {}
00044   INLINE ~LerpChannelRange(void) {}
00045   INLINE float GetLow(void) { return _low; }
00046   INLINE float GetHigh(void) { return _high; }
00047   INLINE void SetLow(float l) {
00048     if (l > _high) {
00049       _low = _high;
00050       _high = l;
00051     } else
00052       _low = l;
00053   }
00054   INLINE void SetHigh(float h) {
00055     if (h < _low) {
00056       _high = _low;
00057       _low = h;
00058     } else
00059       _high = h;
00060   }
00061   INLINE void SetRange(float l, float h) {
00062     if (l > h) {
00063       _low = h;
00064       _high = l;
00065     } else {
00066       _low = l;
00067       _high = h;
00068     }
00069   }
00070   INLINE LerpChannelRange& operator=(const LerpChannelRange& c) {
00071     _low = c._low;
00072     _high = c._high;
00073     return *this;
00074   }
00075 };
00076 
00077 template <class value>
00078 class LerpChannel {
00079 public:
00080   virtual GetValue(float p);
00081 };
00082 
00083 template <class value>
00084 class TabularChannel : public LerpChannel {
00085 };
00086 
00087 template <class value>
00088 class ProceduralChannel : public LerpChannel {
00089 };
00090 
00091 template <class value>
00092 class CompositeChannel : public LerpChannel {
00093 };
00094 
00095 template <class value>
00096 class BlendChannel : public CompositeChannel {
00097 };
00098 
00099 template <class value>
00100 class ConcatenationChannel : public CompositeChannel {
00101 };
00102 
00103 #endif