|
@@ -1,11 +1,10 @@
|
|
|
"""LerpInterval module: contains the LerpInterval class"""
|
|
"""LerpInterval module: contains the LerpInterval class"""
|
|
|
|
|
|
|
|
-from Interval import *
|
|
|
|
|
from PandaModules import *
|
|
from PandaModules import *
|
|
|
-
|
|
|
|
|
|
|
+import Interval
|
|
|
import LerpBlendHelpers
|
|
import LerpBlendHelpers
|
|
|
|
|
|
|
|
-class LerpInterval(Interval):
|
|
|
|
|
|
|
+class LerpInterval(Interval.Interval):
|
|
|
# create LerpInterval DirectNotify category
|
|
# create LerpInterval DirectNotify category
|
|
|
notify = directNotify.newCategory('LerpInterval')
|
|
notify = directNotify.newCategory('LerpInterval')
|
|
|
# Class methods
|
|
# Class methods
|
|
@@ -17,13 +16,13 @@ class LerpInterval(Interval):
|
|
|
self.functorFunc = functorFunc
|
|
self.functorFunc = functorFunc
|
|
|
self.blendType = self.getBlend(blendType)
|
|
self.blendType = self.getBlend(blendType)
|
|
|
# Initialize superclass
|
|
# Initialize superclass
|
|
|
- Interval.__init__(self, name, duration)
|
|
|
|
|
|
|
+ Interval.Interval.__init__(self, name, duration)
|
|
|
|
|
|
|
|
- def updateFunc(self, t, event = IVAL_NONE):
|
|
|
|
|
|
|
+ def updateFunc(self, t, event = Interval.IVAL_NONE):
|
|
|
""" updateFunc(t, event)
|
|
""" updateFunc(t, event)
|
|
|
"""
|
|
"""
|
|
|
# Check to see if we need to create the lerp
|
|
# Check to see if we need to create the lerp
|
|
|
- if (event == IVAL_INIT):
|
|
|
|
|
|
|
+ if (event == Interval.IVAL_INIT):
|
|
|
self.lerp = Lerp(self.functorFunc(), self.duration,
|
|
self.lerp = Lerp(self.functorFunc(), self.duration,
|
|
|
self.blendType)
|
|
self.blendType)
|
|
|
# Make sure lerp exists
|
|
# Make sure lerp exists
|
|
@@ -319,9 +318,9 @@ class LerpFunctionInterval(Interval):
|
|
|
LerpFunctionInterval.lerpFunctionIntervalNum)
|
|
LerpFunctionInterval.lerpFunctionIntervalNum)
|
|
|
LerpFunctionInterval.lerpFunctionIntervalNum += 1
|
|
LerpFunctionInterval.lerpFunctionIntervalNum += 1
|
|
|
# Initialize superclass
|
|
# Initialize superclass
|
|
|
- Interval.__init__(self, name, duration)
|
|
|
|
|
|
|
+ Interval.Interval.__init__(self, name, duration)
|
|
|
|
|
|
|
|
- def updateFunc(self, t, event = IVAL_NONE):
|
|
|
|
|
|
|
+ def updateFunc(self, t, event = Interval.IVAL_NONE):
|
|
|
""" updateFunc(t, event)
|
|
""" updateFunc(t, event)
|
|
|
"""
|
|
"""
|
|
|
# Evaluate the function
|
|
# Evaluate the function
|