Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements.h

Issue 2433253002: Add passive and FOV-locked properties to UI elements. (Closed)
Patch Set: Address nits. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_scene.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void Animate(int64_t time); 64 void Animate(int64_t time);
65 65
66 // Valid IDs are non-negative. 66 // Valid IDs are non-negative.
67 int id = -1; 67 int id = -1;
68 68
69 // If a non-negative parent ID is specified, applicable tranformations 69 // If a non-negative parent ID is specified, applicable tranformations
70 // are applied relative to the parent, rather than absolutely. 70 // are applied relative to the parent, rather than absolutely.
71 int parent_id = -1; 71 int parent_id = -1;
72 72
73 // If true, this object will be visible and accept input. 73 // If true, this object will be visible.
74 bool visible = true; 74 bool visible = true;
75 75
76 // If false, the reticle will not hit the element, even if visible.
77 bool hit_testable = true;
78
79 // If true, transformations will be applied relative to the field of view,
80 // rather than the world.
81 bool lock_to_fov = false;
82
76 // Specifies the region (in pixels) of a texture to render. 83 // Specifies the region (in pixels) of a texture to render.
77 Recti copy_rect = {0, 0, 0, 0}; 84 Recti copy_rect = {0, 0, 0, 0};
78 85
79 // The size of the object. This does not affect children. 86 // The size of the object. This does not affect children.
80 gvr::Vec3f size = {1.0f, 1.0f, 1.0f}; 87 gvr::Vec3f size = {1.0f, 1.0f, 1.0f};
81 88
82 // The scale of the object, and its children. 89 // The scale of the object, and its children.
83 gvr::Vec3f scale = {1.0f, 1.0f, 1.0f}; 90 gvr::Vec3f scale = {1.0f, 1.0f, 1.0f};
84 91
85 // The rotation of the object, and its children. 92 // The rotation of the object, and its children.
(...skipping 12 matching lines...) Expand all
98 // Animations that affect the properties of the object over time. 105 // Animations that affect the properties of the object over time.
99 std::vector<std::unique_ptr<Animation>> animations; 106 std::vector<std::unique_ptr<Animation>> animations;
100 107
101 private: 108 private:
102 DISALLOW_COPY_AND_ASSIGN(ContentRectangle); 109 DISALLOW_COPY_AND_ASSIGN(ContentRectangle);
103 }; 110 };
104 111
105 } // namespace vr_shell 112 } // namespace vr_shell
106 113
107 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ 114 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_scene.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698