Ocean
Loading...
Searching...
No Matches
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
16namespace Ocean
17{
18
19namespace Devices
20{
21
22namespace ARCore
23{
24
25/*
26 * This class implements the 6DOF plane tracker.
27 * @ingroup devicesarcore
28 */
29class 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 */
49
50 protected:
51
52 /**
53 * Creates a new 6DOF scene tracker.
54 */
56
57 /**
58 * Destructs this 6DOF tracker.
59 */
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
80
81}
82
83}
84
85}
86
87#endif // META_OCEAN_DEVICES_ARCORE_AC_PLANE_TRACKER_6_DOF_H
ACDevice(const TrackerCapabilities trackerCapabilities, const std::string &name, const DeviceType type)
Creates a new device by is name.
static std::string deviceNameACPlaneTracker6DOF()
Returns the name of this tracker.
Definition ACPlaneTracker6DOF.h:71
friend class ACFactory
Definition ACPlaneTracker6DOF.h:34
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.
friend class ARSessionManager
Definition ACPlaneTracker6DOF.h:33
ACPlaneTracker6DOF()
Creates a new 6DOF scene tracker.
~ACPlaneTracker6DOF() override
Destructs this 6DOF tracker.
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
SceneTracker6DOF(const std::string &name)
Creates a new 6-DOF scene tracker object.
static DeviceType deviceTypeTracker6DOF()
Definition of this device type.
Definition Tracker6DOF.h:106
@ TRACKER_VISUAL
Tracker using a visual input for their measurements.
Definition devices/Tracker.h:64
@ SCENE_TRACKER_6DOF
6DOF scene tracker.
Definition devices/Tracker.h:56
This class implements a timestamp.
Definition Timestamp.h:64
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
Namespace of the Devices ARCore library.
Definition ACDepthTracker6DOF.h:23
Namespace of the Devices library.
Definition AccelerationSensor3DOF.h:24
The namespace covering the entire Ocean framework.
Definition Accessor.h:15