Ocean
ACSceneTracker6DOF.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_SCENE_TRACKER_6_DOF_H
9 #define META_OCEAN_DEVICES_ARCORE_AC_SCENE_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 scene tracker.
27  * @ingroup devicescore
28  */
29 class OCEAN_DEVICES_ARCORE_EXPORT ACSceneTracker6DOF 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 deviceNameACSceneTracker6DOF();
43 
44  /**
45  * Returns the device type of this tracker.
46  * @return The tracker's device type
47  */
48  static inline DeviceType deviceTypeACSceneTracker6DOF();
49 
50  protected:
51 
52  /**
53  * Creates a new 6DOF scene tracker.
54  */
56 
57  /**
58  * Destructs this 6DOF tracker.
59  */
60  ~ACSceneTracker6DOF() 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 objectPoints The 3D object points the tracker has used to determine the current pose, in world, may be empty
66  * @param objectPointIds The ids of the object points, one for each object point
67  * @param timestamp The timestamp of the new transformation
68  */
69  void onNewSample(const HomogenousMatrix4& world_T_camera, Vectors3&& objectPoints, Indices64&& objectPointIds, const Timestamp& timestamp);
70 };
71 
73 {
74  return std::string("ARCore 6DOF Scene Tracker");
75 }
76 
78 {
80 }
81 
82 }
83 
84 }
85 
86 }
87 
88 #endif // META_OCEAN_DEVICES_ARCORE_AC_SCENE_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: ACSceneTracker6DOF.h:32
void onNewSample(const HomogenousMatrix4 &world_T_camera, Vectors3 &&objectPoints, Indices64 &&objectPointIds, const Timestamp &timestamp)
Event function for new 6DOF transformations.
ACSceneTracker6DOF()
Creates a new 6DOF scene tracker.
~ACSceneTracker6DOF() override
Destructs this 6DOF tracker.
static std::string deviceNameACSceneTracker6DOF()
Returns the name of this tracker.
Definition: ACSceneTracker6DOF.h:72
static DeviceType deviceTypeACSceneTracker6DOF()
Returns the device type of this tracker.
Definition: ACSceneTracker6DOF.h:77
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 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
std::vector< Index64 > Indices64
Definition of a vector holding 64 bit index values.
Definition: Base.h:108
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition: Vector3.h:65
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15