00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __BULLET_SPHERICAL_CONSTRAINT_H__
00016 #define __BULLET_SPHERICAL_CONSTRAINT_H__
00017
00018 #include "pandabase.h"
00019
00020 #include "bullet_includes.h"
00021 #include "bullet_utils.h"
00022 #include "bulletConstraint.h"
00023
00024 #include "luse.h"
00025
00026 class BulletRigidBodyNode;
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 class EXPCL_PANDABULLET BulletSphericalConstraint : public BulletConstraint {
00039
00040 PUBLISHED:
00041 BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
00042 const LPoint3 &pivot_a);
00043 BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
00044 const BulletRigidBodyNode *node_b,
00045 const LPoint3 &pivot_a,
00046 const LPoint3 &pivot_b);
00047 INLINE ~BulletSphericalConstraint();
00048
00049 void set_pivot_a(const LPoint3 &pivot_a);
00050 void set_pivot_b(const LPoint3 &pivot_b);
00051
00052 LPoint3 get_pivot_in_a() const;
00053 LPoint3 get_pivot_in_b() const;
00054
00055 public:
00056 virtual btTypedConstraint *ptr() const;
00057
00058 private:
00059 btPoint2PointConstraint *_constraint;
00060
00061
00062 public:
00063 static TypeHandle get_class_type() {
00064 return _type_handle;
00065 }
00066 static void init_type() {
00067 BulletConstraint::init_type();
00068 register_type(_type_handle, "BulletSphericalConstraint",
00069 BulletConstraint::get_class_type());
00070 }
00071 virtual TypeHandle get_type() const {
00072 return get_class_type();
00073 }
00074 virtual TypeHandle force_init_type() {
00075 init_type();
00076 return get_class_type();
00077 }
00078
00079 private:
00080 static TypeHandle _type_handle;
00081 };
00082
00083 #include "bulletSphericalConstraint.I"
00084
00085 #endif // __BULLET_SPHERICAL_CONSTRAINT_H__