25 TypeHandle AnimChannelMatrixDynamic::_type_handle;
30 AnimChannelMatrixDynamic::
31 AnimChannelMatrixDynamic() {
39 AnimChannelMatrixDynamic::
42 _value_node(copy._value_node),
51 AnimChannelMatrixDynamic::
52 AnimChannelMatrixDynamic(
const std::string &name)
55 _value = TransformState::make_identity();
56 _last_value =
nullptr;
67 if (_value_node !=
nullptr) {
68 _value = _value_node->get_transform();
80 if (_value_node !=
nullptr) {
81 _value = _value_node->get_transform();
83 mat = _value->get_mat();
92 if (_value_node !=
nullptr) {
93 _value = _value_node->get_transform();
95 if (_value->has_scale() || _value->has_shear()) {
96 compose_matrix(mat, LVecBase3(1.0f, 1.0f, 1.0f),
97 _value->get_hpr(), _value->get_pos());
99 mat = _value->get_mat();
108 if (_value_node !=
nullptr) {
109 _value = _value_node->get_transform();
111 scale = _value->get_scale();
120 if (_value_node !=
nullptr) {
121 _value = _value_node->get_transform();
123 hpr = _value->get_hpr();
133 if (_value_node !=
nullptr) {
134 _value = _value_node->get_transform();
136 quat = _value->get_quat();
145 if (_value_node !=
nullptr) {
146 _value = _value_node->get_transform();
148 pos = _value->get_pos();
157 if (_value_node !=
nullptr) {
158 _value = _value_node->get_transform();
160 shear = _value->get_shear();
168 _value = TransformState::make_mat(value);
188 _value_node = value_node;
189 if (_value_node !=
nullptr) {
190 _value = _value_node->get_transform();
225 _value_node = DCAST(
PandaNode, p_list[pi++]);
238 AnimChannelMatrix::fillin(scan, manager);
255 me->
fillin(scan, manager);
set_value_node
Specifies a node whose transform will be queried each frame to implicitly specify the transform of th...
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Factory method to generate an AnimChannelMatrixDynamic object.
virtual void get_scale(int frame, LVecBase3 &scale)
Gets the scale value at the indicated frame.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Takes in a vector of pointes to TypedWritable objects that correspond to all the requests for pointer...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Base class for objects that can be written to and read from Bam files.
virtual void get_value(int frame, LMatrix4 &mat)
Gets the value of the channel at the indicated frame.
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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().
An animation channel that accepts a matrix each frame from some dynamic input provided by code.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
This is the base class for AnimChannel and AnimBundle.
virtual void get_shear(int frame, LVecBase3 &shear)
Returns the a, b, and c shear 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.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write_datagram(BamWriter *manager, Datagram &me)
Function to write the important information in the particular object to a Datagram.
static TypedWritable * make_AnimChannelMatrixDynamic(const FactoryParams ¶ms)
Factory method to generate an AnimChannelMatrixDynamic object.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
virtual void get_hpr(int frame, LVecBase3 &hpr)
Returns the h, p, and r components associated with the current frame.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool read_pointer(DatagramIterator &scan)
The interface for reading a pointer to another object from a Bam file.
A class to retrieve the individual data elements previously stored in a Datagram.
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
void fillin(DatagramIterator &scan, BamReader *manager)
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to r...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Function to write the important information in the particular object to a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void get_pos(int frame, LVecBase3 &pos)
Returns the x, y, and z translation components associated with the current frame.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void write_pointer(Datagram &packet, const TypedWritable *dest)
The interface for writing a pointer to another object to a Bam file.
void set_value(const LMatrix4 &value)
Explicitly sets the matrix value.
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.