34 PandaNode(copy), _physicals(copy._physicals) {
42 PhysicalsVector::iterator it;
43 for (it = _physicals.begin(); it != _physicals.end(); ++it) {
45 nassertd(physical->_physical_node ==
this)
continue;
46 physical->_physical_node =
nullptr;
47 if (physical->_physics_manager !=
nullptr) {
68 _physicals.insert(_physicals.end(),
69 other._physicals.begin(), other._physicals.end());
71 for (; last != _physicals.end(); last++) {
72 (*last)->_physical_node =
this;
81 nassertv(index < _physicals.size());
83 _physicals[index]->_physical_node =
nullptr;
84 _physicals[index] = physical;
85 physical->_physical_node =
this;
93 if (index > _physicals.size()) {
94 index = _physicals.size();
97 _physicals.insert(_physicals.begin() + index, physical);
98 physical->_physical_node =
this;
108 found = find(_physicals.begin(), _physicals.end(), ptp);
109 if (found == _physicals.end()) {
112 _physicals.erase(found);
114 nassertv(ptp->_physical_node ==
this);
115 ptp->_physical_node =
nullptr;
123 nassertv(index <= _physicals.size());
126 remove = _physicals.begin() + index;
127 (*remove)->_physical_node =
nullptr;
129 _physicals.erase(remove);
138 out.width(
indent); out<<
""; out<<
"PhysicalNode:\n";