Panda3D
|
00001 // Filename: bulletConstraint.h 00002 // Created by: enn0x (01Mar10) 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 __BULLET_CONSTRAINT_H__ 00016 #define __BULLET_CONSTRAINT_H__ 00017 00018 #include "pandabase.h" 00019 00020 #include "bullet_includes.h" 00021 00022 #include "typedReferenceCount.h" 00023 00024 class BulletRigidBodyNode; 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Class : BulletConstraint 00028 // Description : 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDABULLET BulletConstraint : public TypedReferenceCount { 00031 00032 PUBLISHED: 00033 INLINE virtual ~BulletConstraint(); 00034 00035 BulletRigidBodyNode *get_rigid_body_a(); 00036 BulletRigidBodyNode *get_rigid_body_b(); 00037 00038 void enable_feedback(bool value); 00039 void set_debug_draw_size(PN_stdfloat size); 00040 00041 PN_stdfloat get_applied_impulse() const; 00042 PN_stdfloat get_debug_draw_size(); 00043 00044 public: 00045 virtual btTypedConstraint *ptr() const = 0; 00046 00047 //////////////////////////////////////////////////////////////////// 00048 public: 00049 static TypeHandle get_class_type() { 00050 return _type_handle; 00051 } 00052 static void init_type() { 00053 TypedReferenceCount::init_type(); 00054 register_type(_type_handle, "BulletConstraint", 00055 TypedReferenceCount::get_class_type()); 00056 } 00057 virtual TypeHandle get_type() const { 00058 return get_class_type(); 00059 } 00060 virtual TypeHandle force_init_type() { 00061 init_type(); 00062 return get_class_type(); 00063 } 00064 00065 private: 00066 static TypeHandle _type_handle; 00067 }; 00068 00069 #include "bulletConstraint.I" 00070 00071 #endif // __BULLET_CONSTRAINT_H__