Ocean
Loading...
Searching...
No Matches
Devices.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_DEVICES_H
9#define META_OCEAN_DEVICES_DEVICES_H
10
11#include "ocean/base/Base.h"
13
14namespace Ocean
15{
16
17namespace Devices
18{
19
20/**
21 * @defgroup devices Ocean Devices Abstraction Library
22 * @{
23 * The Ocean Devices Library is the base library and organizer of all libraries implementing access to devices.
24 * This library mainly implements the interfaces for all devices like sensors or trackers and provides the plugin mechanism so that platform-specific devices can be accessed though the same functions and interfaces.
25 *
26 * The Devices::Manager allows to access the individual devices.
27 * Here is the code which allows to access a GPS tracker on any platform (as long as a GPS tracker is available).
28 * @code
29 * ...
30 *
31 * // we request a GPS tracker
32 * Devices::GPSTrackerRef gpsTracker = Manager::get().device(GPSTracker::deviceTypeGPSTracker());
33 *
34 * if (gpsTracker)
35 * {
36 * // the resulting object is valid so that we can start the GPS tracker
37 * gpsTracker->start();
38 *
39 * ...
40 *
41 * // access the latest GPS sample
42 * GPSTracker::GPSTrackerSampleRef gpsSample = gpsTracker->sample();
43 *
44 * if (gpsSample)
45 * {
46 * size_t numberLocations = gpsSample->locations().size();
47 * ...
48 * }
49 * }
50 * @endcode
51 *
52 * Currently the following devices are available:
53 * <table>
54 * <tr><th>Name <th>Category <th>Platforms <th>Implementation <th> Description
55 * <tr><td>"Android 3DOF Acceleration Sensor" <td> Sensor <td> Android <td> Devices::Android::AndroidAccelerationSensor3DOF <td> Sensor providing access to the acceleration force that is applied to a device on all three physical axes, including the force of gravity, with Android's sensor enum TYPE_ACCELEROMETER
56 * <tr><td>"Android 3DOF Linear Acceleration Sensor" <td> Sensor <td> Android <td> Devices::Android::AndroidAccelerationSensor3DOF <td> Sensor providing access to the acceleration force that is applied to a device on all three physical axes, excluding the force of gravity, with Android's sensor enum TYPE_LINEAR_ACCELERATION
57 * <tr><td>"Android GPS Tracker" <td> Tracker <td> Android <td> Devices::Android::AndroidGPSTracker <td> Tracker providing GPS locations
58 * <tr><td>"Android 3DOF Gravity Tracker" <td> Tracker <td> Android <td> Devices::Android::AndroidGravityTracker3DOF <td> 3-DOF orientation tracker providing gravity (direction to ground), with Android's sensor enum TYPE_GRAVITY
59 * <tr><td>"Android 3DOF Gyro Raw Sensor" <td> Sensor <td> Android <td> Devices::Android::AndroidGyroSensor3DOF <td>
60 * <tr><td>"Android 3DOF Gyro Unbiased Sensor" <td> Sensor <td> Android <td> Devices::Android::AndroidGyroSensor3DOF <td> Sensor providing access to a device's rate of rotation around each of the three physical axes, with Android's enum TYPE_GYROSCOPE
61 * <tr><td>"Android 3DOF Heading Tracker" <td> Tracker <td> Android <td> Devices::Android::AndroidHeadingTracker3DOF <td> 3-DOF orientation tracker providing heading (direction to north), with Android's sensor enum TYPE_ROTATION_VECTOR
62 * <tr><td>"Android 3DOF Orientation Tracker" <td> Tracker <td> Android <td> Devices::Android::AndroidOrientationTracker3DOF <td> 3-DOF orientation tracker providing the device's attitude, with Android's sensor enum TYPE_GAME_ROTATION_VECTOR
63 * <tr><td>
64 * <tr><td>"ARCore 6DOF World Tracker" <td> Tracker <td> Android <td> Devices::ARCore::ACWorldTracker6DOF <td> 6-DOF SLAM tracker provided via ARCore
65 * <tr><td>
66 * <tr><td>"ARKit 6DOF Geo Anchors Tracker" <td> Tracker <td> iOS <td> Devices::ARKit::AKGeoAnchorsTracker6DOF <td> 6-DOF SLAM tracker anchored at GPS locations
67 * <tr><td>"ARKit 6DOF World Tracker" <td> Tracker <td> iOS <td> Devices::ARKit::AKWorldTracker6DOF <td> 6-DOF SLAM tracker provided via ARKit
68 * <tr><td>
69 * <tr><td>"IOS 3DOF Acceleration Sensor" <td> Sensor <td> iOS <td> Devices::IOS::IOSAccelerationSensor3DOF <td> Sensor providing access to the acceleration force that is applied to a device on all three physical axes, including the force of gravity
70 * <tr><td>"IOS 3DOF Linear Acceleration Sensor" <td> Sensor <td> iOS <td> Devices::IOS::IOSAccelerationSensor3DOF <td> Sensor providing access to the acceleration force that is applied to a device on all three physical axes, excluding the force of gravity
71 * <tr><td>"IOS GPS Tracker" <td> Tracker <td> iOS <td> Devices::IOS::IOSGPSTracker <td> Tracker providing GPS locations
72 * <tr><td>"IOS 3DOF Gravity Tracker" <td> Tracker <td> iOS <td> Devices::IOS::IOSGravityTracker3DOF <td> 3-DOF orientation tracker providing gravity (direction to ground)
73 * <tr><td>"IOS 3DOF Gyro Raw Sensor" <td> Sensor <td> iOS <td> Devices::IOS::IOSGyroSensor3DOF <td>
74 * <tr><td>"IOS 3DOF Gyro Unbiased Sensor" <td> Sensor <td> iOS <td> Devices::IOS::IOSGyroSensor3DOF <td> Sensor providing access to a device's rate of rotation around each of the three physical axes
75 * <tr><td>"IOS 3DOF Heading Tracker" <td> Tracker <td> iOS <td> Devices::IOS::IOSHeadingTracker3DOF <td> 3-DOF orientation tracker providing heading (direction to north)
76 * <tr><td>"IOS 3DOF Orientation Tracker" <td> Tracker <td> iOS <td> Devices::IOS::IOSOrientationTracker3DOF <td> 3-DOF orientation tracker providing the device's attitude
77 * <tr><td>
78 * <tr><td>"Headset 6DOF Tracker" <td> Tracker <td> Quest <td> Devices::Quest::VrApi::HeadsetTracker6DOF <td> 6-DOF tracker for the headset
79 * <tr><td>"Quest Controller 6DOF Tracker" <td> Tracker <td> Quest <td> Devices::Quest::VrApi::ControllerTracker6DOF <td> 6-DOF tracker for controllers
80 * <tr><td>"Floor 6DOF Tracker" <td> Tracker <td> Quest <td> Devices::Quest::VrApi::FloorTracker6DOF <td> 6-DOF tracker for the floor
81 * <tr><td>
82 * <tr><td>"Pattern 6DOF Tracker" <td> Tracker <td> any <td> Devices::Pattern::PatternTracker6DOF <td> 6-DOF tracker for dynamic/moving images
83 * <tr><td>"Static Pattern 6DOF Tracker" <td> Tracker <td> any <td> Devices::Pattern::StaticPatternTracker6DOF <td> 6-DOF tracker for mainly static images also using SLAM
84 * </table>
85 * @see Manager, Device.
86 * @}
87 */
88
89/**
90 * @namespace Ocean::Devices Namespace of the Devices library.<p>
91 * The Namespace Ocean::Devices is used in the entire Ocean Devices Library.
92 */
93
94// Defines OCEAN_DEVICES_EXPORT for dll export and import.
95#if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
96 #ifdef USE_OCEAN_DEVICES_EXPORT
97 #define OCEAN_DEVICES_EXPORT __declspec(dllexport)
98 #else
99 #define OCEAN_DEVICES_EXPORT __declspec(dllimport)
100 #endif
101#else
102 #define OCEAN_DEVICES_EXPORT
103#endif
104
105}
106
107}
108
109#endif // META_OCEAN_DEVICES_DEVICES_H
The namespace covering the entire Ocean framework.
Definition Accessor.h:15