Go to the documentation of this file.
25 TypeHandle AnimChannelScalarDynamic::_type_handle;
30 AnimChannelScalarDynamic::
31 AnimChannelScalarDynamic() {
39 AnimChannelScalarDynamic::
42 _value_node(copy._value_node),
46 _float_value(copy._float_value)
53 AnimChannelScalarDynamic::
54 AnimChannelScalarDynamic(
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.
static TypedWritable * make_AnimChannelScalarDynamic(const FactoryParams ¶ms)
Factory method to generate a AnimChannelScalarDynamic object.
get_value
Gets the value of the channel at the indicated frame.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Function to write the important information in the particular object to a Datagram.
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...
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.
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...
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
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().
set_value_node
Specifies a node whose transform will be queried each frame to implicitly specify the transform of th...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
set_value
Explicitly sets the value.
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 ...
PN_stdfloat get_stdfloat()
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_doubl...
void add_stdfloat(PN_stdfloat value)
Adds either a 32-bit or a 64-bit floating-point number, according to set_stdfloat_double().
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Factory method to generate a AnimChannelScalarDynamic object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
bool read_pointer(DatagramIterator &scan)
The interface for reading a pointer to another object from a Bam file.
virtual void write_datagram(BamWriter *manager, Datagram &me)
Function to write the important information in the particular object to a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class is the parent class for all kinds of AnimChannels that return different values.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
An animation channel that accepts a scalar each frame from some dynamic input provided by code.
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...
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...