mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +02:00
code review
This commit is contained in:
parent
6808cf62b6
commit
3ec3005c6d
3 changed files with 2 additions and 10 deletions
|
@ -85,10 +85,10 @@ bool ObjectActionSpring::getTarget(float deltaTimeStep, glm::quat& rotation, glm
|
||||||
linearTimeScale = _linearTimeScale;
|
linearTimeScale = _linearTimeScale;
|
||||||
angularTimeScale = _angularTimeScale;
|
angularTimeScale = _angularTimeScale;
|
||||||
|
|
||||||
if (_otherID != QUuid()) {
|
if (!_otherID.isNull()) {
|
||||||
if (other) {
|
if (other) {
|
||||||
rotation = _desiredRotationalTarget * other->getRotation();
|
rotation = _desiredRotationalTarget * other->getRotation();
|
||||||
position = _desiredPositionalTarget + other->getPosition();
|
position = other->getRotation() * _desiredPositionalTarget + other->getPosition();
|
||||||
} else {
|
} else {
|
||||||
// we should have an "other" but can't find it, so disable the spring.
|
// we should have an "other" but can't find it, so disable the spring.
|
||||||
linearTimeScale = FLT_MAX;
|
linearTimeScale = FLT_MAX;
|
||||||
|
|
|
@ -74,8 +74,6 @@ void ObjectConstraintHinge::updateHinge() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// auto bulletAxisInA = glmToBullet(axisInA);
|
|
||||||
// constraint->setAxis(bulletAxisInA);
|
|
||||||
constraint->setLimit(low, high, softness, biasFactor, relaxationFactor);
|
constraint->setLimit(low, high, softness, biasFactor, relaxationFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,15 +24,9 @@ ObjectConstraintSlider::ObjectConstraintSlider(const QUuid& id, EntityItemPointe
|
||||||
_pointInA(glm::vec3(0.0f)),
|
_pointInA(glm::vec3(0.0f)),
|
||||||
_axisInA(glm::vec3(0.0f))
|
_axisInA(glm::vec3(0.0f))
|
||||||
{
|
{
|
||||||
#if WANT_DEBUG
|
|
||||||
qCDebug(physics) << "ObjectConstraintSlider::ObjectConstraintSlider";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectConstraintSlider::~ObjectConstraintSlider() {
|
ObjectConstraintSlider::~ObjectConstraintSlider() {
|
||||||
#if WANT_DEBUG
|
|
||||||
qCDebug(physics) << "ObjectConstraintSlider::~ObjectConstraintSlider";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<btRigidBody*> ObjectConstraintSlider::getRigidBodies() {
|
QList<btRigidBody*> ObjectConstraintSlider::getRigidBodies() {
|
||||||
|
|
Loading…
Reference in a new issue