38 CInterval(
const std::string &name,
double duration,
bool open_ended);
42 INLINE
const std::string &get_name()
const;
43 INLINE
double get_duration()
const;
44 INLINE
bool get_open_ended()
const;
51 ET_reverse_initialize,
64 INLINE State get_state()
const;
65 INLINE
bool is_stopped()
const;
67 INLINE
void set_done_event(
const std::string &event);
68 INLINE
const std::string &get_done_event()
const;
71 INLINE
double get_t()
const;
73 INLINE
void set_auto_pause(
bool auto_pause);
74 INLINE
bool get_auto_pause()
const;
75 INLINE
void set_auto_finish(
bool auto_finish);
76 INLINE
bool get_auto_finish()
const;
78 INLINE
void set_wants_t_callback(
bool wants_t_callback);
79 INLINE
bool get_wants_t_callback()
const;
84 void start(
double start_t = 0.0,
double end_t = -1.0,
double play_rate = 1.0);
85 void loop(
double start_t = 0.0,
double end_t = -1.0,
double play_rate = 1.0);
88 void resume(
double start_t);
89 void resume_until(
double end_t);
91 void clear_to_initial();
92 bool is_playing()
const;
94 double get_play_rate()
const;
95 void set_play_rate(
double play_rate);
104 void priv_do_event(
double t, EventType event);
105 virtual void priv_initialize(
double t);
106 virtual void priv_instant();
107 virtual void priv_step(
double t);
108 virtual void priv_finalize();
109 virtual void priv_reverse_initialize(
double t);
110 virtual void priv_reverse_instant();
111 virtual void priv_reverse_finalize();
112 virtual void priv_interrupt();
114 virtual void output(std::ostream &out)
const;
115 virtual void write(std::ostream &out,
int indent_level)
const;
117 void setup_play(
double start_time,
double end_time,
double play_rate,
120 void setup_resume_until(
double end_t);
124 EXTENSION(PyObject *__await__(PyObject *self));
126 MAKE_PROPERTY(name, get_name);
127 MAKE_PROPERTY(duration, get_duration);
128 MAKE_PROPERTY(open_ended, get_open_ended);
129 MAKE_PROPERTY(state, get_state);
130 MAKE_PROPERTY(stopped, is_stopped);
131 MAKE_PROPERTY(done_event, get_done_event, set_done_event);
132 MAKE_PROPERTY(t, get_t, set_t);
133 MAKE_PROPERTY(auto_pause, get_auto_pause, set_auto_pause);
134 MAKE_PROPERTY(auto_finish, get_auto_finish, set_auto_finish);
135 MAKE_PROPERTY(manager, get_manager, set_manager);
136 MAKE_PROPERTY(play_rate, get_play_rate, set_play_rate);
137 MAKE_PROPERTY(playing, is_playing);
141 INLINE
bool check_t_callback();
144 void interval_done();
146 INLINE
void recompute()
const;
147 virtual void do_recompute();
148 INLINE
void check_stopped(
TypeHandle type,
const char *method_name)
const;
149 INLINE
void check_started(
TypeHandle type,
const char *method_name)
const;
155 std::string _done_event;
160 bool _wants_t_callback;
161 double _last_t_callback;
169 bool _start_t_at_start;
191 static void init_type() {
192 TypedReferenceCount::init_type();
194 TypedReferenceCount::get_class_type());
197 return get_class_type();
199 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...