25TypeHandle AnimChannelScalarDynamic::_type_handle;
30AnimChannelScalarDynamic::
31AnimChannelScalarDynamic() {
39AnimChannelScalarDynamic::
42 _value_node(copy._value_node),
46 _float_value(copy._float_value)
53AnimChannelScalarDynamic::
54AnimChannelScalarDynamic(
const std::string &name)
57 _last_value = _value = TransformState::make_identity();
58 _value_changed =
true;
69 if (_value_node !=
nullptr) {
70 _value = _value_node->get_transform();
77 _value_changed =
false;
98 _value_changed =
true;
108 if (_value_node ==
nullptr) {
109 _last_value = TransformState::make_pos(LVecBase3(_float_value, 0.0f, 0.0f));
112 _value_node = value_node;
114 if (_value_node !=
nullptr) {
115 _value = _value_node->get_transform();
151 _value_node = DCAST(
PandaNode, p_list[pi++]);
164 AnimChannelScalar::fillin(scan, manager);
183 me->
fillin(scan, manager);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
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.
An animation channel that accepts a scalar each frame from some dynamic input provided by code.
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...
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
static void register_with_read_factory()
Factory method to generate a AnimChannelScalarDynamic object.
static TypedWritable * make_AnimChannelScalarDynamic(const FactoryParams ¶ms)
Factory method to generate a AnimChannelScalarDynamic object.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Function to write the important information in the particular object to a Datagram.
set_value
Explicitly sets the value.
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().
get_value
Gets the value of the channel at the indicated frame.
set_value_node
Specifies a node whose transform will be queried each frame to implicitly specify the transform of th...
This template class is the parent class for all kinds of AnimChannels that return different values.
This is the base class for AnimChannel and AnimBundle.
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...
bool read_pointer(DatagramIterator &scan)
The interface for reading a pointer to another object from a Bam file.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
void write_pointer(Datagram &packet, const TypedWritable *dest)
The interface for writing a pointer to another object to a Bam file.
A class to retrieve the individual data elements previously stored in a Datagram.
PN_stdfloat get_stdfloat()
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_doubl...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_stdfloat(PN_stdfloat value)
Adds either a 32-bit or a 64-bit floating-point number, according to set_stdfloat_double().
An instance of this class is passed to the Factory when requesting it to do its business and construc...
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
A basic node of the scene graph or data graph.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.