|
|
@@ -26,7 +26,7 @@ TypeHandle BulletConeTwistConstraint::_type_handle;
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
BulletConeTwistConstraint::
|
|
|
BulletConeTwistConstraint(const BulletRigidBodyNode *node_a,
|
|
|
- CPT(TransformState) frame_a) {
|
|
|
+ const TransformState *frame_a) {
|
|
|
|
|
|
btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
|
|
|
btTransform trans_a = TransformState_to_btTrans(frame_a);
|
|
|
@@ -42,8 +42,8 @@ BulletConeTwistConstraint(const BulletRigidBodyNode *node_a,
|
|
|
BulletConeTwistConstraint::
|
|
|
BulletConeTwistConstraint(const BulletRigidBodyNode *node_a,
|
|
|
const BulletRigidBodyNode *node_b,
|
|
|
- CPT(TransformState) frame_a,
|
|
|
- CPT(TransformState) frame_b) {
|
|
|
+ const TransformState *frame_a,
|
|
|
+ const TransformState *frame_b) {
|
|
|
|
|
|
btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
|
|
|
btTransform trans_a = TransformState_to_btTrans(frame_a);
|
|
|
@@ -181,3 +181,17 @@ set_motor_target_in_constraint_space(const LQuaternion &quat) {
|
|
|
_constraint->setMotorTargetInConstraintSpace(LQuaternion_to_btQuat(quat));
|
|
|
}
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+// Function: BulletConeTwistConstraint::set_frames
|
|
|
+// Access: Published
|
|
|
+// Description:
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+void BulletConeTwistConstraint::
|
|
|
+set_frames(const TransformState *ts_a, const TransformState *ts_b) {
|
|
|
+
|
|
|
+ btTransform frame_a = TransformState_to_btTrans(ts_a);
|
|
|
+ btTransform frame_b = TransformState_to_btTrans(ts_b);
|
|
|
+
|
|
|
+ _constraint->setFrames(frame_a, frame_b);
|
|
|
+}
|
|
|
+
|