00001 // Filename: bulletConstraint.cxx 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 #include "bulletConstraint.h" 00016 #include "bulletRigidBodyNode.h" 00017 00018 TypeHandle BulletConstraint::_type_handle; 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: BulletConstraint::enable_feedback 00022 // Access: Published 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 void BulletConstraint:: 00026 enable_feedback(bool value) { 00027 00028 ptr()->enableFeedback(value); 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: BulletConstraint::get_applied_impulse 00033 // Access: Published 00034 // Description: 00035 //////////////////////////////////////////////////////////////////// 00036 PN_stdfloat BulletConstraint:: 00037 get_applied_impulse() const { 00038 00039 return (PN_stdfloat)ptr()->getAppliedImpulse(); 00040 } 00041 00042 //////////////////////////////////////////////////////////////////// 00043 // Function: BulletConstraint::set_dbg_draw_size 00044 // Access: Published 00045 // Description: 00046 //////////////////////////////////////////////////////////////////// 00047 void BulletConstraint:: 00048 set_debug_draw_size(PN_stdfloat size) { 00049 00050 ptr()->setDbgDrawSize((btScalar)size); 00051 } 00052 00053 //////////////////////////////////////////////////////////////////// 00054 // Function: BulletConstraint::get_dbg_draw_size 00055 // Access: Published 00056 // Description: 00057 //////////////////////////////////////////////////////////////////// 00058 PN_stdfloat BulletConstraint:: 00059 get_debug_draw_size() { 00060 00061 return (PN_stdfloat)ptr()->getDbgDrawSize(); 00062 } 00063 00064 //////////////////////////////////////////////////////////////////// 00065 // Function: BulletConstraint::get_rigid_body_a 00066 // Access: Published 00067 // Description: 00068 //////////////////////////////////////////////////////////////////// 00069 BulletRigidBodyNode *BulletConstraint:: 00070 get_rigid_body_a() { 00071 00072 return (BulletRigidBodyNode *)ptr()->getRigidBodyA().getUserPointer(); 00073 } 00074 00075 //////////////////////////////////////////////////////////////////// 00076 // Function: BulletConstraint::get_rigid_body_b 00077 // Access: Published 00078 // Description: 00079 //////////////////////////////////////////////////////////////////// 00080 BulletRigidBodyNode *BulletConstraint:: 00081 get_rigid_body_b() { 00082 00083 return (BulletRigidBodyNode *)ptr()->getRigidBodyB().getUserPointer(); 00084 } 00085