open_toontown_panda3d/panda/src/physics/physicalNode.I

44 lines
1.3 KiB
Plaintext

// Filename: physicalNode.I
// Created by: charles (01Aug00)
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function : clear
// Access : public
////////////////////////////////////////////////////////////////////
INLINE void PhysicalNode::
clear(void) {
_physicals.erase(_physicals.begin(), _physicals.end());
}
////////////////////////////////////////////////////////////////////
// Function : get_physical
// Access : public
////////////////////////////////////////////////////////////////////
INLINE Physical *PhysicalNode::
get_physical(int index) const {
nassertr(index >= 0 && index < _physicals.size(),
(Physical *) NULL);
return _physicals[index];
}
////////////////////////////////////////////////////////////////////
// Function : get_num_physicals
// Access : public
////////////////////////////////////////////////////////////////////
INLINE int PhysicalNode::
get_num_physicals(void) const {
return _physicals.size();
}
////////////////////////////////////////////////////////////////////
// Function : add_physical
// Access : public
////////////////////////////////////////////////////////////////////
INLINE void PhysicalNode::
add_physical(Physical *physical) {
_physicals.push_back(physical);
physical->_physical_node = this;
}