Panda3D
|
The base class for a family of intervals that linearly interpolate one or more numeric values over time. More...
#include <pandadoc.hpp>
Public Types | |
enum | BlendType { BT_no_blend = 0 , BT_ease_in = 1 , BT_ease_out = 2 , BT_ease_in_out = 3 , BT_invalid = 4 } |
![]() | |
enum | EventType { ET_initialize = 0 , ET_instant = 1 , ET_step = 2 , ET_finalize = 3 , ET_reverse_initialize = 4 , ET_reverse_instant = 5 , ET_reverse_finalize = 6 , ET_interrupt = 7 } |
enum | State { S_initial = 0 , S_started = 1 , S_paused = 2 , S_final = 3 } |
Public Member Functions | |
__init__ (const CLerpInterval) | |
CLerpInterval::BlendType | getBlendType () |
Returns the blend type specified for the interval. | |
![]() | |
object | __await__ () |
__init__ (const CInterval) | |
clearToInitial () | |
Pauses the interval, if it is playing, and resets its state to its initial state, abandoning any state changes already in progress in the middle of the interval. | |
finish () | |
Stops the interval from playing and sets it to its final state. | |
bool | getAutoFinish () |
Returns the state of the 'auto_finish' flag. | |
bool | getAutoPause () |
Returns the state of the 'auto_pause' flag. | |
str | getDoneEvent () |
Returns the event that is generated whenever the interval reaches its final state, whether it is explicitly finished or whether it gets there on its own. | |
double | getDuration () |
Returns the duration of the interval in seconds. | |
CIntervalManager | getManager () |
Returns the CIntervalManager object which will be responsible for playing this interval. | |
str | getName () |
Returns the interval's name. | |
bool | getOpenEnded () |
Returns the state of the "open_ended" flag. | |
double | getPlayRate () |
Returns the play rate as set by the last call to start(), loop(), or set_play_rate(). | |
CInterval::State | getState () |
Indicates the state the interval believes it is in: whether it has been started, is currently in the middle, or has been finalized. | |
double | getT () |
Returns the current time of the interval: the last value of t passed to priv_initialize(), priv_step(), or priv_finalize(). | |
bool | getWantsTCallback () |
Returns the state of the 'wants_t_callback' flag. | |
bool | isPlaying () |
Returns true if the interval is currently playing, false otherwise. | |
bool | isStopped () |
Returns true if the interval is in either its initial or final states (but not in a running or paused state). | |
loop (double start_t, double end_t, double play_rate) | |
Starts the interval playing by registering it with the current CIntervalManager. | |
output (Ostream out) | |
double | pause () |
Stops the interval from playing but leaves it in its current state. | |
privDoEvent (double t, CInterval::EventType event) | |
privFinalize () | |
This is called to stop an interval, forcing it to whatever state it would be after it played all the way through. | |
privInitialize (double t) | |
This replaces the first call to priv_step(), and indicates that the interval has just begun. | |
privInstant () | |
This is called in lieu of priv_initialize() . | |
privInterrupt () | |
This is called while the interval is playing to indicate that it is about to be interrupted; that is, priv_step() will not be called for a length of time. | |
privReverseFinalize () | |
Called generally following a priv_reverse_initialize(), this indicates the interval should set itself to the initial state. | |
privReverseInitialize (double t) | |
Similar to priv_initialize(), but this is called when the interval is being played backwards; it indicates that the interval should start at the finishing state and undo any intervening intervals. | |
privReverseInstant () | |
This is called in lieu of priv_reverse_initialize() . | |
privStep (double t) | |
Advances the time on the interval. | |
resume () | |
Restarts the interval from its current point after a previous call to pause(). | |
resume (double start_t) | |
Restarts the interval from the indicated point after a previous call to pause(). | |
resumeUntil (double end_t) | |
Restarts the interval from the current point after a previous call to pause() (or a previous play-to-point-and-stop), to play until the indicated point and then stop. | |
setAutoFinish (bool auto_finish) | |
Changes the state of the 'auto_finish' flag. | |
setAutoPause (bool auto_pause) | |
Changes the state of the 'auto_pause' flag. | |
setDoneEvent (str event) | |
Sets the event that is generated whenever the interval reaches its final state, whether it is explicitly finished or whether it gets there on its own. | |
setManager (CIntervalManager manager) | |
Indicates the CIntervalManager object which will be responsible for playing this interval. | |
setPlayRate (double play_rate) | |
Changes the play rate of the interval. | |
setT (double t) | |
Explicitly sets the time within the interval. | |
setupPlay (double start_time, double end_time, double play_rate, bool do_loop) | |
Called to prepare the interval for automatic timed playback, e.g. | |
setupResume () | |
Called to prepare the interval for restarting at the current point within the interval after an interruption. | |
setupResumeUntil (double end_t) | |
Called to prepare the interval for restarting from the current point after a previous call to pause() (or a previous play-to-point-and-stop), to play until the indicated point and then stop. | |
setWantsTCallback (bool wants_t_callback) | |
Changes the state of the 'wants_t_callback' flag. | |
start (double start_t, double end_t, double play_rate) | |
Starts the interval playing by registering it with the current CIntervalManager. | |
bool | stepPlay () |
Should be called once per frame to execute the automatic timed playback begun with setup_play(). | |
write (Ostream out, int indent_level) | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. | |
![]() | |
int | getRefCount () |
Returns the current reference count. | |
ref () | |
Explicitly increments the reference count. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
static CLerpInterval::BlendType | stringBlendType (str blend_type) |
Returns the BlendType enumerated value corresponding to the indicated string, or BT_invalid if the string doesn't match anything. | |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
Additional Inherited Members | |
![]() | |
bool | auto_finish |
Returns the state of the 'auto_finish' flag. | |
bool | auto_pause |
Returns the state of the 'auto_pause' flag. | |
const String | done_event |
Returns the event that is generated whenever the interval reaches its final state, whether it is explicitly finished or whether it gets there on its own. | |
double | duration |
Returns the duration of the interval in seconds. | |
CIntervalManager | manager |
Returns the CIntervalManager object which will be responsible for playing this interval. | |
const String | name |
Returns the interval's name. | |
bool | open_ended |
Returns the state of the "open_ended" flag. | |
double | play_rate |
Returns the play rate as set by the last call to start(), loop(), or set_play_rate(). | |
bool | playing |
Returns true if the interval is currently playing, false otherwise. | |
CInterval::State | state |
Indicates the state the interval believes it is in: whether it has been started, is currently in the middle, or has been finalized. | |
bool | stopped |
Returns true if the interval is in either its initial or final states (but not in a running or paused state). | |
double | t |
Returns the current time of the interval: the last value of t passed to priv_initialize(), priv_step(), or priv_finalize(). | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. | |
![]() | |
int | ref_count |
The current reference count. | |
The base class for a family of intervals that linearly interpolate one or more numeric values over time.
enum BlendType |
__init__ | ( | const CLerpInterval | ) |
CLerpInterval::BlendType getBlendType | ( | ) |
Returns the blend type specified for the interval.
This controls how the linear interpolation behaves near the beginning and end of the lerp period.
|
static |
|
static |
Returns the BlendType enumerated value corresponding to the indicated string, or BT_invalid if the string doesn't match anything.