mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Added support for breakable constraints.
This commit is contained in:
parent
65e555543a
commit
55b7f59509
@ -22,3 +22,51 @@ INLINE BulletConstraint::
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletConstraint::set_breaking_threshold
|
||||
// Access: Published
|
||||
// Description: Sets the applied impulse limit for breaking the
|
||||
// constraint. If the limit is exceeded the constraint
|
||||
// will be disabled. Disabled constraints are not
|
||||
// removed from the world, and can be re-enabled.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void BulletConstraint::
|
||||
set_breaking_threshold(PN_stdfloat threshold) {
|
||||
|
||||
ptr()->setBreakingImpulseThreshold(threshold);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletConstraint::set_breaking_threshold
|
||||
// Access: Published
|
||||
// Description: Returns the applied impluse limit for breaking the
|
||||
// constraint.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE PN_stdfloat BulletConstraint::
|
||||
set_breaking_threshold() const {
|
||||
|
||||
return (PN_stdfloat)ptr()->getBreakingImpulseThreshold();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletConstraint::set_enabled
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void BulletConstraint::
|
||||
set_enabled(bool enable) {
|
||||
|
||||
ptr()->setEnabled(enable);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletConstraint::is_enabled
|
||||
// Access: Published
|
||||
// Description: Returns TRUE if the constraint is enabled.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool BulletConstraint::
|
||||
is_enabled() const {
|
||||
|
||||
return ptr()->isEnabled();
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,11 @@ PUBLISHED:
|
||||
PN_stdfloat get_applied_impulse() const;
|
||||
PN_stdfloat get_debug_draw_size();
|
||||
|
||||
INLINE void set_breaking_threshold(PN_stdfloat threshold);
|
||||
INLINE PN_stdfloat set_breaking_threshold() const;
|
||||
INLINE void set_enabled(bool enabled);
|
||||
INLINE bool is_enabled() const;
|
||||
|
||||
enum ConstraintParam {
|
||||
CP_erp = 1,
|
||||
CP_stop_erp,
|
||||
|
Loading…
x
Reference in New Issue
Block a user