Panda3D
|
00001 // Filename: odeJointCollection.h 00002 // Created by: joswilso (27Dec06) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef ODEJOINTCOLLECTION_H 00016 #define ODEJOINTCOLLECTION_H 00017 00018 class OdeJoint; 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Class : OdeJointCollection 00022 // Description : 00023 //////////////////////////////////////////////////////////////////// 00024 class EXPCL_PANDAODE OdeJointCollection { 00025 PUBLISHED: 00026 OdeJointCollection(); 00027 OdeJointCollection(const OdeJointCollection ©); 00028 void operator = (const OdeJointCollection ©); 00029 INLINE ~OdeJointCollection(); 00030 00031 void add_joint(const OdeJoint &joint); 00032 bool remove_joint(const OdeJoint &joint); 00033 void add_joints_from(const OdeJointCollection &other); 00034 void remove_joints_from(const OdeJointCollection &other); 00035 void remove_duplicate_joints(); 00036 bool has_joint(const OdeJoint &joint) const; 00037 void clear(); 00038 00039 bool is_empty() const; 00040 int get_num_joints() const; 00041 OdeJoint get_joint(int index) const; 00042 MAKE_SEQ(get_joints, get_num_joints, get_joint); 00043 OdeJoint operator [] (int index) const; 00044 int size() const; 00045 INLINE void operator += (const OdeJointCollection &other); 00046 INLINE OdeJointCollection operator + (const OdeJointCollection &other) const; 00047 00048 private: 00049 typedef PTA(OdeJoint) Joints; 00050 Joints _joints; 00051 }; 00052 00053 #include "odeJointCollection.I" 00054 00055 #endif