CLerpNodePathInterval
from panda3d.direct import CLerpNodePathInterval
- class CLerpNodePathInterval
Bases:
Bases:
CLerpInterval
An interval that lerps one or more properties (like pos, hpr, etc.) on a
NodePath
over time.Inheritance diagram
- __init__(param0: CLerpNodePathInterval)
- __init__(name: str, duration: float, blend_type: BlendType, bake_in_start: bool, fluid: bool, node: panda3d.core.NodePath, other: panda3d.core.NodePath)
Constructs a lerp interval that will lerp some properties on the indicated node, possibly relative to the indicated other node (if other is nonempty).
You must call
setEndPos()
, etc. for the various properties you wish to lerp before the first call toprivInitialize()
. If you want to set a starting value for any of the properties, you may callsetStartPos()
, etc.; otherwise, the starting value is taken from the actual node’s value at the time the lerp is performed.The starting values may be explicitly specified or omitted. The value of bake_in_start determines the behavior if the starting values are omitted. If bake_in_start is true, the values are obtained the first time the lerp runs, and thenceforth are stored within the interval. If bake_in_start is false, the starting value is computed each frame, based on assuming the current value represents the value set from the last time the interval was run. This “smart” behavior allows code to manipulate the object event while it is being lerped, and the lerp continues to apply in a sensible way.
If fluid is true, the prev_transform is not adjusted by the lerp; otherwise, it is reset.
- static getClassType() panda3d.core.TypeHandle
- getNode() panda3d.core.NodePath
Returns the node being lerped.
- getOther() panda3d.core.NodePath
Returns the “other” node, which the lerped node is being moved relative to. If this is an empty node path, the lerped node is being moved in its own coordinate system.
- getOverride() int
Returns the override value that will be associated with any state changes applied by the lerp. See
setOverride()
.
- setEndColor(color: panda3d.core.LVecBase4)
Indicates that the color of the node should be lerped, and specifies the final color of the node. This should be called before
privInitialize()
. If this is not called, the node’s color will not be affected by the lerp.
- setEndColorScale(color_scale: panda3d.core.LVecBase4)
Indicates that the color scale of the node should be lerped, and specifies the final color scale of the node. This should be called before
privInitialize()
. If this is not called, the node’s color scale will not be affected by the lerp.
- setEndHpr(quat: panda3d.core.LQuaternion)
Indicates that the rotation of the node should be lerped, and specifies the final rotation of the node. This should be called before
privInitialize()
.This special function is overloaded to accept a quaternion, even though the function name is
setEndHpr()
. The quaternion will be implicitly converted to a HPR trio, and the lerp will be performed in HPR space, componentwise.
- setEndHpr(hpr: panda3d.core.LVecBase3)
Indicates that the rotation of the node should be lerped, and specifies the final rotation of the node. This should be called before
privInitialize()
.This replaces a previous call to
setEndQuat()
. If neithersetEndHpr()
norsetEndQuat()
is called, the node’s rotation will not be affected by the lerp.
- setEndPos(pos: panda3d.core.LVecBase3)
Indicates that the position of the node should be lerped, and specifies the final position of the node. This should be called before
privInitialize()
. If this is not called, the node’s position will not be affected by the lerp.
- setEndQuat(quat: panda3d.core.LQuaternion)
Indicates that the rotation of the node should be lerped, and specifies the final rotation of the node. This should be called before
privInitialize()
.This replaces a previous call to
setEndHpr()
. If neithersetEndQuat()
norsetEndHpr()
is called, the node’s rotation will not be affected by the lerp.The given quaternion needs to be normalized.
- setEndQuat(hpr: panda3d.core.LVecBase3)
Indicates that the rotation of the node should be lerped, and specifies the final rotation of the node. This should be called before
privInitialize()
.This replaces a previous call to
setEndHpr()
. If neithersetEndQuat()
norsetEndHpr()
is called, the node’s rotation will not be affected by the lerp.This special function is overloaded to accept a HPR trio, even though the function name is
setEndQuat()
. The HPR will be implicitly converted to a quaternion, and the lerp will be performed in quaternion space, as a spherical lerp.
- setEndScale(scale: panda3d.core.LVecBase3)
Indicates that the scale of the node should be lerped, and specifies the final scale of the node. This should be called before
privInitialize()
. If this is not called, the node’s scale will not be affected by the lerp.
- setEndScale(scale: float)
Indicates that the scale of the node should be lerped, and specifies the final scale of the node. This should be called before
privInitialize()
. If this is not called, the node’s scale will not be affected by the lerp.
- setEndShear(shear: panda3d.core.LVecBase3)
Indicates that the shear of the node should be lerped, and specifies the final shear of the node. This should be called before
privInitialize()
. If this is not called, the node’s shear will not be affected by the lerp.
- setEndTexOffset(tex_offset: panda3d.core.LVecBase2)
Indicates that the UV offset of the node should be lerped, and specifies the final UV offset of the node. This should be called before
privInitialize()
. If this is not called, the node’s UV offset will not be affected by the lerp.
- setEndTexRotate(tex_rotate: float)
Indicates that the UV rotate of the node should be lerped, and specifies the final UV rotate of the node. This should be called before
privInitialize()
. If this is not called, the node’s UV rotate will not be affected by the lerp.
- setEndTexScale(tex_scale: panda3d.core.LVecBase2)
Indicates that the UV scale of the node should be lerped, and specifies the final UV scale of the node. This should be called before
privInitialize()
. If this is not called, the node’s UV scale will not be affected by the lerp.
- setOverride(override: int)
Changes the override value that will be associated with any state changes applied by the lerp. If this lerp is changing state (for instance, a color lerp or a tex matrix lerp), then the new attributes created by this lerp will be assigned the indicated override value when they are applied to the node.
- setStartColor(color: panda3d.core.LVecBase4)
Indicates the initial color of the lerped node. This is meaningful only if
setEndColor()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual color at the time the lerp is performed.
- setStartColorScale(color_scale: panda3d.core.LVecBase4)
Indicates the initial color scale of the lerped node. This is meaningful only if
setEndColorScale()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual color scale at the time the lerp is performed.
- setStartHpr(hpr: panda3d.core.LVecBase3)
Indicates the initial rotation of the lerped node. This is meaningful only if either
setEndHpr()
orsetEndQuat()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual rotation at the time the lerp is performed.
- setStartPos(pos: panda3d.core.LVecBase3)
Indicates the initial position of the lerped node. This is meaningful only if
setEndPos()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual position at the time the lerp is performed.
- setStartQuat(quat: panda3d.core.LQuaternion)
Indicates the initial rotation of the lerped node. This is meaningful only if either
setEndQuat()
orsetEndHpr()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual rotation at the time the lerp is performed.The given quaternion needs to be normalized.
- setStartScale(scale: panda3d.core.LVecBase3)
Indicates the initial scale of the lerped node. This is meaningful only if
setEndScale()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual scale at the time the lerp is performed.
- setStartScale(scale: float)
Indicates the initial scale of the lerped node. This is meaningful only if
setEndScale()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual scale at the time the lerp is performed.
- setStartShear(shear: panda3d.core.LVecBase3)
Indicates the initial shear of the lerped node. This is meaningful only if
setEndShear()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual shear at the time the lerp is performed.
- setStartTexOffset(tex_offset: panda3d.core.LVecBase2)
Indicates the initial UV offset of the lerped node. This is meaningful only if
setEndTexOffset()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual UV offset at the time the lerp is performed.
- setStartTexRotate(tex_rotate: float)
Indicates the initial UV rotate of the lerped node. This is meaningful only if
setEndTexRotate()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual UV rotate at the time the lerp is performed.
- setStartTexScale(tex_scale: panda3d.core.LVecBase2)
Indicates the initial UV scale of the lerped node. This is meaningful only if
setEndTexScale()
is also called. This parameter is optional; if unspecified, the value will be taken from the node’s actual UV scale at the time the lerp is performed.
- setTextureStage(stage: panda3d.core.TextureStage)
Indicates the texture stage that is adjusted by tex_offset, tex_rotate, and/or tex_scale. If this is not set, the default is the default texture stage.