Go to the documentation of this file.
17 TypeHandle AnimChannelMatrixFixed::_type_handle;
24 AnimChannelMatrixFixed::
36 AnimChannelMatrixFixed::
37 AnimChannelMatrixFixed(
const std::string &name,
const LVecBase3 &pos,
const LVecBase3 &hpr,
const LVecBase3 &scale) :
39 _pos(pos), _hpr(hpr), _scale(scale)
55 void AnimChannelMatrixFixed::
56 get_value(
int, LMatrix4 &value) {
57 compose_matrix(value, _scale, LVecBase3::zero(), _hpr, _pos);
66 compose_matrix(mat, LVecBase3(1.0f, 1.0f, 1.0f), LVecBase3::zero(),
112 shear = LVecBase3::zero();
119 output(std::ostream &out)
const {
121 out <<
": pos " << _pos <<
" hpr " << _hpr <<
" scale " << _scale;
140 _pos.write_datagram(dg);
141 _hpr.write_datagram(dg);
142 _scale.write_datagram(dg);
158 chan->fillin(scan, manager);
167 void AnimChannelMatrixFixed::
171 _pos.read_datagram(scan);
172 _hpr.read_datagram(scan);
173 _scale.read_datagram(scan);
static void register_with_read_factory()
Tells the BamReader how to create objects of type AnimChannelMatrixFixed.
virtual void get_value_no_scale_shear(int frame, LMatrix4 &value)
Gets the value of the channel at the indicated frame, without any scale or shear information.
A specialization on AnimChannel to add all the special matrix component operations.
virtual void get_hpr(int frame, LVecBase3 &hpr)
Returns the h, p, and r components associated with the current frame.
A class to retrieve the individual data elements previously stored in a Datagram.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
virtual void get_quat(int frame, LQuaternion &quat)
Returns the rotation component associated with the current frame, expressed as a quaternion.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
Base class for objects that can be written to and read from Bam files.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is the base class for AnimChannel and AnimBundle.
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
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().
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
virtual void write_datagram(BamWriter *manager, Datagram &me)
Function to write the important information in the particular object to a Datagram.
virtual void get_scale(int frame, LVecBase3 &scale)
Gets the scale value at the indicated frame.
virtual void get_shear(int frame, LVecBase3 &shear)
Returns the a, b, and c shear components associated with the current frame.
This template class is the parent class for all kinds of AnimChannels that return different values.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
virtual void get_pos(int frame, LVecBase3 &pos)
Returns the x, y, and z translation components associated with the current frame.