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