diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 74f36e858e..4de3d9bb4e 100755 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -594,13 +594,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent } } - // AJT: hand controller section IF_AVATAR_SPACE(PACKET_HAS_HAND_CONTROLLERS, AvatarDataPacket::HAND_CONTROLLERS_SIZE) { - - qDebug() << "AJT: sending hand controllers!"; - - // AJT: TODO - //auto startSection = destinationBuffer; + auto startSection = destinationBuffer; Transform controllerLeftHandTransform = Transform(getControllerLeftHandMatrix()); destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, controllerLeftHandTransform.getRotation()); @@ -610,12 +605,10 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent destinationBuffer += packOrientationQuatToSixBytes(destinationBuffer, controllerRightHandTransform.getRotation()); destinationBuffer += packFloatVec3ToSignedTwoByteFixed(destinationBuffer, controllerRightHandTransform.getTranslation(), HAND_CONTROLLER_COMPRESSION_RADIX); - /* AJT: TODO int numBytes = destinationBuffer - startSection; if (outboundDataRateOut) { outboundDataRateOut->handControllersRate.increment(numBytes); } - */ } const auto& blendshapeCoefficients = _headData->getBlendshapeCoefficients(); @@ -1244,21 +1237,15 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { _localPositionUpdateRate.increment(); } - // AJT: hand controller section if (hasHandControllers) { - - qDebug() << "AJT: received hand controllers!"; - - // AJT: TODO - // auto startSection = sourceBuffer; + auto startSection = sourceBuffer; sourceBuffer = unpackHandController(sourceBuffer, _controllerLeftHandMatrixCache); sourceBuffer = unpackHandController(sourceBuffer, _controllerRightHandMatrixCache); - // AJT: TODO - // int numBytesRead = sourceBuffer - startSection; - // _handControllerUpdateRate.increment(numBytesRead); - // _handControllerUpdateRate.increment(); + int numBytesRead = sourceBuffer - startSection; + _handControllersRate.increment(numBytesRead); + _handControllersUpdateRate.increment(); } else { _controllerLeftHandMatrixCache.invalidate(); _controllerRightHandMatrixCache.invalidate(); @@ -1465,6 +1452,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { *
*"globalPosition"
"localPosition"
"handControllers"
"avatarBoundingBox"
"avatarOrientation"
"avatarScale"
"globalPosition"
"localPosition"
"handControllers"
"avatarBoundingBox"
"avatarOrientation"
"avatarScale"