Browse Source

expose get_start() and get_end()

David Rose 24 years ago
parent
commit
1c58927483
2 changed files with 6 additions and 4 deletions
  1. 1 1
      panda/src/lerp/Sources.pp
  2. 5 3
      panda/src/lerp/lerpfunctor.h

+ 1 - 1
panda/src/lerp/Sources.pp

@@ -9,7 +9,7 @@
   #define COMBINED_SOURCES $[TARGET]_composite1.cxx 
   #define COMBINED_SOURCES $[TARGET]_composite1.cxx 
 
 
   #define SOURCES \
   #define SOURCES \
-    config_lerp.h lerp.h lerpblend.h 
+    config_lerp.h lerp.h lerpblend.h lerpfunctor.h
     
     
   #define INCLUDED_SOURCES \
   #define INCLUDED_SOURCES \
     config_lerp.cxx lerp.cxx lerpblend.cxx lerpfunctor.cxx 
     config_lerp.cxx lerp.cxx lerpblend.cxx lerpfunctor.cxx 

+ 5 - 3
panda/src/lerp/lerpfunctor.h

@@ -59,7 +59,6 @@ protected:
   value _end;
   value _end;
   value _diff_cache;
   value _diff_cache;
 
 
-  value interpolate(float);
   SimpleLerpFunctor(value start, value end) : LerpFunctor(), _start(start),
   SimpleLerpFunctor(value start, value end) : LerpFunctor(), _start(start),
                                               _end(end), _diff_cache(end-start)
                                               _end(end), _diff_cache(end-start)
     {}
     {}
@@ -70,11 +69,14 @@ public:
   virtual void operator()(float);
   virtual void operator()(float);
 
 
 PUBLISHED:
 PUBLISHED:
+  value interpolate(float);
+  INLINE const value &get_start() const { return _start; }
+  INLINE const value &get_end() const { return _end; }
+
+public:
   static TypeHandle get_class_type(void) {
   static TypeHandle get_class_type(void) {
     return _type_handle;
     return _type_handle;
   }
   }
-
-public:
   static void init_type(void) {
   static void init_type(void) {
     LerpFunctor::init_type();
     LerpFunctor::init_type();
     do_init_type(value);
     do_init_type(value);