From 3570bd905e6e48d5eec1d43abae2ce75c62a235d Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 17 May 2017 11:55:23 -0700 Subject: [PATCH 1/2] update for spring to tractor name-change --- scripts/developer/tests/dynamics/dynamics-tests.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/developer/tests/dynamics/dynamics-tests.html b/scripts/developer/tests/dynamics/dynamics-tests.html index 0f324e121c..6ef82c4b70 100644 --- a/scripts/developer/tests/dynamics/dynamics-tests.html +++ b/scripts/developer/tests/dynamics/dynamics-tests.html @@ -9,8 +9,8 @@ lifetime:
-
- A platform with a lever. The lever can be moved in a cone and rotated. A spring brings it back to its neutral position. +
+ A platform with a lever. The lever can be moved in a cone and rotated. A tractor brings it back to its neutral position.

A grabbable door with a hinge between it and world-space. @@ -31,7 +31,7 @@ A chain of spheres connected by ball-and-socket joints coincident-with the spheres.

- A self-righting ragdoll. The head is on a weak spring vs the body. + A self-righting ragdoll. The head is on a weak tractor vs the body. From 9b1fe60b7c3f3407f240a430dcf33ea8a437fb40 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 17 May 2017 11:55:31 -0700 Subject: [PATCH 2/2] suppress frequest log-spam from constraints. --- libraries/physics/src/ObjectConstraintBallSocket.cpp | 6 ++++++ libraries/physics/src/ObjectConstraintConeTwist.cpp | 6 ++++++ libraries/physics/src/ObjectConstraintHinge.cpp | 6 ++++++ libraries/physics/src/ObjectConstraintSlider.cpp | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/libraries/physics/src/ObjectConstraintBallSocket.cpp b/libraries/physics/src/ObjectConstraintBallSocket.cpp index fb36a49e92..9dd85954a3 100644 --- a/libraries/physics/src/ObjectConstraintBallSocket.cpp +++ b/libraries/physics/src/ObjectConstraintBallSocket.cpp @@ -9,6 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include + #include "QVariantGLM.h" #include "EntityTree.h" @@ -83,6 +85,9 @@ btTypedConstraint* ObjectConstraintBallSocket::getConstraint() { return constraint; } + static QString repeatedBallSocketNoRigidBody = LogHandler::getInstance().addRepeatedMessageRegex( + "ObjectConstraintBallSocket::getConstraint -- no rigidBody.*"); + btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { qCDebug(physics) << "ObjectConstraintBallSocket::getConstraint -- no rigidBodyA"; @@ -94,6 +99,7 @@ btTypedConstraint* ObjectConstraintBallSocket::getConstraint() { btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { + qCDebug(physics) << "ObjectConstraintBallSocket::getConstraint -- no rigidBodyB"; return nullptr; } diff --git a/libraries/physics/src/ObjectConstraintConeTwist.cpp b/libraries/physics/src/ObjectConstraintConeTwist.cpp index 15d9378443..49f926af81 100644 --- a/libraries/physics/src/ObjectConstraintConeTwist.cpp +++ b/libraries/physics/src/ObjectConstraintConeTwist.cpp @@ -9,6 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include + #include "QVariantGLM.h" #include "EntityTree.h" @@ -94,6 +96,9 @@ btTypedConstraint* ObjectConstraintConeTwist::getConstraint() { return constraint; } + static QString repeatedConeTwistNoRigidBody = LogHandler::getInstance().addRepeatedMessageRegex( + "ObjectConstraintConeTwist::getConstraint -- no rigidBody.*"); + btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { qCDebug(physics) << "ObjectConstraintConeTwist::getConstraint -- no rigidBodyA"; @@ -125,6 +130,7 @@ btTypedConstraint* ObjectConstraintConeTwist::getConstraint() { btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { + qCDebug(physics) << "ObjectConstraintConeTwist::getConstraint -- no rigidBodyB"; return nullptr; } diff --git a/libraries/physics/src/ObjectConstraintHinge.cpp b/libraries/physics/src/ObjectConstraintHinge.cpp index dbadf433c3..52be64796a 100644 --- a/libraries/physics/src/ObjectConstraintHinge.cpp +++ b/libraries/physics/src/ObjectConstraintHinge.cpp @@ -9,6 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include + #include "QVariantGLM.h" #include "EntityTree.h" @@ -93,6 +95,9 @@ btTypedConstraint* ObjectConstraintHinge::getConstraint() { return constraint; } + static QString repeatedHingeNoRigidBody = LogHandler::getInstance().addRepeatedMessageRegex( + "ObjectConstraintHinge::getConstraint -- no rigidBody.*"); + btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { qCDebug(physics) << "ObjectConstraintHinge::getConstraint -- no rigidBodyA"; @@ -110,6 +115,7 @@ btTypedConstraint* ObjectConstraintHinge::getConstraint() { // This hinge is between two entities... find the other rigid body. btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { + qCDebug(physics) << "ObjectConstraintHinge::getConstraint -- no rigidBodyB"; return nullptr; } diff --git a/libraries/physics/src/ObjectConstraintSlider.cpp b/libraries/physics/src/ObjectConstraintSlider.cpp index 3716960a6e..ded9ad47e6 100644 --- a/libraries/physics/src/ObjectConstraintSlider.cpp +++ b/libraries/physics/src/ObjectConstraintSlider.cpp @@ -9,6 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include + #include "QVariantGLM.h" #include "EntityTree.h" @@ -85,6 +87,9 @@ btTypedConstraint* ObjectConstraintSlider::getConstraint() { return constraint; } + static QString repeatedSliderNoRigidBody = LogHandler::getInstance().addRepeatedMessageRegex( + "ObjectConstraintSlider::getConstraint -- no rigidBody.*"); + btRigidBody* rigidBodyA = getRigidBody(); if (!rigidBodyA) { qCDebug(physics) << "ObjectConstraintSlider::getConstraint -- no rigidBodyA"; @@ -116,6 +121,7 @@ btTypedConstraint* ObjectConstraintSlider::getConstraint() { btRigidBody* rigidBodyB = getOtherRigidBody(otherEntityID); if (!rigidBodyB) { + qCDebug(physics) << "ObjectConstraintSlider::getConstraint -- no rigidBodyB"; return nullptr; }