74 return (_state == S_initial || _state == S_final);
128 _auto_pause = auto_pause;
155 _auto_finish = auto_finish;
180 _wants_t_callback = wants_t_callback;
181 _last_t_callback = -1.0;
192 return _wants_t_callback;
234 _last_t_callback =
get_t();
245 INLINE
void CInterval::
258 INLINE
void CInterval::
259 check_stopped(
TypeHandle type,
const char *method_name)
const {
260 if (_state == S_started) {
261 interval_cat.warning()
262 << type.
get_name() <<
"::" << method_name <<
"() called for "
263 <<
get_name() <<
" in state " << _state <<
".\n";
264 nassertv(!verify_intervals);
274 INLINE
void CInterval::
275 check_started(
TypeHandle type,
const char *method_name)
const {
276 if (_state != S_started && _state != S_paused) {
277 interval_cat.warning()
278 << type.
get_name() <<
"::" << method_name <<
"() called for "
279 <<
get_name() <<
" in state " << _state <<
".\n";
280 nassertv(!verify_intervals);
285 operator << (ostream &out,
const CInterval &ival) {
void set_auto_pause(bool auto_pause)
Changes the state of the 'auto_pause' flag.
bool get_auto_finish() const
Returns the state of the 'auto_finish' flag.
bool is_stopped() const
Returns true if the interval is in either its initial or final states (but not in a running or paused...
string get_name(TypedObject *object=(TypedObject *) NULL) const
Returns the name of the type.
const string & get_name() const
Returns the interval's name.
The base class for timeline components.
State get_state() const
Indicates the state the interval believes it is in: whether it has been started, is currently in the ...
double get_duration() const
Returns the duration of the interval in seconds.
void set_manager(CIntervalManager *manager)
Indicates the CIntervalManager object which will be responsible for playing this interval.
bool get_auto_pause() const
Returns the state of the 'auto_pause' flag.
This object holds a number of currently-playing intervals and is responsible for advancing them each ...
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.
bool get_open_ended() const
Returns the state of the "open_ended" flag.
void set_done_event(const string &event)
Sets the event that is generated whenever the interval reaches its final state, whether it is explici...
void set_auto_finish(bool auto_finish)
Changes the state of the 'auto_finish' flag.
void set_wants_t_callback(bool wants_t_callback)
Changes the state of the 'wants_t_callback' flag.
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().
CIntervalManager * get_manager() const
Returns the CIntervalManager object which will be responsible for playing this interval.
TypeHandle is the identifier used to differentiate C++ class types.
bool check_t_callback()
Returns true if the wants_t_callback() flag is true and the interval's t value has changed since the ...
bool get_wants_t_callback() const
Returns the state of the 'wants_t_callback' flag.