mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +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;
|
||||
angularTimeScale = _angularTimeScale;
|
||||
|
||||
if (_otherID != QUuid()) {
|
||||
if (!_otherID.isNull()) {
|
||||
if (other) {
|
||||
rotation = _desiredRotationalTarget * other->getRotation();
|
||||
position = _desiredPositionalTarget + other->getPosition();
|
||||
position = other->getRotation() * _desiredPositionalTarget + other->getPosition();
|
||||
} else {
|
||||
// we should have an "other" but can't find it, so disable the spring.
|
||||
linearTimeScale = FLT_MAX;
|
||||
|
|
|
@ -74,8 +74,6 @@ void ObjectConstraintHinge::updateHinge() {
|
|||
return;
|
||||
}
|
||||
|
||||
// auto bulletAxisInA = glmToBullet(axisInA);
|
||||
// constraint->setAxis(bulletAxisInA);
|
||||
constraint->setLimit(low, high, softness, biasFactor, relaxationFactor);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,9 @@ ObjectConstraintSlider::ObjectConstraintSlider(const QUuid& id, EntityItemPointe
|
|||
_pointInA(glm::vec3(0.0f)),
|
||||
_axisInA(glm::vec3(0.0f))
|
||||
{
|
||||
#if WANT_DEBUG
|
||||
qCDebug(physics) << "ObjectConstraintSlider::ObjectConstraintSlider";
|
||||
#endif
|
||||
}
|
||||
|
||||
ObjectConstraintSlider::~ObjectConstraintSlider() {
|
||||
#if WANT_DEBUG
|
||||
qCDebug(physics) << "ObjectConstraintSlider::~ObjectConstraintSlider";
|
||||
#endif
|
||||
}
|
||||
|
||||
QList<btRigidBody*> ObjectConstraintSlider::getRigidBodies() {
|
||||
|
|
Loading…
Reference in a new issue