浏览代码

expose get_start() and get_end()

David Rose 24 年之前
父节点
当前提交
1c58927483
共有 2 个文件被更改,包括 6 次插入4 次删除
  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 SOURCES \
-    config_lerp.h lerp.h lerpblend.h 
+    config_lerp.h lerp.h lerpblend.h lerpfunctor.h
     
   #define INCLUDED_SOURCES \
     config_lerp.cxx lerp.cxx lerpblend.cxx lerpfunctor.cxx 

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

@@ -59,7 +59,6 @@ protected:
   value _end;
   value _diff_cache;
 
-  value interpolate(float);
   SimpleLerpFunctor(value start, value end) : LerpFunctor(), _start(start),
                                               _end(end), _diff_cache(end-start)
     {}
@@ -70,11 +69,14 @@ public:
   virtual void operator()(float);
 
 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) {
     return _type_handle;
   }
-
-public:
   static void init_type(void) {
     LerpFunctor::init_type();
     do_init_type(value);