void Box2DWheelJoint::setDampingRatio(float _dampingRatio) { if (qFuzzyCompare(dampingRatio(), _dampingRatio)) return; if (mWheelJoint) mWheelJoint->SetSpringDampingRatio(_dampingRatio); mWheelJointDef.dampingRatio = _dampingRatio; emit dampingRatioChanged(); }
int Box2DDistanceJoint::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Box2DJoint::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 5) qt_static_metacall(this, _c, _id, _a); _id -= 5; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< float*>(_v) = length(); break; case 1: *reinterpret_cast< float*>(_v) = frequencyHz(); break; case 2: *reinterpret_cast< float*>(_v) = dampingRatio(); break; case 3: *reinterpret_cast< QPointF*>(_v) = localAnchorA(); break; case 4: *reinterpret_cast< QPointF*>(_v) = localAnchorB(); break; } _id -= 5; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setLength(*reinterpret_cast< float*>(_v)); break; case 1: setFrequencyHz(*reinterpret_cast< float*>(_v)); break; case 2: setDampingRatio(*reinterpret_cast< float*>(_v)); break; case 3: setLocalAnchorA(*reinterpret_cast< QPointF*>(_v)); break; case 4: setLocalAnchorB(*reinterpret_cast< QPointF*>(_v)); break; } _id -= 5; } else if (_c == QMetaObject::ResetProperty) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 5; } #endif // QT_NO_PROPERTIES return _id; }