15 #ifndef __BULLET_HINGE_CONSTRAINT_H__
16 #define __BULLET_HINGE_CONSTRAINT_H__
18 #include "pandabase.h"
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
22 #include "bulletConstraint.h"
40 bool use_frame_a=
false);
47 bool use_frame_a=
false);
50 const TransformState *ts_a,
51 bool use_frame_a=
false);
54 const TransformState *ts_a,
55 const TransformState *ts_b,
56 bool use_frame_a=
false);
60 PN_stdfloat get_hinge_angle();
61 PN_stdfloat get_lower_limit()
const;
62 PN_stdfloat get_upper_limit()
const;
63 bool get_angular_only()
const;
65 void set_angular_only(
bool value);
66 void set_limit(PN_stdfloat low, PN_stdfloat high, PN_stdfloat softness=0.9f, PN_stdfloat bias=0.3f, PN_stdfloat relaxation=1.0f);
69 void enable_angular_motor(
bool enable, PN_stdfloat target_velocity, PN_stdfloat max_impulse);
70 void enable_motor(
bool enable);
71 void set_max_motor_impulse(PN_stdfloat max_impulse);
72 void set_motor_target(
const LQuaternion &quat, PN_stdfloat dt);
73 void set_motor_target(PN_stdfloat target_angle, PN_stdfloat dt);
75 void set_frames(
const TransformState *ts_a,
const TransformState *ts_b);
76 INLINE CPT(TransformState) get_frame_a()
const;
77 INLINE CPT(TransformState) get_frame_b()
const;
80 virtual btTypedConstraint *ptr()
const;
83 btHingeConstraint *_constraint;
90 static void init_type() {
91 BulletConstraint::init_type();
92 register_type(_type_handle,
"BulletHingeConstraint",
93 BulletConstraint::get_class_type());
96 return get_class_type();
100 return get_class_type();
107 #include "bulletHingeConstraint.I"
109 #endif // __BULLET_HINGE_CONSTRAINT_H__
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
The hinge constraint lets two bodies rotate around a given axis while adhering to specified limits...
This is the base quaternion class.
TypeHandle is the identifier used to differentiate C++ class types.