18 #include "pandabase.h"
20 #include "animChannelBase.h"
29 template<
class SwitchType>
37 INLINE AnimChannel(
AnimGroup *parent,
const AnimChannel ©);
39 typedef TYPENAME SwitchType::ValueType ValueType;
41 INLINE AnimChannel(
AnimGroup *parent,
const string &name);
42 INLINE ~AnimChannel();
45 virtual void get_value(
int frame, ValueType &value)=0;
62 return get_class_type();
64 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
68 static void init_type() {
69 AnimChannelBase::init_type();
70 register_type(_type_handle, SwitchType::get_channel_type_name(),
71 AnimChannelBase::get_class_type());
84 static const char *get_channel_type_name() {
return "AnimChannelMatrix"; }
85 static const char *get_fixed_channel_type_name() {
return "AnimChannelFixed<LMatrix4>"; }
86 static const char *get_part_type_name() {
return "MovingPart<LMatrix4>"; }
87 static void output_value(ostream &out,
const ValueType &value);
105 typedef PN_stdfloat ValueType;
106 static const char *get_channel_type_name() {
return "AnimChannelScalar"; }
107 static const char *get_fixed_channel_type_name() {
return "AnimChannelScalarFixed"; }
108 static const char *get_part_type_name() {
return "MovingPart<PN_stdfloat>"; }
109 static void output_value(ostream &out, ValueType value) {
112 static void write_datagram(
Datagram &dest, ValueType& me)
126 #include "animChannel.I"
This is the base class for all three-component vectors and points.
virtual void get_pos(int frame, LVecBase3 &pos)
Returns the x, y, and z translation components associated with the current frame. ...
virtual void get_quat(int frame, LQuaternion &quat)
Returns the rotation component associated with the current frame, expressed as a quaternion.
PN_stdfloat get_stdfloat()
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_doubl...
virtual void get_scale(int frame, LVecBase3 &scale)
Returns the x, y, and z scale components associated with the current frame.
virtual TypeHandle get_value_type() const
Returns the TypeHandle associated with the ValueType we return.
virtual void get_hpr(int frame, LVecBase3 &hpr)
Returns the h, p, and r components associated with the current frame.
This template class is the parent class for all kinds of AnimChannels that return different values...
void add_stdfloat(PN_stdfloat value)
Adds either a 32-bit or a 64-bit floating-point number, according to set_stdfloat_double().
Parent class for all animation channels.
void write_datagram(Datagram &destination) const
Writes the matrix to the Datagram using add_stdfloat().
This is the base class for AnimChannel and AnimBundle.
This is a 4-by-4 transform matrix.
virtual void get_value_no_scale_shear(int frame, ValueType &value)
Returns the value associated with the current frame, with no scale or share components.
void read_datagram(DatagramIterator &source)
Reads the matrix from the Datagram using get_stdfloat().
This is the base quaternion class.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual void get_shear(int frame, LVecBase3 &shear)
Returns the a, b, and c shear components associated with the current frame.