mirror of
https://github.com/lubosz/overte.git
synced 2025-04-15 19:47:38 +02:00
Fixed tab issues.
This commit is contained in:
parent
773563850c
commit
d446640bc8
2 changed files with 31 additions and 31 deletions
|
@ -68,10 +68,10 @@ AvatarData::AvatarData() :
|
|||
_errorLogExpiry(0),
|
||||
_owningAvatarMixer(),
|
||||
_targetVelocity(0.0f),
|
||||
_smoothOrientationTime(SMOOTH_TIME_ORIENTATION),
|
||||
_smoothOrientationTimer(std::numeric_limits<float>::max()),
|
||||
_smoothOrientationInitial(),
|
||||
_smoothOrientationTarget()
|
||||
_smoothOrientationTime(SMOOTH_TIME_ORIENTATION),
|
||||
_smoothOrientationTimer(std::numeric_limits<float>::max()),
|
||||
_smoothOrientationInitial(),
|
||||
_smoothOrientationTarget()
|
||||
{
|
||||
setBodyPitch(0.0f);
|
||||
setBodyYaw(-90.0f);
|
||||
|
@ -1496,14 +1496,14 @@ void AvatarData::parseAvatarIdentityPacket(const QByteArray& data, Identity& ide
|
|||
}
|
||||
|
||||
glm::quat AvatarData::getLocalOrientation() const {
|
||||
if (!isMyAvatar() || (_smoothOrientationTimer > _smoothOrientationTime)) {
|
||||
return (SpatiallyNestable::getLocalOrientation());
|
||||
}
|
||||
if (!isMyAvatar() || (_smoothOrientationTimer > _smoothOrientationTime)) {
|
||||
return (SpatiallyNestable::getLocalOrientation());
|
||||
}
|
||||
|
||||
// Smooth the remote avatar movement.
|
||||
float t = _smoothOrientationTimer / _smoothOrientationTime;
|
||||
float l = easeInOutQuad(glm::clamp(t, 0.0f, 1.0f));
|
||||
return (slerp(_smoothOrientationInitial, _smoothOrientationTarget, l));
|
||||
// Smooth the remote avatar movement.
|
||||
float t = _smoothOrientationTimer / _smoothOrientationTime;
|
||||
float l = easeInOutQuad(glm::clamp(t, 0.0f, 1.0f));
|
||||
return (slerp(_smoothOrientationInitial, _smoothOrientationTarget, l));
|
||||
}
|
||||
|
||||
static const QUrl emptyURL("");
|
||||
|
|
|
@ -602,10 +602,10 @@ public:
|
|||
return _lastSentJointData;
|
||||
}
|
||||
|
||||
// Overload the local orientation function for this.
|
||||
virtual glm::quat getLocalOrientation() const override;
|
||||
// Overload the local orientation function for this.
|
||||
virtual glm::quat getLocalOrientation() const override;
|
||||
|
||||
static const float OUT_OF_VIEW_PENALTY;
|
||||
static const float OUT_OF_VIEW_PENALTY;
|
||||
|
||||
static void sortAvatars(
|
||||
QList<AvatarSharedPointer> avatarList,
|
||||
|
@ -621,18 +621,18 @@ public:
|
|||
static float _avatarSortCoefficientCenter;
|
||||
static float _avatarSortCoefficientAge;
|
||||
|
||||
// Basic ease-in-ease-out function for smoothing values.
|
||||
static inline float easeInOutQuad(float lerpValue) {
|
||||
assert(!((lerpValue < 0.0f) || (lerpValue > 1.0f)));
|
||||
// Basic ease-in-ease-out function for smoothing values.
|
||||
static inline float easeInOutQuad(float lerpValue) {
|
||||
assert(!((lerpValue < 0.0f) || (lerpValue > 1.0f)));
|
||||
|
||||
if (lerpValue < 0.5f) {
|
||||
return (2.0f * lerpValue * lerpValue);
|
||||
}
|
||||
if (lerpValue < 0.5f) {
|
||||
return (2.0f * lerpValue * lerpValue);
|
||||
}
|
||||
|
||||
return (lerpValue*(4.0f - 2.0f * lerpValue) - 1.0f);
|
||||
}
|
||||
return (lerpValue*(4.0f - 2.0f * lerpValue) - 1.0f);
|
||||
}
|
||||
|
||||
bool getIdentityDataChanged() const { return _identityDataChanged; } // has the identity data changed since the last time sendIdentityPacket() was called
|
||||
bool getIdentityDataChanged() const { return _identityDataChanged; } // has the identity data changed since the last time sendIdentityPacket() was called
|
||||
void markIdentityDataChanged() {
|
||||
_identityDataChanged = true;
|
||||
_identityUpdatedAt = usecTimestampNow();
|
||||
|
@ -795,16 +795,16 @@ protected:
|
|||
quint64 _audioLoudnessChanged { 0 };
|
||||
float _audioAverageLoudness { 0.0f };
|
||||
|
||||
// Smoothing.
|
||||
const float SMOOTH_TIME_ORIENTATION = 0.15f;
|
||||
// Smoothing.
|
||||
const float SMOOTH_TIME_ORIENTATION = 0.15f;
|
||||
|
||||
// Smoothing data for blending from one position/orientation to another on remote agents.
|
||||
float _smoothOrientationTime;
|
||||
float _smoothOrientationTimer;
|
||||
glm::quat _smoothOrientationInitial;
|
||||
glm::quat _smoothOrientationTarget;
|
||||
// Smoothing data for blending from one position/orientation to another on remote agents.
|
||||
float _smoothOrientationTime;
|
||||
float _smoothOrientationTimer;
|
||||
glm::quat _smoothOrientationInitial;
|
||||
glm::quat _smoothOrientationTarget;
|
||||
|
||||
bool _identityDataChanged { false };
|
||||
bool _identityDataChanged { false };
|
||||
quint64 _identityUpdatedAt { 0 };
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue