コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
 void SliderConstraint::SetPivotATransform(const Transform& TranA)
     { this->Slider->getFrameOffsetA() = TranA.GetBulletTransform(); }
コード例 #3
0
 void SliderConstraint::SetPivotBTransform(const Transform& TranB)
     { this->Slider->getFrameOffsetB() = TranB.GetBulletTransform(); }
コード例 #4
0
 void SliderConstraint::SetPivotTransforms(const Transform& TransA, const Transform& TransB)
     { this->Slider->setFrames(TransA.GetBulletTransform(),TransB.GetBulletTransform()); }