29 for (bi = _bundles.begin(); bi != _bundles.end(); ++bi) {
30 (*bi)->get_bundle()->remove_node(
this);
46 if ((attrib_types & SceneGraphReducer::TT_transform) != 0) {
48 for (bi = _bundles.begin(); bi != _bundles.end(); ++bi) {
51 PT(
PartBundle) new_bundle = bundle->apply_transform(attribs._transform);
52 update_bundle(handle, new_bundle);
56 r_mark_geom_bounds_stale(Thread::get_current_thread());
69 if (mat.almost_equal(LMatrix4::ident_mat())) {
75 for (bi = _bundles.begin(); bi != _bundles.end(); ++bi) {
80 update_bundle(handle, new_bundle);
93 add_bundle_handle(handle);
101 Bundles::iterator bi = find(_bundles.begin(), _bundles.end(), handle);
102 if (bi != _bundles.end()) {
107 _bundles.push_back(handle);
114 void PartBundleNode::
120 Bundles::iterator bi;
121 for (bi = other->_bundles.begin(); bi != other->_bundles.end(); ++bi) {
124 add_bundle_handle(handle);
126 other->_bundles.clear();
133 void PartBundleNode::
136 old_bundle->remove_node(
this);
138 new_bundle->add_node(
this);
150 Bundles::iterator bi;
151 for (bi = _bundles.begin(); bi != _bundles.end(); ++bi) {
164 Bundles::iterator bi;
165 for (bi = _bundles.begin(); bi != _bundles.end(); ++bi) {
167 bundle->add_node(
this);
178 void PartBundleNode::
180 PandaNode::fillin(scan, manager);
187 nassertv(num_bundles >= 1);
193 for (
int i = 1; i < num_bundles; ++i) {
195 _bundles.push_back(
nullptr);
set_bundle
Changes the actual PartBundle embedded within the handle.
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 fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Base class for objects that can be written to and read from Bam files.
get_num_nodes
Returns the number of PartBundleNodes that contain a pointer to this PartBundle.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void xform(const LMatrix4 &mat)
Applies the indicated transform to the root of the animated hierarchy.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is a trivial class returned by PartBundleNode::get_bundle().
int get_file_minor_ver() const
Returns the minor version number of the Bam file currently being read.
get_bundle
Returns the actual PartBundle embedded within the handle.
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have ...
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is a node that contains a pointer to an PartBundle.
virtual void apply_attribs_to_vertices(const AccumulatedAttribs &attribs, int attrib_types, GeomTransformer &transformer)
Applies whatever attributes are specified in the AccumulatedAttribs object (and by the attrib_types b...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
virtual void write_datagram(BamWriter *manager, Datagram &me)
Writes the contents of this object to the datagram for shipping out to a Bam file.
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
This is the root of a MovingPart hierarchy.
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.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
PartGroup * copy_subgraph() const
Allocates and returns a new copy of this node and of all of its children.
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 ...
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.