Ocean
Loading...
Searching...
No Matches
AKRoomPlanTracker6DOFBase.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_DEVICES_ARKIT_ROOMPLAN_NATIVE_AK_ROOM_PLAN_TRACKER_6_DOF_BASE_H
9#define META_OCEAN_DEVICES_ARKIT_ROOMPLAN_NATIVE_AK_ROOM_PLAN_TRACKER_6_DOF_BASE_H
10
13
15
17
18#include <ARKit/ARKit.h>
19#include <Foundation/Foundation.h>
20
21namespace Ocean
22{
23
24namespace Devices
25{
26
27namespace ARKit
28{
29
30/**
31 * This class implements the base class for the 6DOF RoomPlan tracker.
32 * @ingroup devicesarkit
33 */
35{
36 public:
37
38 /**
39 * Definition of individual instruction values.
40 */
41 enum InstructionValue : uint32_t
42 {
43 /// Unknown instruction.
45 /// Guidance instruction is: Move closer to wall.
47 /// Guidance instruction is: Move away from wall.
49 /// Guidance instruction is: Slow down.
51 /// Guidance instruction is: Tun on light.
53 /// Guidance instruction is: Normal.
55 /// Guidance instruction is: Low texture.
57 };
58
59 /**
60 * Re-definitino of PlanarRoomObject.
61 */
63
64 /**
65 * Re-definition of VolumetricRoomObject.
66 */
68
69 /**
70 * Re-definitino of SharedPlanarRoomObject.
71 */
73
74 /**
75 * Re-definition of SharedVolumetricRoomObject.
76 */
78
79 /**
80 * Re-definition of SharedPlanarRoomObjects.
81 */
83
84 /**
85 * Re-definition of SharedVolumetricRoomObjects.
86 */
88
89 public:
90
91 /**
92 * Event function for a new 6DOF pose.
93 * @param world_T_camera The transformation between camera and world, invalid if unknown/lost
94 * @param timestamp The timestamp of the new transformation
95 * @param arFrame The current ARFRame object containing additional data for the sample, must be valid
96 */
97 API_AVAILABLE(ios(11.0))
98 virtual void onNewSample(const HomogenousMatrix4& world_T_camera, const Timestamp& timestamp, ARFrame* arFrame) = 0;
99
100 /**
101 * Event function that the capture session has started.
102 */
103 virtual void onCaptureSessionStarted() = 0;
104
105 /**
106 * Event function for added room objects.
107 * @param planarRoomObjects The new planar objects
108 * @param volumetricRoomObjects The new volumetric objects
109 */
110 virtual void onCaptureSessionAdded(const SharedPlanarRoomObjects& planarRoomObjects, const SharedVolumetricRoomObjects& volumetricRoomObjects) = 0;
111
112 /**
113 * Event function for removed room objects.
114 * @param planarRoomObjects The removed planar objects
115 * @param volumetricRoomObjects The removed volumetric objects
116 */
117 virtual void onCaptureSessionRemoved(const SharedPlanarRoomObjects& planarRoomObjects, const SharedVolumetricRoomObjects& volumetricRoomObjects) = 0;
118
119 /**
120 * Event function for changed room objects.
121 * @param planarRoomObjects The changed planar objects
122 * @param volumetricRoomObjects The changed volumetric objects
123 */
124 virtual void onCaptureSessionChanged(const SharedPlanarRoomObjects& planarRoomObjects, const SharedVolumetricRoomObjects& volumetricRoomObjects) = 0;
125
126 /**
127 * Event function for updated room objects.
128 * @param planarRoomObjects The updated planar objects
129 * @param volumetricRoomObjects The updated volumetric objects
130 */
131 virtual void onCaptureSessionUpdated(const SharedPlanarRoomObjects& planarRoomObjects, const SharedVolumetricRoomObjects& volumetricRoomObjects) = 0;
132
133 /**
134 * Event function for instructions.
135 * @param instructionValue The instruction which can be used to improve the capture result
136 */
137 virtual void onCaptureSessionInstruction(const InstructionValue instructionValue) = 0;
138
139 /**
140 * Event function that the capture session has stopped.
141 */
142 virtual void onCaptureSessionStopped() = 0;
143
144 protected:
145
146 /**
147 * Translates the instruction value.
148 * @return The translated instruction
149 */
150 static std::string translateInstruction(const InstructionValue instructionValue);
151};
152
153}
154
155}
156
157}
158
159#endif // META_OCEAN_DEVICES_ARKIT_ROOMPLAN_NATIVE_AK_ROOM_PLAN_TRACKER_6_DOF_BASE_H
This class implements the base class for the 6DOF RoomPlan tracker.
Definition AKRoomPlanTracker6DOFBase.h:35
SceneTracker6DOF::SceneElementRoom::SharedVolumetricRoomObject SharedVolumetricRoomObject
Re-definition of SharedVolumetricRoomObject.
Definition AKRoomPlanTracker6DOFBase.h:77
virtual void onCaptureSessionChanged(const SharedPlanarRoomObjects &planarRoomObjects, const SharedVolumetricRoomObjects &volumetricRoomObjects)=0
Event function for changed room objects.
const Timestamp ARFrame * arFrame
Definition AKRoomPlanTracker6DOFBase.h:98
SceneTracker6DOF::SceneElementRoom::SharedVolumetricRoomObjects SharedVolumetricRoomObjects
Re-definition of SharedVolumetricRoomObjects.
Definition AKRoomPlanTracker6DOFBase.h:87
SceneTracker6DOF::SceneElementRoom::SharedPlanarRoomObjects SharedPlanarRoomObjects
Re-definition of SharedPlanarRoomObjects.
Definition AKRoomPlanTracker6DOFBase.h:82
virtual void onCaptureSessionInstruction(const InstructionValue instructionValue)=0
Event function for instructions.
SceneTracker6DOF::SceneElementRoom::SharedPlanarRoomObject SharedPlanarRoomObject
Re-definitino of SharedPlanarRoomObject.
Definition AKRoomPlanTracker6DOFBase.h:72
static std::string translateInstruction(const InstructionValue instructionValue)
Translates the instruction value.
virtual void onCaptureSessionAdded(const SharedPlanarRoomObjects &planarRoomObjects, const SharedVolumetricRoomObjects &volumetricRoomObjects)=0
Event function for added room objects.
virtual void onCaptureSessionRemoved(const SharedPlanarRoomObjects &planarRoomObjects, const SharedVolumetricRoomObjects &volumetricRoomObjects)=0
Event function for removed room objects.
API_AVAILABLE(ios(11.0)) virtual void onNewSample(const HomogenousMatrix4 &world_T_camera
Event function for a new 6DOF pose.
const Timestamp & timestamp
Definition AKRoomPlanTracker6DOFBase.h:98
virtual void onCaptureSessionStarted()=0
Event function that the capture session has started.
InstructionValue
Definition of individual instruction values.
Definition AKRoomPlanTracker6DOFBase.h:42
@ IV_MOVE_CLOSE_TO_WALL
Guidance instruction is: Move closer to wall.
Definition AKRoomPlanTracker6DOFBase.h:46
@ IV_LOW_TEXTURE
Guidance instruction is: Low texture.
Definition AKRoomPlanTracker6DOFBase.h:56
@ IV_SLOW_DOWN
Guidance instruction is: Slow down.
Definition AKRoomPlanTracker6DOFBase.h:50
@ IV_UNKNOWN
Unknown instruction.
Definition AKRoomPlanTracker6DOFBase.h:44
@ IV_TURN_ON_LIGHT
Guidance instruction is: Tun on light.
Definition AKRoomPlanTracker6DOFBase.h:52
@ IV_MOVE_AWAY_FROM_WALL
Guidance instruction is: Move away from wall.
Definition AKRoomPlanTracker6DOFBase.h:48
@ IV_NORMAL
Guidance instruction is: Normal.
Definition AKRoomPlanTracker6DOFBase.h:54
virtual void onCaptureSessionStopped()=0
Event function that the capture session has stopped.
virtual void onCaptureSessionUpdated(const SharedPlanarRoomObjects &planarRoomObjects, const SharedVolumetricRoomObjects &volumetricRoomObjects)=0
Event function for updated room objects.
This class implements a room object which is planar/flat.
Definition SceneTracker6DOF.h:650
This class implements a room object which is volumetric.
Definition SceneTracker6DOF.h:716
std::shared_ptr< VolumetricRoomObject > SharedVolumetricRoomObject
Definition of a shared pointer holding a volumetric room object.
Definition SceneTracker6DOF.h:820
std::vector< SharedVolumetricRoomObject > SharedVolumetricRoomObjects
Definition of a vector holding volumetric room objects.
Definition SceneTracker6DOF.h:835
std::vector< SharedPlanarRoomObject > SharedPlanarRoomObjects
Definition of a vector holding planar room objects.
Definition SceneTracker6DOF.h:830
std::shared_ptr< PlanarRoomObject > SharedPlanarRoomObject
Definition of a shared pointer holding a planar room object.
Definition SceneTracker6DOF.h:815
This class implements a timestamp.
Definition Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15