mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
*** empty log message ***
This commit is contained in:
parent
e1f0c9a908
commit
ba2f68815c
@ -283,6 +283,7 @@
|
|||||||
if (task.lerp.isDone()):
|
if (task.lerp.isDone()):
|
||||||
# Reset the init flag, in case the task gets re-used
|
# Reset the init flag, in case the task gets re-used
|
||||||
task.init = 1
|
task.init = 1
|
||||||
|
del task.functorFunc
|
||||||
return(Task.done)
|
return(Task.done)
|
||||||
else:
|
else:
|
||||||
return(Task.cont)
|
return(Task.cont)
|
||||||
|
@ -29,6 +29,9 @@ class Interval(DirectObject):
|
|||||||
# Set true if interval responds to setT(t): t>duration
|
# Set true if interval responds to setT(t): t>duration
|
||||||
self.fOpenEnded = openEnded
|
self.fOpenEnded = openEnded
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
print 'Interval destructing'
|
||||||
|
|
||||||
def getName(self):
|
def getName(self):
|
||||||
""" getName()
|
""" getName()
|
||||||
"""
|
"""
|
||||||
|
@ -15,6 +15,10 @@ class LerpInterval(Interval):
|
|||||||
self.blendType = self.getBlend(blendType)
|
self.blendType = self.getBlend(blendType)
|
||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
Interval.__init__(self, name, duration)
|
Interval.__init__(self, name, duration)
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
print 'LerpInterval destructing'
|
||||||
|
|
||||||
def updateFunc(self, t, event = IVAL_NONE):
|
def updateFunc(self, t, event = IVAL_NONE):
|
||||||
""" updateFunc(t, event)
|
""" updateFunc(t, event)
|
||||||
"""
|
"""
|
||||||
@ -25,6 +29,7 @@ class LerpInterval(Interval):
|
|||||||
# Evaluate the lerp if its been created
|
# Evaluate the lerp if its been created
|
||||||
if self.lerp:
|
if self.lerp:
|
||||||
self.lerp.setT(t)
|
self.lerp.setT(t)
|
||||||
|
|
||||||
def getBlend(self, blendType):
|
def getBlend(self, blendType):
|
||||||
"""__getBlend(self, string)
|
"""__getBlend(self, string)
|
||||||
Return the C++ blend class corresponding to blendType string
|
Return the C++ blend class corresponding to blendType string
|
||||||
@ -50,7 +55,7 @@ class LerpPosInterval(LerpInterval):
|
|||||||
other=None, blendType='noBlend', name=None):
|
other=None, blendType='noBlend', name=None):
|
||||||
""" __init__(node, duration, pos, startPos, other, blendType, name)
|
""" __init__(node, duration, pos, startPos, other, blendType, name)
|
||||||
"""
|
"""
|
||||||
def functorFunc(self=self, node=node, pos=pos, startPos=startPos,
|
def functorFunc(node=node, pos=pos, startPos=startPos,
|
||||||
other=other):
|
other=other):
|
||||||
import PosLerpFunctor
|
import PosLerpFunctor
|
||||||
assert(not node.isEmpty())
|
assert(not node.isEmpty())
|
||||||
@ -66,6 +71,7 @@ class LerpPosInterval(LerpInterval):
|
|||||||
functor = PosLerpFunctor.PosLerpFunctor(
|
functor = PosLerpFunctor.PosLerpFunctor(
|
||||||
node, startPos, pos)
|
node, startPos, pos)
|
||||||
return functor
|
return functor
|
||||||
|
|
||||||
# Generate unique name if necessary
|
# Generate unique name if necessary
|
||||||
if (name == None):
|
if (name == None):
|
||||||
name = 'LerpPosInterval-%d' % LerpPosInterval.lerpPosNum
|
name = 'LerpPosInterval-%d' % LerpPosInterval.lerpPosNum
|
||||||
@ -81,7 +87,7 @@ class LerpHprInterval(LerpInterval):
|
|||||||
other=None, blendType='noBlend', name=None):
|
other=None, blendType='noBlend', name=None):
|
||||||
""" __init__(node, duration, hpr, startHpr, other, blendType, name)
|
""" __init__(node, duration, hpr, startHpr, other, blendType, name)
|
||||||
"""
|
"""
|
||||||
def functorFunc(self=self, node=node, hpr=hpr, startHpr=startHpr,
|
def functorFunc(node=node, hpr=hpr, startHpr=startHpr,
|
||||||
other=other):
|
other=other):
|
||||||
import HprLerpFunctor
|
import HprLerpFunctor
|
||||||
|
|
||||||
@ -98,6 +104,7 @@ class LerpHprInterval(LerpInterval):
|
|||||||
functor = HprLerpFunctor.HprLerpFunctor(
|
functor = HprLerpFunctor.HprLerpFunctor(
|
||||||
node, startHpr, hpr)
|
node, startHpr, hpr)
|
||||||
return functor
|
return functor
|
||||||
|
|
||||||
# Generate unique name if necessary
|
# Generate unique name if necessary
|
||||||
if (name == None):
|
if (name == None):
|
||||||
name = 'LerpHprInterval-%d' % LerpHprInterval.lerpHprNum
|
name = 'LerpHprInterval-%d' % LerpHprInterval.lerpHprNum
|
||||||
@ -114,7 +121,7 @@ class LerpScaleInterval(LerpInterval):
|
|||||||
other=None, blendType='noBlend', name=None):
|
other=None, blendType='noBlend', name=None):
|
||||||
""" __init__(node, duration, scale, startScale, other, blendType, name)
|
""" __init__(node, duration, scale, startScale, other, blendType, name)
|
||||||
"""
|
"""
|
||||||
def functorFunc(self=self, node=node, scale=scale,
|
def functorFunc(node=node, scale=scale,
|
||||||
startScale=startScale, other=other):
|
startScale=startScale, other=other):
|
||||||
import ScaleLerpFunctor
|
import ScaleLerpFunctor
|
||||||
|
|
||||||
@ -149,7 +156,7 @@ class LerpPosHprInterval(LerpInterval):
|
|||||||
""" __init__(node, duration, pos, hpr, startPos, startHpr,
|
""" __init__(node, duration, pos, hpr, startPos, startHpr,
|
||||||
other, blendType, name)
|
other, blendType, name)
|
||||||
"""
|
"""
|
||||||
def functorFunc(self=self, node=node, pos=pos, hpr=hpr,
|
def functorFunc(node=node, pos=pos, hpr=hpr,
|
||||||
startPos=startPos, startHpr=startHpr, other=other):
|
startPos=startPos, startHpr=startHpr, other=other):
|
||||||
import PosHprLerpFunctor
|
import PosHprLerpFunctor
|
||||||
|
|
||||||
@ -180,6 +187,9 @@ class LerpPosHprInterval(LerpInterval):
|
|||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
LerpInterval.__init__(self, name, duration, functorFunc, blendType)
|
LerpInterval.__init__(self, name, duration, functorFunc, blendType)
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
print 'LerpPosHprInterval destructing'
|
||||||
|
|
||||||
class LerpPosHprScaleInterval(LerpInterval):
|
class LerpPosHprScaleInterval(LerpInterval):
|
||||||
# Interval counter
|
# Interval counter
|
||||||
lerpPosHprScaleNum = 1
|
lerpPosHprScaleNum = 1
|
||||||
@ -191,7 +201,7 @@ class LerpPosHprScaleInterval(LerpInterval):
|
|||||||
startPos, startHpr, startScale,
|
startPos, startHpr, startScale,
|
||||||
other, blendType, name)
|
other, blendType, name)
|
||||||
"""
|
"""
|
||||||
def functorFunc(self=self, node=node, pos=pos, hpr=hpr, scale=scale,
|
def functorFunc(node=node, pos=pos, hpr=hpr, scale=scale,
|
||||||
startPos=startPos, startHpr=startHpr,
|
startPos=startPos, startHpr=startHpr,
|
||||||
startScale=startScale, other=other):
|
startScale=startScale, other=other):
|
||||||
import PosHprScaleLerpFunctor
|
import PosHprScaleLerpFunctor
|
||||||
|
@ -20,6 +20,9 @@ class MultiTrack(Interval):
|
|||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
Interval.__init__(self, name, duration)
|
Interval.__init__(self, name, duration)
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
print 'MultiTrack destructing'
|
||||||
|
|
||||||
# Access track at given index
|
# Access track at given index
|
||||||
def __getitem__(self, item):
|
def __getitem__(self, item):
|
||||||
return self.tlist[item]
|
return self.tlist[item]
|
||||||
|
@ -32,6 +32,9 @@ class Track(Interval):
|
|||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
Interval.__init__(self, name, duration)
|
Interval.__init__(self, name, duration)
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
print 'Track destructing'
|
||||||
|
|
||||||
# Access interval at given index
|
# Access interval at given index
|
||||||
def __getitem__(self, item):
|
def __getitem__(self, item):
|
||||||
return self.ilist[item]
|
return self.ilist[item]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user