Panda3D
bulletConstraint.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file bulletConstraint.I
10  * @author enn0x
11  * @date 2010-03-01
12  */
13 
14 /**
15  *
16  */
17 INLINE BulletConstraint::
18 ~BulletConstraint() {
19 
20 }
21 
22 /**
23  * Sets the applied impulse limit for breaking the constraint. If the limit
24  * is exceeded the constraint will be disabled. Disabled constraints are not
25  * removed from the world, and can be re-enabled.
26  */
27 INLINE void BulletConstraint::
28 set_breaking_threshold(PN_stdfloat threshold) {
29 
30  ptr()->setBreakingImpulseThreshold(threshold);
31 }
32 
33 /**
34  * Returns the applied impluse limit for breaking the constraint.
35  */
36 INLINE PN_stdfloat BulletConstraint::
37 get_breaking_threshold() const {
38 
39  return (PN_stdfloat)ptr()->getBreakingImpulseThreshold();
40 }
41 
42 /**
43  *
44  */
45 INLINE void BulletConstraint::
46 set_enabled(bool enable) {
47 
48  ptr()->setEnabled(enable);
49 }
50 
51 /**
52  * Returns TRUE if the constraint is enabled.
53  */
54 INLINE bool BulletConstraint::
55 is_enabled() const {
56 
57  return ptr()->isEnabled();
58 }
set_breaking_threshold
Sets the applied impulse limit for breaking the constraint.