diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 9b2cd10d9d..d20abc58d6 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -369,7 +369,6 @@ void Rig::simulateInternal(float deltaTime, glm::mat4 parentTransform, const glm } _lastPosition = worldPosition; - _positions[(++_positionIndex) % _positions.count()] = worldPosition; // exp. alt. to above line _lastFront = front; _isWalking = isWalking; _isTurning = isTurning; diff --git a/libraries/animation/src/Rig.h b/libraries/animation/src/Rig.h index 45108936d9..379ed64877 100644 --- a/libraries/animation/src/Rig.h +++ b/libraries/animation/src/Rig.h @@ -153,10 +153,6 @@ public: bool _isIdle; glm::vec3 _lastFront; glm::vec3 _lastPosition; - // or, experimentally... - QVector _positions = QVector(4); - QVector _timeIntervals = QVector(4); - int _positionIndex; }; #endif /* defined(__hifi__Rig__) */ diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 5a0ba6c674..5b970a95a3 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -1087,7 +1087,6 @@ void AvatarData::setJointMappingsFromNetworkReply() { } networkReply->deleteLater(); - emit jointMappingLoaded(); } void AvatarData::sendAvatarDataPacket() { diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 60c643eff9..a020be0f7a 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -312,9 +312,6 @@ public: bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; } -signals: - void jointMappingLoaded(); // So that test cases or anyone waiting on asynchronous loading can be informed. - public slots: void sendAvatarDataPacket(); void sendIdentityPacket(); diff --git a/tests/rig/src/RigTests.cpp b/tests/rig/src/RigTests.cpp index 05cef428c6..f1eb7cc440 100644 --- a/tests/rig/src/RigTests.cpp +++ b/tests/rig/src/RigTests.cpp @@ -52,23 +52,6 @@ QTEST_MAIN(RigTests) void RigTests::initTestCase() { - - // There are two good ways we could organize this: - // 1. Create a MyAvatar the same way that Interface does, and poke at it. - // We can't do that because MyAvatar (and even Avatar) are in interface, not a library, and our build system won't allow that dependency. - // 2. Create just the minimum skeleton in the most direct way possible, using only very basic library APIs (such as fbx). - // I don't think we can do that because not everything we need is exposed directly from, e.g., the fst and fbx readers. - // So here we do neither. Using as much as we can from AvatarData (which is in the avatar and further requires network and audio), and - // duplicating whatever other code we need from (My)Avatar. Ugh. We may refactor that later, but right now, cleaning this up is not on our critical path. - - // Joint mapping from fst. FIXME: Do we need this??? - /*auto avatar = std::make_shared(); - QEventLoop loop; // Create an event loop that will quit when we get the finished signal - QObject::connect(avatar.get(), &AvatarData::jointMappingLoaded, &loop, &QEventLoop::quit); - avatar->setSkeletonModelURL(QUrl("https://hifi-public.s3.amazonaws.com/marketplace/contents/4a690585-3fa3-499e-9f8b-fd1226e561b1/e47e6898027aa40f1beb6adecc6a7db5.fst")); // Zach fst - loop.exec();*/ // Blocking all further tests until signalled. - - // Joint geometry from fbx. //#define FROM_FILE "/Users/howardstearns/howardHiFi/Zack.fbx" #ifdef FROM_FILE QFile file(FROM_FILE); @@ -81,8 +64,7 @@ void RigTests::initTestCase() { QCOMPARE(fbxHttpCode, 200); FBXGeometry geometry = readFBX(reply->readAll(), QVariantHash()); #endif - //QCOMPARE(geometry.joints.count(), avatar->getJointNames().count()); - + QVector jointStates; for (int i = 0; i < geometry.joints.size(); ++i) { // Note that if the geometry is stack allocated and goes away, so will the joints. Hence the heap copy here. @@ -97,24 +79,24 @@ void RigTests::initTestCase() { std::cout << "Rig is ready " << geometry.joints.count() << " joints " << std::endl; } -void reportJoint(int index, JointState joint) { // Handy for debugging +static void reportJoint(int index, JointState joint) { // Handy for debugging std::cout << "\n"; std::cout << index << " " << joint.getFBXJoint().name.toUtf8().data() << "\n"; std::cout << " pos:" << joint.getPosition() << "/" << joint.getPositionInParentFrame() << " from " << joint.getParentIndex() << "\n"; std::cout << " rot:" << safeEulerAngles(joint.getRotation()) << "/" << safeEulerAngles(joint.getRotationInParentFrame()) << "/" << safeEulerAngles(joint.getRotationInBindFrame()) << "\n"; std::cout << "\n"; } -void reportByName(RigPointer rig, const QString& name) { +static void reportByName(RigPointer rig, const QString& name) { int jointIndex = rig->indexOfJoint(name); reportJoint(jointIndex, rig->getJointState(jointIndex)); } -void reportAll(RigPointer rig) { +static void reportAll(RigPointer rig) { for (int i = 0; i < rig->getJointStateCount(); i++) { JointState joint = rig->getJointState(i); reportJoint(i, joint); } } -void reportSome(RigPointer rig) { +static void reportSome(RigPointer rig) { QString names[] = {"Head", "Neck", "RightShoulder", "RightArm", "RightForeArm", "RightHand", "Spine2", "Spine1", "Spine", "Hips", "RightUpLeg", "RightLeg", "RightFoot", "RightToeBase", "RightToe_End"}; for (auto name : names) { reportByName(rig, name); @@ -124,5 +106,4 @@ void reportSome(RigPointer rig) { void RigTests::initialPoseArmsDown() { //reportAll(_rig); reportSome(_rig); - QCOMPARE(false, true); }