Ocean
Loading...
Searching...
No Matches
VRTableMenu.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) Meta Platforms, Inc. and affiliates.
3
*
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
*/
7
8
#ifndef META_OCEAN_PLATFORM_META_QUEST_OPENXR_APPLICATION_VR_TABLE_MENU_H
9
#define META_OCEAN_PLATFORM_META_QUEST_OPENXR_APPLICATION_VR_TABLE_MENU_H
10
11
#include "
ocean/platform/meta/quest/openxr/application/Application.h
"
12
13
#include "
ocean/platform/meta/quest/application/VRTableMenuBase.h
"
14
15
#include "
ocean/platform/meta/quest/openxr/TrackedController.h
"
16
17
namespace
Ocean
18
{
19
20
namespace
Platform
21
{
22
23
namespace
Meta
24
{
25
26
namespace
Quest
27
{
28
29
namespace
OpenXR
30
{
31
32
namespace
Application
33
{
34
35
/**
36
* The class implements a simple table-based menu for VR application.
37
* The menu is composed of sections and menu entries.<br>
38
* Based on controller tracking, the menu entries can be selected.
39
* @ingroup platformmetaquestopenxrapplication
40
*/
41
class
OCEAN_PLATFORM_META_QUEST_OPENXR_APPLICATION_EXPORT
VRTableMenu
final :
public
Quest::Application::VRTableMenuBase
42
{
43
public
:
44
45
/**
46
* Creates a new invalid menu object.
47
*/
48
VRTableMenu
() =
default
;
49
50
/**
51
* Move constructor.
52
* @param menu The menu object to be moved
53
*/
54
VRTableMenu
(
VRTableMenu
&& menu) =
default
;
55
56
/**
57
* Creates a new valid menu object.
58
* @param engine The rendering engine which will be used to render the menu, must be valid
59
* @param framebuffer The framebuffer associated with the rendering engine to which the menu will be rendered
60
*/
61
inline
VRTableMenu
(
const
Rendering::EngineRef
& engine,
const
Rendering::FramebufferRef
& framebuffer);
62
63
/**
64
* Events function called before the menu is rendered.
65
* @param trackedController The tracked controller providing access to the controller tracking, must be valid
66
* @param renderTimestamp The timestamp when the menu will be rendered
67
* @param url The resulting menu entry url in case an entry was selected
68
* @return True, if an entry was selected; False, if no entry was selected
69
*/
70
bool
onPreRender
(
TrackedController
& trackedController,
const
Timestamp
& renderTimestamp, std::string& url);
71
72
/**
73
* Move operator.
74
* @param menu The menu object to be moved
75
* @return Reference to this object
76
*/
77
VRTableMenu
&
operator=
(
VRTableMenu
&& menu) =
default
;
78
79
protected
:
80
81
/**
82
* Disabled copy constructor.
83
*/
84
VRTableMenu
(
const
VRTableMenu
&) =
delete
;
85
86
/**
87
* Disabled copy operator.
88
* @param menu The menu object which would be copied
89
* @return The reference to this object
90
*/
91
VRTableMenu
&
operator=
(
const
VRTableMenu
& menu) =
delete
;
92
};
93
94
inline
VRTableMenu::VRTableMenu
(
const
Rendering::EngineRef
& engine,
const
Rendering::FramebufferRef
& framebuffer) :
95
VRTableMenuBase(engine, framebuffer)
96
{
97
// nothing to do here
98
}
99
100
}
101
102
}
103
104
}
105
106
}
107
108
}
109
110
}
111
112
#endif
// META_OCEAN_PLATFORM_META_QUEST_OPENXR_APPLICATION_VR_TABLE_MENU_H
TrackedController.h
VRTableMenuBase.h
Ocean::ObjectRef< Engine >
Ocean::Platform::Meta::Quest::Application::VRTableMenuBase
The class implements the base class for a simple table-based menu for VR application.
Definition
VRTableMenuBase.h:45
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu
The class implements a simple table-based menu for VR application.
Definition
VRTableMenu.h:42
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu::VRTableMenu
VRTableMenu()=default
Creates a new invalid menu object.
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu::operator=
VRTableMenu & operator=(const VRTableMenu &menu)=delete
Disabled copy operator.
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu::VRTableMenu
VRTableMenu(VRTableMenu &&menu)=default
Move constructor.
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu::operator=
VRTableMenu & operator=(VRTableMenu &&menu)=default
Move operator.
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu::onPreRender
bool onPreRender(TrackedController &trackedController, const Timestamp &renderTimestamp, std::string &url)
Events function called before the menu is rendered.
Ocean::Platform::Meta::Quest::OpenXR::Application::VRTableMenu::VRTableMenu
VRTableMenu(const VRTableMenu &)=delete
Disabled copy constructor.
Ocean::Platform::Meta::Quest::OpenXR::TrackedController
This class implements a wrapper for tracker controllers.
Definition
TrackedController.h:40
Ocean::SmartObjectRef< Framebuffer >
Ocean::Timestamp
This class implements a timestamp.
Definition
Timestamp.h:36
Application.h
Ocean
The namespace covering the entire Ocean framework.
Definition
Accessor.h:15
impl
ocean
platform
meta
quest
openxr
application
VRTableMenu.h
Generated on Fri Feb 21 2025 06:03:47 for Ocean by
1.9.8