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);
65 xform(
const LMatrix4 &mat) {
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);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have ...
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.
int get_file_minor_ver() const
Returns the minor version number of the Bam file currently being read.
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.
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
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 a trivial class returned by PartBundleNode::get_bundle().
set_bundle
Changes the actual PartBundle embedded within the handle.
get_bundle
Returns the actual PartBundle embedded within the handle.
This is a node that contains a pointer to an PartBundle.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
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().
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...
virtual void write_datagram(BamWriter *manager, Datagram &me)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is the root of a MovingPart hierarchy.
void xform(const LMatrix4 &mat)
Applies the indicated transform to the root of the animated hierarchy.
get_num_nodes
Returns the number of PartBundleNodes that contain a pointer to this PartBundle.
PartGroup * copy_subgraph() const
Allocates and returns a new copy of this node and of all of its children.
get_current_thread
Returns a pointer to the currently-executing Thread object.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
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().
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.