void SliderConstraint::CreateConstraint(RigidProxy* RigidA, RigidProxy* RigidB, const Transform& TransA, const Transform& TransB) { if( this->Slider == NULL ) { if( RigidA && RigidB ) { this->Slider = new btSliderConstraint(*(RigidA->_GetPhysicsObject()),*(RigidB->_GetPhysicsObject()),TransA.GetBulletTransform(),TransB.GetBulletTransform(),false); }else if( RigidA ) { this->Slider = new btSliderConstraint(*(RigidA->_GetPhysicsObject()),TransA.GetBulletTransform(),false); } } }
void SliderConstraint::SetPivotATransform(const Transform& TranA) { this->Slider->getFrameOffsetA() = TranA.GetBulletTransform(); }
void SliderConstraint::SetPivotBTransform(const Transform& TranB) { this->Slider->getFrameOffsetB() = TranB.GetBulletTransform(); }
void SliderConstraint::SetPivotTransforms(const Transform& TransA, const Transform& TransB) { this->Slider->setFrames(TransA.GetBulletTransform(),TransB.GetBulletTransform()); }