Panda3D
Loading...
Searching...
No Matches
LerpPosInterval Class Reference

It is legal to pass in a functor (a callable Python function that returns an appropriate value) for the any of the pos, hpr, scale, or shear parameters in the intervals below. More...

Inheritance diagram for LerpPosInterval:
LerpNodePathInterval

Public Member Functions

 __init__ (self, nodePath, duration, pos, startPos=None, other=None, blendType='noBlend', bakeInStart=1, fluid=0, name=None)
 
 privDoEvent (self, t, event)
 
- Public Member Functions inherited from LerpNodePathInterval
 __init__ (self, name, duration, blendType, bakeInStart, fluid, nodePath, other)
 
 anyCallable (self, *params)
 
 setupParam (self, func, param)
 

Public Attributes

 endPos = pos
 
int inPython = 1
 
 paramSetup = self.anyCallable(pos, startPos)
 
 setEndPos
 
 setStartPos
 
 startPos = startPos
 

Additional Inherited Members

- Static Public Attributes inherited from LerpNodePathInterval
int lerpNodePathNum = 1
 

Detailed Description

It is legal to pass in a functor (a callable Python function that returns an appropriate value) for the any of the pos, hpr, scale, or shear parameters in the intervals below.

These will be evaluated at the time the interval starts in order to determine the actual final (or initial) position. However, doing so forces the entire LerpInterval to be executed up in Python, instead of down in the low-level C++ code, at some performance cost.

If bakeInStart is true, the starting values (if unspecified) are computed at the time the interval runs for the first time, and then stored. If bakeInStart is false, the starting values are recomputed each frame based on the current value and the time delta since the last time the interval ran, which allows show code to manipulate the node even while it is being lerped.

If fluid is true for a LerpPos-style interval, then the pos is set via NodePath.setFluidPos() instead of NodePath.setPos(), causing the collision system to treat the motion as continuous and test for collisions against the entire motion path, instead of as discrete position updates. This has no meaning for Lerp intervals that do not adjust pos.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
nodePath,
duration,
pos,
startPos = None,
other = None,
blendType = 'noBlend',
bakeInStart = 1,
fluid = 0,
name = None )

Member Function Documentation

◆ privDoEvent()

privDoEvent ( self,
t,
event )

Member Data Documentation

◆ endPos

endPos = pos

◆ inPython

int inPython = 1

◆ paramSetup

paramSetup = self.anyCallable(pos, startPos)

◆ setEndPos

setEndPos

◆ setStartPos

setStartPos

◆ startPos

startPos = startPos