Panda3D
 All Classes Functions Variables Enumerations
odeJointCollection.h
1 // Filename: odeJointCollection.h
2 // Created by: joswilso (27Dec06)
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 ODEJOINTCOLLECTION_H
16 #define ODEJOINTCOLLECTION_H
17 
18 #include "odeJoint.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : OdeJointCollection
22 // Description :
23 ////////////////////////////////////////////////////////////////////
24 class EXPCL_PANDAODE OdeJointCollection {
25 PUBLISHED:
28  void operator = (const OdeJointCollection &copy);
29  INLINE ~OdeJointCollection();
30 
31  void add_joint(const OdeJoint &joint);
32  bool remove_joint(const OdeJoint &joint);
33  void add_joints_from(const OdeJointCollection &other);
34  void remove_joints_from(const OdeJointCollection &other);
35  void remove_duplicate_joints();
36  bool has_joint(const OdeJoint &joint) const;
37  void clear();
38 
39  bool is_empty() const;
40  int get_num_joints() const;
41  OdeJoint get_joint(int index) const;
42  MAKE_SEQ(get_joints, get_num_joints, get_joint);
43  OdeJoint operator [] (int index) const;
44  int size() const;
45  INLINE void operator += (const OdeJointCollection &other);
46  INLINE OdeJointCollection operator + (const OdeJointCollection &other) const;
47 
48 private:
49  typedef PTA(OdeJoint) Joints;
50  Joints _joints;
51 };
52 
53 #include "odeJointCollection.I"
54 
55 #endif