Panda3D
|
00001 // Filename: bulletRigidBodyNode.I 00002 // Created by: enn0x (19Nov10) 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 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: BulletRigidBodyNode::Destructor 00018 // Access: Published 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE BulletRigidBodyNode:: 00022 ~BulletRigidBodyNode() { 00023 00024 delete _rigid->getMotionState(); 00025 delete _rigid; 00026 } 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Function: BulletRigidBodyNode::set_linear_damping 00030 // Access: Published 00031 // Description: 00032 //////////////////////////////////////////////////////////////////// 00033 INLINE void BulletRigidBodyNode:: 00034 set_linear_damping(PN_stdfloat value) { 00035 00036 _rigid->setDamping(value, _rigid->getAngularDamping()); 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: BulletRigidBodyNode::set_angular_damping 00041 // Access: Published 00042 // Description: 00043 //////////////////////////////////////////////////////////////////// 00044 INLINE void BulletRigidBodyNode:: 00045 set_angular_damping(PN_stdfloat value) { 00046 00047 _rigid->setDamping(_rigid->getLinearDamping(), value); 00048 } 00049 00050 //////////////////////////////////////////////////////////////////// 00051 // Function: BulletRigidBodyNode::get_linear_damping 00052 // Access: Published 00053 // Description: 00054 //////////////////////////////////////////////////////////////////// 00055 INLINE PN_stdfloat BulletRigidBodyNode:: 00056 get_linear_damping() const { 00057 00058 return (PN_stdfloat)_rigid->getLinearDamping(); 00059 } 00060 00061 //////////////////////////////////////////////////////////////////// 00062 // Function: BulletRigidBodyNode::get_angular_damping 00063 // Access: Published 00064 // Description: 00065 //////////////////////////////////////////////////////////////////// 00066 INLINE PN_stdfloat BulletRigidBodyNode:: 00067 get_angular_damping() const { 00068 00069 return (PN_stdfloat)_rigid->getAngularDamping(); 00070 } 00071