mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 05:23:33 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into pointy
This commit is contained in:
commit
a59fbfbf3e
4 changed files with 7 additions and 5 deletions
|
@ -318,6 +318,7 @@ Audio::Audio(Oscilloscope* scope, int16_t initialJitterBufferSamples) :
|
||||||
_lastAcceleration(0),
|
_lastAcceleration(0),
|
||||||
_totalPacketsReceived(0),
|
_totalPacketsReceived(0),
|
||||||
_firstPacketReceivedTime(),
|
_firstPacketReceivedTime(),
|
||||||
|
_echoSamplesLeft(NULL),
|
||||||
_packetsReceivedThisPlayback(0),
|
_packetsReceivedThisPlayback(0),
|
||||||
_isSendingEchoPing(false),
|
_isSendingEchoPing(false),
|
||||||
_pingAnalysisPending(false),
|
_pingAnalysisPending(false),
|
||||||
|
|
|
@ -235,7 +235,7 @@ void Webcam::setFrame(const Mat& color, int format, const Mat& depth, const Mat&
|
||||||
if (!_joints[i].isValid) {
|
if (!_joints[i].isValid) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const float JOINT_SMOOTHING = 0.9f;
|
const float JOINT_SMOOTHING = 0.5f;
|
||||||
_estimatedJoints[i].isValid = true;
|
_estimatedJoints[i].isValid = true;
|
||||||
_estimatedJoints[i].position = glm::mix(_joints[i].position - origin,
|
_estimatedJoints[i].position = glm::mix(_joints[i].position - origin,
|
||||||
_estimatedJoints[i].position, JOINT_SMOOTHING);
|
_estimatedJoints[i].position, JOINT_SMOOTHING);
|
||||||
|
|
|
@ -1230,8 +1230,8 @@ glm::quat Avatar::computeRotationFromBodyToWorldUp(float proportion) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
float Avatar::getBallRenderAlpha(int ball, bool lookingInMirror) const {
|
float Avatar::getBallRenderAlpha(int ball, bool lookingInMirror) const {
|
||||||
const float RENDER_OPAQUE_OUTSIDE = 1.25f; // render opaque if greater than this distance
|
const float RENDER_OPAQUE_OUTSIDE = 0.25f; // render opaque if greater than this distance
|
||||||
const float DO_NOT_RENDER_INSIDE = 0.75f; // do not render if less than this distance
|
const float DO_NOT_RENDER_INSIDE = 0.25f; // do not render if less than this distance
|
||||||
float distanceToCamera = glm::length(Application::getInstance()->getCamera()->getPosition() - _bodyBall[ball].position);
|
float distanceToCamera = glm::length(Application::getInstance()->getCamera()->getPosition() - _bodyBall[ball].position);
|
||||||
return (lookingInMirror || !isMyAvatar()) ? 1.0f : glm::clamp(
|
return (lookingInMirror || !isMyAvatar()) ? 1.0f : glm::clamp(
|
||||||
(distanceToCamera - DO_NOT_RENDER_INSIDE) / (RENDER_OPAQUE_OUTSIDE - DO_NOT_RENDER_INSIDE), 0.f, 1.f);
|
(distanceToCamera - DO_NOT_RENDER_INSIDE) / (RENDER_OPAQUE_OUTSIDE - DO_NOT_RENDER_INSIDE), 0.f, 1.f);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "PacketHeaders.h"
|
#include "PacketHeaders.h"
|
||||||
|
#include "Log.h"
|
||||||
|
|
||||||
PACKET_VERSION versionForPacketType(PACKET_TYPE type) {
|
PACKET_VERSION versionForPacketType(PACKET_TYPE type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -24,7 +25,7 @@ bool packetVersionMatch(unsigned char* packetHeader) {
|
||||||
if (packetHeader[1] == versionForPacketType(packetHeader[0])) {
|
if (packetHeader[1] == versionForPacketType(packetHeader[0])) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
printf("There is a packet version mismatch for packet with header %c\n", packetHeader[0]);
|
printLog("There is a packet version mismatch for packet with header %c\n", packetHeader[0]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue