Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Pico v10 Preview 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Apr 17, 2020
1 parent 73707a7 commit 9b36c14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk
versionCode 1
versionName "10"
versionName "10-p2"
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
buildConfigField "Boolean", "DISABLE_CRASH_RESTART", getCrashRestartDisabled()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
17 changes: 12 additions & 5 deletions app/src/picovr/cpp/DeviceDelegatePicoVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ struct DeviceDelegatePicoVR::State {
}
auto& controller = controllers[i];
device::CapabilityFlags flags = device::Orientation;
if (controller.is6DoF) {
//if (controller.is6DoF) {
flags |= device::Position;
}
//}
controllerDelegate->SetCapabilityFlags(i, flags);
const bool appPressed = (controller.buttonsState & kButtonApp) > 0;
const bool triggerPressed = (controller.buttonsState & kButtonTrigger) > 0;
Expand Down Expand Up @@ -231,12 +231,17 @@ struct DeviceDelegatePicoVR::State {
}

vrb::Matrix transform = controller.transform;
if ((renderMode == device::RenderMode::StandAlone) && (i != gazeIndex)) {
//if ((renderMode == device::RenderMode::StandAlone) && (i != gazeIndex)) {
if (i != gazeIndex) {
if (type == k6DofHeadSet) {
transform.TranslateInPlace(headOffset);
if(renderMode == device::RenderMode::StandAlone) {
transform.TranslateInPlace(headOffset);
}
} else {
vrb::Matrix head = vrb::Matrix::Rotation(orientation);
head.PreMultiplyInPlace(vrb::Matrix::Position(headOffset));
if (renderMode == device::RenderMode::StandAlone) {
head.PreMultiplyInPlace(vrb::Matrix::Position(headOffset));
}
transform = elbow->GetTransform(controller.hand, head, transform);
}
}
Expand Down Expand Up @@ -293,6 +298,8 @@ DeviceDelegatePicoVR::RegisterImmersiveDisplay(ImmersiveDisplayPtr aDisplay) {
device::ImmersiveVRSession | device::InlineSession;
if (m.type == k6DofHeadSet) {
flags |= device::Position | device::StageParameters;
} else {
flags |= device::Position;
}
m.immersiveDisplay->SetSittingToStandingTransform(vrb::Matrix::Translation(kAverageSittingToStanding));
m.immersiveDisplay->SetCapabilityFlags(flags);
Expand Down

0 comments on commit 9b36c14

Please sign in to comment.