mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into safe-avatar-list-access
This commit is contained in:
commit
9e223a9502
6 changed files with 13 additions and 6 deletions
|
@ -366,7 +366,7 @@ const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars
|
|||
if (offsetLength > MIN_HIPS_OFFSET_LENGTH) {
|
||||
// but only if offset is long enough
|
||||
float scaleFactor = ((offsetLength - MIN_HIPS_OFFSET_LENGTH) / offsetLength);
|
||||
_relativePoses[0].trans = underPoses[0].trans + scaleFactor * _hipsOffset;
|
||||
_relativePoses[_hipsIndex].trans = underPoses[_hipsIndex].trans + scaleFactor * _hipsOffset;
|
||||
}
|
||||
|
||||
solveWithCyclicCoordinateDescent(targets);
|
||||
|
@ -758,8 +758,10 @@ void AnimInverseKinematics::setSkeletonInternal(AnimSkeleton::ConstPointer skele
|
|||
if (skeleton) {
|
||||
initConstraints();
|
||||
_headIndex = _skeleton->nameToJointIndex("Head");
|
||||
_hipsIndex = _skeleton->nameToJointIndex("Hips");
|
||||
} else {
|
||||
clearConstraints();
|
||||
_headIndex = -1;
|
||||
_hipsIndex = -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ protected:
|
|||
|
||||
// experimental data for moving hips during IK
|
||||
int _headIndex = -1;
|
||||
int _hipsIndex = -1;
|
||||
glm::vec3 _hipsOffset = Vectors::ZERO;
|
||||
|
||||
// _maxTargetIndex is tracked to help optimize the recalculation of absolute poses
|
||||
|
|
|
@ -167,7 +167,10 @@ void SixenseManager::update(float deltaTime, bool jointsCaptured) {
|
|||
|
||||
if (sixenseGetNumActiveControllers() == 0) {
|
||||
if (_hydrasConnected) {
|
||||
qCDebug(inputplugins, "hydra disconnected");
|
||||
qCDebug(inputplugins) << "hydra disconnected" << _badDataCount;
|
||||
if (_badDataCount++ < _allowedBadDataCount) { // gotta get some no-active in a row before we shut things down
|
||||
return;
|
||||
}
|
||||
}
|
||||
_hydrasConnected = false;
|
||||
if (_deviceID != 0) {
|
||||
|
@ -181,6 +184,7 @@ void SixenseManager::update(float deltaTime, bool jointsCaptured) {
|
|||
PerformanceTimer perfTimer("sixense");
|
||||
if (!_hydrasConnected) {
|
||||
_hydrasConnected = true;
|
||||
_badDataCount = 0;
|
||||
registerToUserInputMapper(*userInputMapper);
|
||||
assignDefaultInputMapping(*userInputMapper);
|
||||
UserActivityLogger::getInstance().connectedDevice("spatial_controller", "hydra");
|
||||
|
@ -555,6 +559,7 @@ void SixenseManager::saveSettings() const {
|
|||
settings.setVec3Value(QString("avatarPosition"), _avatarPosition);
|
||||
settings.setQuatValue(QString("avatarRotation"), _avatarRotation);
|
||||
settings.setValue(QString("reachLength"), QVariant(_reachLength));
|
||||
settings.setValue(QString("allowedHydraFailures"), 120);
|
||||
}
|
||||
settings.endGroup();
|
||||
}
|
||||
|
@ -567,6 +572,7 @@ void SixenseManager::loadSettings() {
|
|||
settings.getVec3ValueIfValid(QString("avatarPosition"), _avatarPosition);
|
||||
settings.getQuatValueIfValid(QString("avatarRotation"), _avatarRotation);
|
||||
settings.getFloatValueIfValid(QString("reachLength"), _reachLength);
|
||||
_allowedBadDataCount = settings.value(QString("allowedHydraFailures"), 120).toInt();
|
||||
}
|
||||
settings.endGroup();
|
||||
}
|
||||
|
|
|
@ -114,6 +114,8 @@ private:
|
|||
#endif
|
||||
|
||||
bool _hydrasConnected;
|
||||
int _badDataCount;
|
||||
int _allowedBadDataCount;
|
||||
|
||||
static const QString NAME;
|
||||
static const QString HYDRA_ID_STRING;
|
||||
|
|
|
@ -8,6 +8,4 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
|
|||
# link in the shared libraries
|
||||
link_hifi_libraries(render-utils gpu shared)
|
||||
|
||||
message(${PROJECT_BINARY_DIR})
|
||||
|
||||
copy_dlls_beside_windows_executable()
|
||||
|
|
|
@ -17,6 +17,4 @@ include_directories("${PROJECT_BINARY_DIR}/../../libraries/render-utils/")
|
|||
include_directories("${PROJECT_BINARY_DIR}/../../libraries/entities-renderer/")
|
||||
include_directories("${PROJECT_BINARY_DIR}/../../libraries/model/")
|
||||
|
||||
message(${PROJECT_BINARY_DIR})
|
||||
|
||||
copy_dlls_beside_windows_executable()
|
||||
|
|
Loading…
Reference in a new issue