Panda3D
 All Classes Functions Variables Enumerations
partSubset.h
1 // Filename: partSubset.h
2 // Created by: drose (19Jan06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PARTSUBSET_H
16 #define PARTSUBSET_H
17 
18 #include "pandabase.h"
19 #include "globPattern.h"
20 
21 ////////////////////////////////////////////////////////////////////
22 // Class : PartSubset
23 // Description : This class is used to define a subset of part names
24 // to apply to the PartBundle::bind_anim() operation.
25 // Only those part names within the subset will be
26 // included in the bind.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDA_CHAN PartSubset {
29 PUBLISHED:
30  PartSubset();
31  PartSubset(const PartSubset &copy);
32  void operator = (const PartSubset &copy);
33 
34  void add_include_joint(const GlobPattern &name);
35  void add_exclude_joint(const GlobPattern &name);
36 
37  void append(const PartSubset &other);
38 
39  void output(ostream &out) const;
40 
41  bool is_include_empty() const;
42  bool matches_include(const string &joint_name) const;
43  bool matches_exclude(const string &joint_name) const;
44 
45 private:
47  Joints _include_joints;
48  Joints _exclude_joints;
49 };
50 
51 INLINE ostream &operator << (ostream &out, const PartSubset &subset) {
52  subset.output(out);
53  return out;
54 }
55 
56 #include "partSubset.I"
57 
58 #endif
59 
This class is used to define a subset of part names to apply to the PartBundle::bind_anim() operation...
Definition: partSubset.h:28
This class can be used to test for string matches against standard Unix-shell filename globbing conve...
Definition: globPattern.h:37