odeJointCollection.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #ifndef ODEJOINTCOLLECTION_H
  15. #define ODEJOINTCOLLECTION_H
  16. class OdeJoint;
  17. ////////////////////////////////////////////////////////////////////
  18. // Class : OdeJointCollection
  19. // Description :
  20. ////////////////////////////////////////////////////////////////////
  21. class EXPCL_PANDAODE OdeJointCollection {
  22. PUBLISHED:
  23. OdeJointCollection();
  24. OdeJointCollection(const OdeJointCollection &copy);
  25. void operator = (const OdeJointCollection &copy);
  26. INLINE ~OdeJointCollection();
  27. void add_joint(const OdeJoint &joint);
  28. bool remove_joint(const OdeJoint &joint);
  29. void add_joints_from(const OdeJointCollection &other);
  30. void remove_joints_from(const OdeJointCollection &other);
  31. void remove_duplicate_joints();
  32. bool has_joint(const OdeJoint &joint) const;
  33. void clear();
  34. bool is_empty() const;
  35. int get_num_joints() const;
  36. OdeJoint get_joint(int index) const;
  37. MAKE_SEQ(get_joints, get_num_joints, get_joint);
  38. OdeJoint operator [] (int index) const;
  39. int size() const;
  40. INLINE void operator += (const OdeJointCollection &other);
  41. INLINE OdeJointCollection operator + (const OdeJointCollection &other) const;
  42. private:
  43. typedef PTA(OdeJoint) Joints;
  44. Joints _joints;
  45. };
  46. #include "odeJointCollection.I"
  47. #endif