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

Commit

Permalink
Improve depth sorting: do not clamp hitPoint used for ndc calculation (
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Sep 26, 2019
1 parent 6de9b52 commit 49ffa84
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) {
aPlacement.anchorX = 0.0f;
aPlacement.anchorY = 0.0f;
aPlacement.translationY = WidgetPlacement.dpDimension(getContext(), R.dimen.video_projection_menu_translation_y);
aPlacement.translationZ = 30.0f;
aPlacement.translationZ = 2.0f;
}

public void setParentWidget(UIWidget aParent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ public void run() {
mLibraryNotification.getPlacement().parentHandle = getHandle();
mLibraryNotification.getPlacement().anchorY = 0.0f;
mLibraryNotification.getPlacement().translationX = (offsetViewBounds.left + mBookmarksButton.getWidth() / 2.0f) * ratio;
mLibraryNotification.getPlacement().translationY = ((offsetViewBounds.top - 66) * ratio);
mLibraryNotification.getPlacement().translationZ = 38.0f;
mLibraryNotification.getPlacement().translationY = ((offsetViewBounds.top - 60) * ratio);
mLibraryNotification.getPlacement().translationZ = 25.0f;
mLibraryNotification.getPlacement().density = 3.0f;
mLibraryNotification.setText(R.string.bookmarks_saved_notification);
mLibraryNotification.setCurvedMode(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) {
aPlacement.anchorX = 0.0f;
aPlacement.anchorY = 0.0f;
aPlacement.translationY = WidgetPlacement.dpDimension(getContext(), R.dimen.video_projection_menu_translation_y);
aPlacement.translationZ = 30.0f;
aPlacement.translationZ = 2.0f;
}

public void setParentWidget(UIWidget aParent) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/cpp/BrowserWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,9 +1398,9 @@ BrowserWorld::ComputeNormalizedZ(const vrb::NodePtr& aNode) const {
bool inside = false;
float distance;
if (target->GetQuad()) {
target->GetQuad()->TestIntersection(headPosition, headDirection, hitPoint, normal, true, inside, distance);
target->GetQuad()->TestIntersection(headPosition, headDirection, hitPoint, normal, false, inside, distance);
} else if (target->GetCylinder()) {
target->GetCylinder()->TestIntersection(headPosition, headDirection, hitPoint, normal, true, inside, distance);
target->GetCylinder()->TestIntersection(headPosition, headDirection, hitPoint, normal, false, inside, distance);
}

const vrb::Matrix& projection = m.device->GetCamera(device::Eye::Left)->GetPerspective();
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

<!-- Video Projection Menu -->
<dimen name="video_projection_menu_width">330dp</dimen>
<dimen name="video_projection_menu_translation_y">15dp</dimen>
<dimen name="video_projection_menu_translation_y">7dp</dimen>

<!-- Brightness Menu -->
<dimen name="brightness_menu_width">150dp</dimen>
Expand Down

0 comments on commit 49ffa84

Please sign in to comment.