14#ifndef ANIMCHANNELFIXED_H
15#define ANIMCHANNELFIXED_H
28template<
class SwitchType>
29class AnimChannelFixed :
public AnimChannel<SwitchType> {
31 typedef typename AnimChannel<SwitchType>::ValueType ValueType;
34 INLINE AnimChannelFixed(AnimGroup *parent,
const AnimChannelFixed<SwitchType> ©);
37 INLINE AnimChannelFixed(
const std::string &name,
const ValueType &value);
39 virtual bool has_changed(
int last_frame,
double last_frac,
40 int this_frame,
double this_frac);
41 virtual void get_value(
int frame, ValueType &value);
43 virtual void output(std::ostream &out)
const;
49 return get_class_type();
51 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
55 static void init_type() {
56 AnimChannel<SwitchType>::init_type();
57 register_type(_type_handle, SwitchType::get_fixed_channel_type_name(),
58 AnimChannel<SwitchType>::get_class_type());
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class is a special kind of AnimChannel that always returns just one fixed value.
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac)
Returns true if the value has changed since the last call to has_changed().
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...