Panda3D
Loading...
Searching...
No Matches
partSubset.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file partSubset.h
10 * @author drose
11 * @date 2006-01-19
12 */
13
14#ifndef PARTSUBSET_H
15#define PARTSUBSET_H
16
17#include "pandabase.h"
18#include "globPattern.h"
19
20/**
21 * This class is used to define a subset of part names to apply to the
22 * PartBundle::bind_anim() operation. Only those part names within the subset
23 * will be included in the bind.
24 */
25class EXPCL_PANDA_CHAN PartSubset {
26PUBLISHED:
27 PartSubset();
28 PartSubset(const PartSubset &copy);
29 void operator = (const PartSubset &copy);
30
31 void add_include_joint(const GlobPattern &name);
32 void add_exclude_joint(const GlobPattern &name);
33
34 void append(const PartSubset &other);
35
36 void output(std::ostream &out) const;
37
38 bool is_include_empty() const;
39 bool matches_include(const std::string &joint_name) const;
40 bool matches_exclude(const std::string &joint_name) const;
41
42private:
43 typedef pvector<GlobPattern> Joints;
44 Joints _include_joints;
45 Joints _exclude_joints;
46};
47
48INLINE std::ostream &operator << (std::ostream &out, const PartSubset &subset) {
49 subset.output(out);
50 return out;
51}
52
53#include "partSubset.I"
54
55#endif
This class can be used to test for string matches against standard Unix- shell filename globbing conv...
Definition globPattern.h:32
This class is used to define a subset of part names to apply to the PartBundle::bind_anim() operation...
Definition partSubset.h:25
void add_include_joint(const GlobPattern &name)
Adds the named joint to the list of joints that will be explicitly included in the subset.
bool matches_exclude(const std::string &joint_name) const
Returns true if the indicated name matches a name on the exclude list, false otherwise.
void append(const PartSubset &other)
Appends the include and exclude list from the other object onto this object's lists.
bool is_include_empty() const
Returns true if the include list is completely empty, false otherwise.
bool matches_include(const std::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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.