mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
commit
f0460bac5f
5 changed files with 20 additions and 3 deletions
|
@ -824,6 +824,10 @@ void Menu::editPreferences() {
|
|||
leanScale->setValue(applicationInstance->getAvatar()->getLeanScale());
|
||||
form->addRow("Lean Scale:", leanScale);
|
||||
|
||||
QDoubleSpinBox* avatarScale = new QDoubleSpinBox();
|
||||
avatarScale->setValue(applicationInstance->getAvatar()->getScale());
|
||||
form->addRow("Avatar Scale:", avatarScale);
|
||||
|
||||
QSpinBox* audioJitterBufferSamples = new QSpinBox();
|
||||
audioJitterBufferSamples->setMaximum(10000);
|
||||
audioJitterBufferSamples->setMinimum(-10000);
|
||||
|
@ -887,6 +891,7 @@ void Menu::editPreferences() {
|
|||
_maxVoxelPacketsPerSecond = maxVoxelsPPS->value();
|
||||
|
||||
applicationInstance->getAvatar()->setLeanScale(leanScale->value());
|
||||
applicationInstance->getAvatar()->setNewScale(avatarScale->value());
|
||||
|
||||
_audioJitterBufferSamples = audioJitterBufferSamples->value();
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include "devices/SerialInterface.h"
|
||||
#include "devices/Transmitter.h"
|
||||
|
||||
static const float MAX_SCALE = 1000.f;
|
||||
static const float MIN_SCALE = .005f;
|
||||
static const float SCALING_RATIO = .05f;
|
||||
static const float SMOOTHING_RATIO = .05f; // 0 < ratio < 1
|
||||
static const float RESCALING_TOLERANCE = .02f;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <QPushButton>
|
||||
#include <QCheckBox>
|
||||
#include <QSyntaxHighlighter>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "AbstractLoggerInterface.h"
|
||||
|
||||
|
|
|
@ -295,3 +295,13 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
|
||||
return sourceBuffer - startPosition;
|
||||
}
|
||||
|
||||
void AvatarData::setNewScale(float newScale) {
|
||||
if (newScale > MAX_SCALE) {
|
||||
newScale = MAX_SCALE;
|
||||
} else if (newScale < MIN_SCALE) {
|
||||
newScale = MIN_SCALE;
|
||||
}
|
||||
_newScale = newScale;
|
||||
qDebug() << "Changed scale to " << _newScale << "\n";
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@ const int HAND_STATE_START_BIT = 2; // 3rd and 4th bits
|
|||
const int IS_FACESHIFT_CONNECTED = 4; // 5th bit
|
||||
const int IS_CHAT_CIRCLING_ENABLED = 5;
|
||||
|
||||
static const float MAX_SCALE = 1000.f;
|
||||
static const float MIN_SCALE = .005f;
|
||||
|
||||
const float MAX_AUDIO_LOUDNESS = 1000.0; // close enough for mouth animation
|
||||
|
||||
enum KeyState
|
||||
|
@ -80,7 +83,7 @@ public:
|
|||
|
||||
// Scale
|
||||
float getNewScale() const { return _newScale; }
|
||||
void setNewScale(float newScale) { _newScale = newScale; }
|
||||
void setNewScale(float);
|
||||
|
||||
// Hand State
|
||||
void setHandState(char s) { _handState = s; }
|
||||
|
|
Loading…
Reference in a new issue