Ocean
ACPlaneTracker6DOF.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_ARCORE_AC_PLANE_TRACKER_6_DOF_H
9 #define META_OCEAN_DEVICES_ARCORE_AC_PLANE_TRACKER_6_DOF_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Devices
20 {
21 
22 namespace ARCore
23 {
24 
25 /*
26  * This class implements the 6DOF plane tracker.
27  * @ingroup devicescore
28  */
29 class OCEAN_DEVICES_ARCORE_EXPORT ACPlaneTracker6DOF final :
30  virtual public ACDevice,
31  virtual public SceneTracker6DOF
32 {
33  friend class ARSessionManager;
34  friend class ACFactory;
35 
36  public:
37 
38  /**
39  * Returns the name of this tracker.
40  * @return The trackers's name
41  */
42  static inline std::string deviceNameACPlaneTracker6DOF();
43 
44  /**
45  * Returns the device type of this tracker.
46  * @return The tracker's device type
47  */
48  static inline DeviceType deviceTypeACPlaneTracker6DOF();
49 
50  protected:
51 
52  /**
53  * Creates a new 6DOF scene tracker.
54  */
56 
57  /**
58  * Destructs this 6DOF tracker.
59  */
60  ~ACPlaneTracker6DOF() override;
61 
62  /**
63  * Event function for new 6DOF transformations.
64  * @param world_T_camera The transformation between camera and world, invalid if unknown/lost
65  * @param planes The detected planes
66  * @param timestamp The timestamp of the new transformation
67  */
68  void onNewSample(const HomogenousMatrix4& world_T_camera, SceneTracker6DOF::SceneElementPlanes::Planes&& planes, const Timestamp& timestamp);
69 };
70 
72 {
73  return std::string("ARCore 6DOF Plane Tracker");
74 }
75 
77 {
79 }
80 
81 }
82 
83 }
84 
85 }
86 
87 #endif // META_OCEAN_DEVICES_ARCORE_AC_PLANE_TRACKER_6_DOF_H
This class implements a device for the ARCore library.
Definition: ACDevice.h:36
This class implements a device factory for the ARCore tracking library.
Definition: ACFactory.h:29
Definition: ACPlaneTracker6DOF.h:32
static std::string deviceNameACPlaneTracker6DOF()
Returns the name of this tracker.
Definition: ACPlaneTracker6DOF.h:71
static DeviceType deviceTypeACPlaneTracker6DOF()
Returns the device type of this tracker.
Definition: ACPlaneTracker6DOF.h:76
void onNewSample(const HomogenousMatrix4 &world_T_camera, SceneTracker6DOF::SceneElementPlanes::Planes &&planes, const Timestamp &timestamp)
Event function for new 6DOF transformations.
ACPlaneTracker6DOF()
Creates a new 6DOF scene tracker.
~ACPlaneTracker6DOF() override
Destructs this 6DOF tracker.
This class implements a wrapper around the actual ARCore tracker which may be used by several devices...
Definition: ARSessionManager.h:41
Definition of a class holding the major and minor device type.
Definition: devices/Device.h:62
std::vector< Plane > Planes
Definition of a vector holding planes.
Definition: SceneTracker6DOF.h:320
This class implements the base for all 6-DOF scene trackers.
Definition: SceneTracker6DOF.h:42
static DeviceType deviceTypeTracker6DOF()
Definition of this device type.
Definition: Tracker6DOF.h:100
@ TRACKER_VISUAL
Tracker using a visual input for their measurements.
Definition: devices/Tracker.h:62
@ SCENE_TRACKER_6DOF
6DOF scene tracker.
Definition: devices/Tracker.h:56
This class implements a timestamp.
Definition: Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15