Ocean
ACWorldTracker6DOF.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_WORLD_TRACKER_6_DOF_H
9 #define META_OCEAN_DEVICES_ARCORE_AC_WORLD_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 world tracker.
27  * @ingroup devicescore
28  */
29 class OCEAN_DEVICES_ARCORE_EXPORT ACWorldTracker6DOF final :
30  virtual public ACDevice,
31  virtual public Tracker6DOF
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 deviceNameACWorldTracker6DOF();
43 
44  /**
45  * Returns the device type of this tracker.
46  * @return The tracker's device type
47  */
48  static inline DeviceType deviceTypeACWorldTracker6DOF();
49 
50  protected:
51 
52  /**
53  * Creates a new 6DOF world tracker.
54  */
56 
57  /**
58  * Destructs this 6DOF tracker.
59  */
60  ~ACWorldTracker6DOF() 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 timestamp The timestamp of the new transformation
66  */
67  void onNewSample(const HomogenousMatrix4& world_T_camera, const Timestamp& timestamp);
68 };
69 
71 {
72  return std::string("ARCore 6DOF World Tracker");
73 }
74 
76 {
78 }
79 
80 }
81 
82 }
83 
84 }
85 
86 #endif // META_OCEAN_DEVICES_ARCORE_AC_WORLD_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: ACWorldTracker6DOF.h:32
static DeviceType deviceTypeACWorldTracker6DOF()
Returns the device type of this tracker.
Definition: ACWorldTracker6DOF.h:75
~ACWorldTracker6DOF() override
Destructs this 6DOF tracker.
static std::string deviceNameACWorldTracker6DOF()
Returns the name of this tracker.
Definition: ACWorldTracker6DOF.h:70
ACWorldTracker6DOF()
Creates a new 6DOF world tracker.
void onNewSample(const HomogenousMatrix4 &world_T_camera, const Timestamp &timestamp)
Event function for new 6DOF transformations.
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
This class implements the base for all 6DOF trackers.
Definition: Tracker6DOF.h:39
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
This class implements a timestamp.
Definition: Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15