示例#1
0
void Box2DFixture::setRestitution(float restitution)
{
    if (mFixtureDef.restitution == restitution)
        return;

    mFixtureDef.restitution = restitution;
    if (mFixture)
        mFixture->SetRestitution(restitution);
    emit restitutionChanged();
}
void PhysicsBodyInfo::setRestitution(qreal restitution){
    if(restitution!=m_restitution){
        m_restitution=restitution;
        emit restitutionChanged(m_restitution);
    }
}
示例#3
0
void Body::setRestitution(float value) {
    mRestitution = value;
    forEachFixture([this] (b2Fixture* f) { f->SetRestitution(mRestitution); });
    emit restitutionChanged();
}