15 #include "partSubset.h" 33 _include_joints(copy._include_joints),
34 _exclude_joints(copy._exclude_joints)
45 _include_joints = copy._include_joints;
46 _exclude_joints = copy._exclude_joints;
63 _include_joints.push_back(name);
80 _exclude_joints.push_back(name);
91 Joints::const_iterator ji;
92 for (ji = other._include_joints.begin();
93 ji != other._include_joints.end();
95 _include_joints.push_back(*ji);
97 for (ji = other._exclude_joints.begin();
98 ji != other._exclude_joints.end();
100 _exclude_joints.push_back(*ji);
110 output(ostream &out)
const {
111 if (_include_joints.empty() && _exclude_joints.empty()) {
112 out <<
"PartSubset, empty";
114 out <<
"PartSubset, include: [";
115 Joints::const_iterator ji;
116 for (ji = _include_joints.begin(); ji != _include_joints.end(); ++ji) {
119 out <<
" ], exclude: [";
120 for (ji = _exclude_joints.begin(); ji != _exclude_joints.end(); ++ji) {
136 return _include_joints.empty();
147 Joints::const_iterator ji;
148 for (ji = _include_joints.begin(); ji != _include_joints.end(); ++ji) {
149 if ((*ji).matches(joint_name)) {
166 Joints::const_iterator ji;
167 for (ji = _exclude_joints.begin(); ji != _exclude_joints.end(); ++ji) {
168 if ((*ji).matches(joint_name)) {
bool is_include_empty() const
Returns true if the include list is completely empty, false otherwise.
bool matches_exclude(const string &joint_name) const
Returns true if the indicated name matches a name on the exclude list, false otherwise.
bool matches_include(const string &joint_name) const
Returns true if the indicated name matches a name on the include list, false otherwise.
void add_exclude_joint(const GlobPattern &name)
Adds the named joint to the list of joints that will be explicitly exlcluded from the subset...
This class is used to define a subset of part names to apply to the PartBundle::bind_anim() operation...
void add_include_joint(const GlobPattern &name)
Adds the named joint to the list of joints that will be explicitly included in the subset...
This class can be used to test for string matches against standard Unix-shell filename globbing conve...
void append(const PartSubset &other)
Appends the include and exclude list from the other object onto this object's lists.