Panda3D
Public Member Functions | Static Public Member Functions | List of all members
WaitInterval Class Reference

This interval does absolutely nothing, and is mainly useful for marking time between other intervals within a sequence. More...

#include "waitInterval.h"

Inheritance diagram for WaitInterval:
CInterval TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

Public Member Functions

 WaitInterval (double duration)
 All Wait intervals have the same name. More...
 
virtual TypeHandle force_init_type ()
 
virtual TypeHandle get_type () const
 
virtual void priv_step (double t)
 Advances the time on the interval. More...
 
- Public Member Functions inherited from CInterval
 CInterval (const string &name, double duration, bool open_ended)
 
bool check_t_callback ()
 Returns true if the wants_t_callback() flag is true and the interval's t value has changed since the last call to check_t_callback(), false otherwise. More...
 
void clear_to_initial ()
 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. More...
 
void finish ()
 Stops the interval from playing and sets it to its final state. More...
 
bool get_auto_finish () const
 Returns the state of the 'auto_finish' flag. More...
 
bool get_auto_pause () const
 Returns the state of the 'auto_pause' flag. More...
 
const string & get_done_event () const
 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. More...
 
double get_duration () const
 Returns the duration of the interval in seconds. More...
 
CIntervalManagerget_manager () const
 Returns the CIntervalManager object which will be responsible for playing this interval. More...
 
const string & get_name () const
 Returns the interval's name. More...
 
bool get_open_ended () const
 Returns the state of the "open_ended" flag. More...
 
double get_play_rate () const
 Returns the play rate as set by the last call to start(), loop(), or set_play_rate(). More...
 
State get_state () const
 Indicates the state the interval believes it is in: whether it has been started, is currently in the middle, or has been finalized. More...
 
double get_t () const
 Returns the current time of the interval: the last value of t passed to priv_initialize(), priv_step(), or priv_finalize(). More...
 
bool get_wants_t_callback () const
 Returns the state of the 'wants_t_callback' flag. More...
 
bool is_playing () const
 Returns true if the interval is currently playing, false otherwise. More...
 
bool is_stopped () const
 Returns true if the interval is in either its initial or final states (but not in a running or paused state). More...
 
void loop (double start_t=0.0, double end_t=-1.0, double play_rate=1.0)
 Starts the interval playing by registering it with the current CIntervalManager. More...
 
void mark_dirty ()
 Called by a derived class to indicate the interval has been changed internally and must be recomputed before its duration may be returned. More...
 
virtual void output (ostream &out) const
 
double pause ()
 Stops the interval from playing but leaves it in its current state. More...
 
void priv_do_event (double t, EventType event)
 Calls the appropriate event function indicated by the EventType. More...
 
virtual void priv_finalize ()
 This is called to stop an interval, forcing it to whatever state it would be after it played all the way through. More...
 
virtual void priv_initialize (double t)
 This replaces the first call to priv_step(), and indicates that the interval has just begun. More...
 
virtual void priv_instant ()
 This is called in lieu of priv_initialize() . More...
 
virtual void priv_interrupt ()
 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. More...
 
virtual void priv_reverse_finalize ()
 Called generally following a priv_reverse_initialize(), this indicates the interval should set itself to the initial state. More...
 
virtual void priv_reverse_initialize (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. More...
 
virtual void priv_reverse_instant ()
 This is called in lieu of priv_reverse_initialize() More...
 
void resume ()
 Restarts the interval from its current point after a previous call to pause(). More...
 
void resume (double start_t)
 Restarts the interval from the indicated point after a previous call to pause(). More...
 
void resume_until (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. More...
 
void set_auto_finish (bool auto_finish)
 Changes the state of the 'auto_finish' flag. More...
 
void set_auto_pause (bool auto_pause)
 Changes the state of the 'auto_pause' flag. More...
 
void set_done_event (const string &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. More...
 
void set_manager (CIntervalManager *manager)
 Indicates the CIntervalManager object which will be responsible for playing this interval. More...
 
void set_play_rate (double play_rate)
 Changes the play rate of the interval. More...
 
void set_t (double t)
 Explicitly sets the time within the interval. More...
 
void set_wants_t_callback (bool wants_t_callback)
 Changes the state of the 'wants_t_callback' flag. More...
 
void setup_play (double start_time, double end_time, double play_rate, bool do_loop)
 Called to prepare the interval for automatic timed playback, e.g. More...
 
void setup_resume ()
 Called to prepare the interval for restarting at the current point within the interval after an interruption. More...
 
void setup_resume_until (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. More...
 
void start (double start_t=0.0, double end_t=-1.0, double play_rate=1.0)
 Starts the interval playing by registering it with the current CIntervalManager. More...
 
bool step_play ()
 Should be called once per frame to execute the automatic timed playback begun with setup_play(). More...
 
virtual void write (ostream &out, int indent_level) const
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
void operator= (const TypedObject &copy)
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 Returns the current reference count. More...
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
void weak_ref (WeakPointerToVoid *ptv)
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref (WeakPointerToVoid *ptv)
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from CInterval
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Additional Inherited Members

- Public Types inherited from CInterval
enum  EventType {
  ET_initialize, ET_instant, ET_step, ET_finalize,
  ET_reverse_initialize, ET_reverse_instant, ET_reverse_finalize, ET_interrupt
}
 
enum  State { S_initial, S_started, S_paused, S_final }
 

Detailed Description

This interval does absolutely nothing, and is mainly useful for marking time between other intervals within a sequence.

Definition at line 27 of file waitInterval.h.

Constructor & Destructor Documentation

◆ WaitInterval()

WaitInterval::WaitInterval ( double  duration)
inline

All Wait intervals have the same name.

No one really cares if their names are unique, after all.

Definition at line 23 of file waitInterval.I.

Member Function Documentation

◆ priv_step()

void WaitInterval::priv_step ( double  t)
virtual

Advances the time on the interval.

The time may either increase (the normal case) or decrease (e.g. if the interval is being played by a slider).

Reimplemented from CInterval.

Definition at line 28 of file waitInterval.cxx.


The documentation for this class was generated from the following files: