The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

external/vit: Update to 1.0.1 and remove unused cpp helper

authored by

Mateo de Mayo and committed by
Simon Zeni
d80a41f3 a10644c8

+63 -299
-216
src/external/vit_includes/vit/vit_implementation_helper.hpp
··· 1 - // Copyright 2023, Collabora, Ltd. 2 - // SPDX-License-Identifier: BSL-1.0 3 - /*! 4 - * @file 5 - * @brief Visual-Intertial Tracking tracker helper. 6 - * @author Jakob Bornecrantz <jakob@collabora.com> 7 - * @author Simon Zeni <simon.zeni@collabora.com> 8 - */ 9 - 10 - #pragma once 11 - 12 - #include "vit_interface.h" 13 - 14 - 15 - namespace vit { 16 - 17 - typedef vit_result_t Result; 18 - typedef vit_image_format_t ImageFormat; 19 - typedef vit_camera_distortion_t CameraDistortion; 20 - typedef vit_tracker_capability_t TrackerCapability; 21 - typedef vit_tracker_pose_capability_t TrackerPoseCapability; 22 - typedef vit_tracker_timing_titles TrackerTimingTitles; 23 - typedef vit_tracker_t Tracker; 24 - typedef vit_config_t Config; 25 - typedef vit_pose_t Pose; 26 - typedef vit_config_t Config; 27 - typedef vit_imu_sample_t ImuSample; 28 - typedef vit_mask_t Mask; 29 - typedef vit_img_sample_t ImgSample; 30 - typedef vit_pose_data_t PoseData; 31 - typedef vit_pose_timing_t PoseTiming; 32 - typedef vit_pose_feature_t PoseFeature; 33 - typedef vit_pose_features_t PoseFeatures; 34 - typedef vit_camera_calibration_t CameraCalibration; 35 - typedef vit_inertial_calibration_t InertialCalibration; 36 - typedef vit_imu_calibration_t ImuCalibration; 37 - 38 - } // namespace vit 39 - 40 - extern "C" { 41 - 42 - struct vit_tracker 43 - { 44 - virtual ~vit_tracker() = default; 45 - 46 - virtual vit_result_t has_image_format(const vit_image_format_t fmt, bool *out_supported) const = 0; 47 - virtual vit_result_t get_capabilities(vit_tracker_capability_t *out_capabilities) const = 0; 48 - virtual vit_result_t get_pose_capabilities(vit_tracker_pose_capability_t *out_capabilities) const = 0; 49 - virtual vit_result_t set_pose_capabilities(const vit_tracker_pose_capability_t capabilities, bool value) = 0; 50 - virtual vit_result_t start() = 0; 51 - virtual vit_result_t stop() = 0; 52 - virtual vit_result_t reset() = 0; 53 - virtual vit_result_t is_running(bool *out_running) const = 0; 54 - virtual vit_result_t add_imu_calibration(const vit_imu_calibration_t *calibration) = 0; 55 - virtual vit_result_t add_camera_calibration(const vit_camera_calibration_t *calibration) = 0; 56 - virtual vit_result_t push_imu_sample(const vit_imu_sample_t *sample) = 0; 57 - virtual vit_result_t push_img_sample(const vit_img_sample_t *sample) = 0; 58 - virtual vit_result_t pop_pose(vit_pose_t **pose) = 0; 59 - virtual vit_result_t get_timing_titles(vit_tracker_timing_titles *out_titles) const = 0; 60 - }; 61 - 62 - struct vit_pose 63 - { 64 - virtual ~vit_pose() = default; 65 - 66 - virtual vit_result_t get_data(vit_pose_data *out_data) const = 0; 67 - virtual vit_result_t get_timing(vit_pose_timing *out_timing) const = 0; 68 - virtual vit_result_t get_features(uint32_t camera_index, vit_pose_features_t *out_features) const = 0; 69 - }; 70 - 71 - #ifdef VIT_INTERFACE_IMPLEMENTATION 72 - 73 - vit_result_t 74 - vit_api_get_version(uint32_t *out_major, uint32_t *out_minor, uint32_t *out_patch) 75 - { 76 - *out_major = VIT_HEADER_VERSION_MAJOR; 77 - *out_minor = VIT_HEADER_VERSION_MINOR; 78 - *out_patch = VIT_HEADER_VERSION_PATCH; 79 - return VIT_SUCCESS; 80 - } 81 - 82 - void 83 - vit_tracker_destroy(vit_tracker_t *tracker) 84 - { 85 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 86 - delete t; 87 - } 88 - 89 - vit_result_t 90 - vit_tracker_has_image_format(const vit_tracker_t *tracker, const vit_image_format_t image_format, bool *out_supported) 91 - { 92 - const vit::Tracker *t = static_cast<const vit::Tracker *>(tracker); 93 - return t->has_image_format(image_format, out_supported); 94 - } 95 - 96 - vit_result_t 97 - vit_tracker_get_capabilities(const vit_tracker_t *tracker, vit_tracker_capability_t *out_caps) 98 - { 99 - const vit::Tracker *t = static_cast<const vit::Tracker *>(tracker); 100 - return t->get_capabilities(out_caps); 101 - } 102 - 103 - vit_result_t 104 - vit_tracker_get_pose_capabilities(const vit_tracker_t *tracker, vit_tracker_pose_capability_t *out_caps) 105 - { 106 - const vit::Tracker *t = static_cast<const vit::Tracker *>(tracker); 107 - return t->get_pose_capabilities(out_caps); 108 - } 109 - 110 - vit_result_t 111 - vit_tracker_set_pose_capabilities(vit_tracker_t *tracker, vit_tracker_pose_capability_t caps, bool value) 112 - { 113 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 114 - return t->set_pose_capabilities(caps, value); 115 - } 116 - 117 - vit_result_t 118 - vit_tracker_start(vit_tracker_t *tracker) 119 - { 120 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 121 - return t->start(); 122 - } 123 - 124 - vit_result_t 125 - vit_tracker_stop(vit_tracker_t *tracker) 126 - { 127 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 128 - return t->stop(); 129 - } 130 - 131 - vit_result_t 132 - vit_tracker_reset(vit_tracker_t *tracker) 133 - { 134 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 135 - return t->reset(); 136 - } 137 - 138 - vit_result_t 139 - vit_tracker_is_running(const vit_tracker *tracker, bool *out_running) 140 - { 141 - const vit::Tracker *t = static_cast<const vit::Tracker *>(tracker); 142 - return t->is_running(out_running); 143 - } 144 - 145 - vit_result_t 146 - vit_tracker_push_imu_sample(vit_tracker *tracker, const vit_imu_sample_t *sample) 147 - { 148 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 149 - return t->push_imu_sample(sample); 150 - } 151 - 152 - vit_result_t 153 - vit_tracker_push_img_sample(vit_tracker *tracker, const vit_img_sample_t *sample) 154 - { 155 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 156 - return t->push_img_sample(sample); 157 - } 158 - 159 - vit_result_t 160 - vit_tracker_add_imu_calibration(vit_tracker_t *tracker, const vit_imu_calibration_t *calibration) 161 - { 162 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 163 - return t->add_imu_calibration(calibration); 164 - } 165 - 166 - vit_result_t 167 - vit_tracker_add_camera_calibration(vit_tracker_t *tracker, const vit_camera_calibration_t *calibration) 168 - { 169 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 170 - return t->add_camera_calibration(calibration); 171 - } 172 - 173 - vit_result_t 174 - vit_tracker_pop_pose(vit_tracker_t *tracker, vit_pose_t **out_pose) 175 - { 176 - vit::Tracker *t = static_cast<vit::Tracker *>(tracker); 177 - return t->pop_pose(out_pose); 178 - } 179 - 180 - vit_result_t 181 - vit_tracker_get_timing_titles(const vit_tracker_t *tracker, vit_tracker_timing_titles *out_titles) 182 - { 183 - const vit::Tracker *t = static_cast<const vit::Tracker *>(tracker); 184 - return t->get_timing_titles(out_titles); 185 - } 186 - 187 - void 188 - vit_pose_destroy(vit_pose_t *pose) 189 - { 190 - vit::Pose *p = static_cast<vit::Pose *>(pose); 191 - delete p; 192 - } 193 - 194 - vit_result_t 195 - vit_pose_get_data(const vit_pose_t *pose, vit_pose_data_t *out_data) 196 - { 197 - const vit::Pose *p = static_cast<const vit::Pose *>(pose); 198 - return p->get_data(out_data); 199 - } 200 - 201 - vit_result_t 202 - vit_pose_get_timing(const vit_pose_t *pose, vit_pose_timing_t *out_timing) 203 - { 204 - const vit::Pose *p = static_cast<const vit::Pose *>(pose); 205 - return p->get_timing(out_timing); 206 - } 207 - 208 - vit_result_t 209 - vit_pose_get_features(const vit_pose_t *pose, uint32_t camera_index, vit_pose_features_t *out_features) 210 - { 211 - const vit::Pose *p = static_cast<const vit::Pose *>(pose); 212 - return p->get_features(camera_index, out_features); 213 - } 214 - 215 - #endif 216 - }
+63 -83
src/external/vit_includes/vit/vit_interface.h
··· 1 - // Copyright 2023, Collabora, Ltd. 1 + // Copyright 2023-2024, Collabora, Ltd. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file ··· 8 8 * @author Jakob Bornecrantz <jakob@collabora.com> 9 9 * 10 10 * This file contains the declaration of the @ref vit_tracker struct. This 11 - * header is intended to appear in both Monado and external SLAM systems. The 12 - * implementation of `vit_interface` is provided by the external system. 13 - * Additional data types are declared for the communication between Monado and 14 - * the system. 11 + * header is intended to appear in both consumers (e.g., Monado) and external 12 + * visual-inertial tracking (VIT) systems (e.g., Basalt). The implementation of 13 + * `vit_interface` is provided by the external system. Additional data types are 14 + * declared for the communication between consumers and the system. 15 15 */ 16 16 17 17 #pragma once ··· 20 20 extern "C" { 21 21 #endif 22 22 23 - #include <stdint.h> 24 23 #include <stdbool.h> 24 + #include <stdint.h> 25 25 26 - // For implementation: same as IMPLEMENTATION_VERSION_* 27 - // For user: expected IMPLEMENTATION_VERSION_*. Should be checked in runtime. 26 + //! Compatibility with these values should be checked against @ref vit_api_get_version. 28 27 #define VIT_HEADER_VERSION_MAJOR 1 //!< API Breakages 29 28 #define VIT_HEADER_VERSION_MINOR 0 //!< Backwards compatible API changes 30 - #define VIT_HEADER_VERSION_PATCH 0 //!< Backw. comp. .h-implemented changes 29 + #define VIT_HEADER_VERSION_PATCH 1 //!< Backw. comp. .h-implemented changes 30 + 31 + #define VIT_CAMERA_CALIBRATION_DISTORTION_MAX_COUNT 32 31 32 32 33 /*! 33 34 * Result type used by the VIT system 34 35 * 35 36 * 0 is @ref VIT_SUCCESS, positive values are non fatal results and negative values are errors. 36 37 */ 37 - typedef enum vit_result 38 - { 38 + typedef enum vit_result { 39 39 /*! 40 40 * Operation suceeded 41 41 */ ··· 70 70 /*! 71 71 * Image formats. 72 72 */ 73 - typedef enum vit_image_format 74 - { 73 + typedef enum vit_image_format { 75 74 //! 8-bit luminance 76 75 VIT_IMAGE_FORMAT_L8 = 1, 77 76 //! 16-bit luminance ··· 83 82 /*! 84 83 * Camera calibration types. 85 84 */ 86 - typedef enum vit_camera_distortion 87 - { 85 + typedef enum vit_camera_distortion { 88 86 //! No distortion (pre-disotorted). 89 87 VIT_CAMERA_DISTORTION_NONE, 90 88 //! Distortion radial-tangential (OpenCV), 4 parameters. ··· 100 98 /*! 101 99 * Capabilities of the tracker. 102 100 */ 103 - typedef enum vit_tracker_capability 104 - { 101 + typedef enum vit_tracker_capability { 105 102 //! Does the tracker support per pose (frame) timing data. 106 103 VIT_TRACKER_CAPABILITY_CAMERA_CALIBRATION = 1 << 0, 107 104 //! Does the tracker support per pose (frame) and per camera features. ··· 111 108 /*! 112 109 * Capabilities of the poses that this tracker produces. 113 110 */ 114 - typedef enum vit_tracker_pose_capability 115 - { 111 + typedef enum vit_tracker_pose_capability { 116 112 //! Does the tracker support per pose (frame) timing data. 117 113 VIT_TRACKER_POSE_CAPABILITY_TIMING = 1 << 0, 118 114 //! Does the tracker support per pose (frame) and per camera features. ··· 134 130 /*! 135 131 * @brief Names of the timestamps returned by `vit_pose_get_timings` 136 132 */ 137 - typedef struct vit_tracker_timing_titles 138 - { 139 - uint32_t count; //! Number of titles 133 + typedef struct vit_tracker_timing_titles { 134 + uint32_t count; //! Number of titles 140 135 const char **titles; //! Names of the measures timestamps 141 136 } vit_tracker_timing_titles; 142 137 ··· 174 169 /*! 175 170 * Region in image space that this mask covers. 176 171 */ 177 - typedef struct vit_mask 178 - { 172 + typedef struct vit_mask { 179 173 //! In pixels. 180 174 float x, y, w, h; 181 175 } vit_mask_t; ··· 253 247 typedef struct vit_camera_calibration { 254 248 uint32_t camera_index; // <! For multi-camera setup. For stereo 0 ~ left, 1 ~ right. 255 249 256 - int width, height; //<! Resolution 257 - double frequency; //<! Frames per second 258 - double fx, fy; //<! Focal point 259 - double cx, cy; //<! Principal point 250 + int width, height; //<! Resolution 251 + double frequency; //<! Frames per second 252 + double fx, fy; //<! Focal point 253 + double cx, cy; //<! Principal point 260 254 enum vit_camera_distortion model; 261 255 uint32_t distortion_count; 262 - double distortion[32]; //!< Parameters for the distortion model 263 - double transform[16]; //!< Row-major 4x4 camera transform w.r.t. the IMU (i.e., T_imu_cam) 256 + double distortion[VIT_CAMERA_CALIBRATION_DISTORTION_MAX_COUNT]; //!< Parameters for the distortion model 257 + double transform[4 * 4]; //!< Row-major 4x4 camera transform w.r.t. the IMU (i.e., T_imu_cam) 264 258 } vit_camera_calibration_t; 265 259 266 260 typedef struct vit_inertial_calibration { 267 261 // Calibration intrinsics to apply to each raw measurement. 268 262 269 263 //! Row major 3x3 linear transformation for raw measurements alignment and scaling. 270 - double transform[9]; 264 + double transform[3 * 3]; 271 265 272 266 //! Offset to add to raw measurements; called bias in other contexts. 273 267 double offset[3]; ··· 297 291 struct vit_inertial_calibration gyro; 298 292 } vit_imu_calibration_t; 299 293 300 - 301 294 /* 302 295 * 303 296 * Function prototypes. ··· 307 300 typedef vit_result_t (*PFN_vit_api_get_version)(uint32_t *out_major, uint32_t *out_minor, uint32_t *out_patch); 308 301 typedef vit_result_t (*PFN_vit_tracker_create)(const vit_config_t *config, vit_tracker_t **out_tracker); 309 302 typedef void (*PFN_vit_tracker_destroy)(vit_tracker_t *tracker); 310 - typedef vit_result_t (*PFN_vit_tracker_has_image_format)(const vit_tracker_t *tracker, const vit_image_format_t image_format, bool *out_supported); 311 - typedef vit_result_t (*PFN_vit_tracker_get_capabilities)(const vit_tracker_t *tracker, vit_tracker_capability_t *out_caps); 312 - typedef vit_result_t (*PFN_vit_tracker_get_pose_capabilities)(const vit_tracker_t *tracker, vit_tracker_pose_capability_t *out_caps); 313 - typedef vit_result_t (*PFN_vit_tracker_set_pose_capabilities)(vit_tracker_t *tracker, const vit_tracker_pose_capability_t caps, bool value); 303 + typedef vit_result_t (*PFN_vit_tracker_has_image_format)(const vit_tracker_t *tracker, vit_image_format_t image_format, 304 + bool *out_supported); 305 + typedef vit_result_t (*PFN_vit_tracker_get_capabilities)(const vit_tracker_t *tracker, 306 + vit_tracker_capability_t *out_caps); 307 + typedef vit_result_t (*PFN_vit_tracker_get_pose_capabilities)(const vit_tracker_t *tracker, 308 + vit_tracker_pose_capability_t *out_caps); 309 + typedef vit_result_t (*PFN_vit_tracker_set_pose_capabilities)(vit_tracker_t *tracker, 310 + vit_tracker_pose_capability_t caps, bool value); 314 311 typedef vit_result_t (*PFN_vit_tracker_start)(vit_tracker_t *tracker); 315 312 typedef vit_result_t (*PFN_vit_tracker_stop)(vit_tracker_t *tracker); 316 313 typedef vit_result_t (*PFN_vit_tracker_reset)(vit_tracker_t *tracker); 317 314 typedef vit_result_t (*PFN_vit_tracker_is_running)(const vit_tracker_t *tracker, bool *out_bool); 318 315 typedef vit_result_t (*PFN_vit_tracker_push_imu_sample)(vit_tracker_t *tracker, const vit_imu_sample_t *sample); 319 316 typedef vit_result_t (*PFN_vit_tracker_push_img_sample)(vit_tracker_t *tracker, const vit_img_sample_t *sample); 320 - typedef vit_result_t (*PFN_vit_tracker_add_imu_calibration)(vit_tracker_t *tracker, const vit_imu_calibration_t *calibration); 321 - typedef vit_result_t (*PFN_vit_tracker_add_camera_calibration)(vit_tracker_t *tracker, const vit_camera_calibration_t *calibration); 317 + typedef vit_result_t (*PFN_vit_tracker_add_imu_calibration)(vit_tracker_t *tracker, 318 + const vit_imu_calibration_t *calibration); 319 + typedef vit_result_t (*PFN_vit_tracker_add_camera_calibration)(vit_tracker_t *tracker, 320 + const vit_camera_calibration_t *calibration); 322 321 typedef vit_result_t (*PFN_vit_tracker_pop_pose)(vit_tracker_t *tracker, vit_pose_t **out_pose); 323 - typedef vit_result_t (*PFN_vit_tracker_get_timing_titles)(const vit_tracker_t *tracker, vit_tracker_timing_titles *out_titles); 322 + typedef vit_result_t (*PFN_vit_tracker_get_timing_titles)(const vit_tracker_t *tracker, 323 + vit_tracker_timing_titles *out_titles); 324 324 typedef void (*PFN_vit_pose_destroy)(vit_pose_t *pose); 325 325 typedef vit_result_t (*PFN_vit_pose_get_data)(const vit_pose_t *pose, vit_pose_data_t *out_data); 326 326 typedef vit_result_t (*PFN_vit_pose_get_timing)(const vit_pose_t *pose, vit_pose_timing_t *out_timing); 327 - typedef vit_result_t (*PFN_vit_pose_get_features)(const vit_pose_t *pose, uint32_t camera_index, vit_pose_features_t *out_features); 328 - 327 + typedef vit_result_t (*PFN_vit_pose_get_features)(const vit_pose_t *pose, uint32_t camera_index, 328 + vit_pose_features_t *out_features); 329 329 330 330 /* 331 331 * ··· 338 338 /*! 339 339 * @brief Returns the API version implemented by the VIT system. 340 340 */ 341 - vit_result_t 342 - vit_api_get_version(uint32_t *out_major, uint32_t *out_minor, uint32_t *out_patch); 341 + vit_result_t vit_api_get_version(uint32_t *out_major, uint32_t *out_minor, uint32_t *out_patch); 343 342 344 343 /*! 345 344 * @brief Creates a new VIT tracker. The caller is responsible of destroying it when done. 346 345 */ 347 - vit_result_t 348 - vit_tracker_create(const vit_config_t *config, vit_tracker_t **out_tracker); 346 + vit_result_t vit_tracker_create(const vit_config_t *config, vit_tracker_t **out_tracker); 349 347 350 348 /*! 351 349 * @brief Destroys the VIT tracker and free all resources allocated. 352 350 */ 353 - void 354 - vit_tracker_destroy(vit_tracker_t *tracker); 351 + void vit_tracker_destroy(vit_tracker_t *tracker); 355 352 356 353 /*! 357 354 * @brief Verifies if the tracker supports a given `vit_image_format_t`. 358 355 */ 359 - vit_result_t 360 - vit_tracker_has_image_format(const vit_tracker_t *tracker, const vit_image_format_t image_format, bool *out_supported); 356 + vit_result_t vit_tracker_has_image_format(const vit_tracker_t *tracker, vit_image_format_t image_format, 357 + bool *out_supported); 361 358 362 359 /*! 363 360 * @brief Returns a bitfield of capabilities supported by the tracker. ··· 365 362 * @see vit_tracker_capability_t 366 363 */ 367 364 368 - vit_result_t 369 - vit_tracker_get_capabilities(const vit_tracker_t *tracker, vit_tracker_capability_t *out_caps); 365 + vit_result_t vit_tracker_get_capabilities(const vit_tracker_t *tracker, vit_tracker_capability_t *out_caps); 370 366 371 367 /*! 372 368 * @brief Returns a bitfield of pose capabilities supported by the tracker. 373 369 * 374 370 * @see vit_tracker_pose_capability_t 375 371 */ 376 - vit_result_t 377 - vit_tracker_get_pose_capabilities(const vit_tracker_t *tracker, vit_tracker_pose_capability_t *out_caps); 372 + vit_result_t vit_tracker_get_pose_capabilities(const vit_tracker_t *tracker, vit_tracker_pose_capability_t *out_caps); 378 373 379 374 /*! 380 375 * @brief Enables or disables multiple tracker pose capabilities. ··· 383 378 * 384 379 * @see vit_tracker_pose_capability_t 385 380 */ 386 - vit_result_t 387 - vit_tracker_set_pose_capabilities(vit_tracker_t *tracker, const vit_tracker_pose_capability_t caps, bool value); 381 + vit_result_t vit_tracker_set_pose_capabilities(vit_tracker_t *tracker, vit_tracker_pose_capability_t caps, bool value); 388 382 389 383 /*! 390 384 * @brief Starts the VIT tracker. Image and IMU samples can be pushed and pose can be retrieved. 391 385 * 392 386 * This function must be non blocking. The VIT system implementing it is expected to start its own event loop. 393 387 */ 394 - vit_result_t 395 - vit_tracker_start(vit_tracker_t *tracker); 388 + vit_result_t vit_tracker_start(vit_tracker_t *tracker); 396 389 397 390 /*! 398 391 * @brief Stops the VIT tracker. The tracker wont accept image and IMU samples, and will not return poses. 399 392 */ 400 - vit_result_t 401 - vit_tracker_stop(vit_tracker_t *tracker); 393 + vit_result_t vit_tracker_stop(vit_tracker_t *tracker); 402 394 403 395 /*! 404 396 * @brief Resets the VIT tracker. The tracker internal state will be set to its original state. 405 397 */ 406 - vit_result_t 407 - vit_tracker_reset(vit_tracker_t *tracker); 398 + vit_result_t vit_tracker_reset(vit_tracker_t *tracker); 408 399 409 400 /*! 410 401 * @brief Verifies if the tracker is running. 411 402 */ 412 - vit_result_t 413 - vit_tracker_is_running(const vit_tracker_t *tracker, bool *out_bool); 403 + vit_result_t vit_tracker_is_running(const vit_tracker_t *tracker, bool *out_bool); 414 404 415 405 /*! 416 406 * @brief Push an IMU sample into the tracker. ··· 420 410 * The implementation must be non-blocking. 421 411 * Thus, a separate consumer thread should process the samples. 422 412 */ 423 - vit_result_t 424 - vit_tracker_push_imu_sample(vit_tracker_t *tracker, const vit_imu_sample_t *sample); 413 + vit_result_t vit_tracker_push_imu_sample(vit_tracker_t *tracker, const vit_imu_sample_t *sample); 425 414 426 415 /*! 427 416 * @brief Push an image sample into the tracker. ··· 430 419 * When using N>1 cameras, the N frames must be pushed following @ref cam_index order. 431 420 * The bundle of N frames must have the same timestamps. 432 421 */ 433 - vit_result_t 434 - vit_tracker_push_img_sample(vit_tracker_t *tracker, const vit_img_sample_t *sample); 422 + vit_result_t vit_tracker_push_img_sample(vit_tracker_t *tracker, const vit_img_sample_t *sample); 435 423 436 424 /*! 437 425 * @brief Adds an inertial measurement unit calibration to the tracker. The tracker must not be started. ··· 441 429 * @see vit_tracker_get_capabilities 442 430 * @see vit_tracker_capability_t 443 431 */ 444 - vit_result_t 445 - vit_tracker_add_imu_calibration(vit_tracker_t *tracker, const vit_imu_calibration_t *calibration); 432 + vit_result_t vit_tracker_add_imu_calibration(vit_tracker_t *tracker, const vit_imu_calibration_t *calibration); 446 433 447 434 /*! 448 435 * @brief Adds a camera calibration to the tracker. The tracker must not be started. ··· 452 439 * @see vit_tracker_get_capabilities 453 440 * @see vit_tracker_capability_t 454 441 */ 455 - vit_result_t 456 - vit_tracker_add_camera_calibration(vit_tracker_t *tracker, const vit_camera_calibration_t *calibration); 442 + vit_result_t vit_tracker_add_camera_calibration(vit_tracker_t *tracker, const vit_camera_calibration_t *calibration); 457 443 458 444 /*! 459 445 * @brief Get the pose from the front of the tracking queue from the VIT tracker ··· 464 450 * 465 451 * @param[out] out_pose Pose returned to the caller, NULL if there is not pose available or on error. 466 452 */ 467 - vit_result_t 468 - vit_tracker_pop_pose(vit_tracker_t *tracker, vit_pose_t **out_pose); 453 + vit_result_t vit_tracker_pop_pose(vit_tracker_t *tracker, vit_pose_t **out_pose); 469 454 470 455 /*! 471 456 * @brief Get the titles of the timestamps measured by the pose timings. 472 457 * 473 458 * Returns `VIT_ERROR_NOT_SUPPORTED` if the tracker doesn't offer the pose timing capability. 474 459 */ 475 - vit_result_t 476 - vit_tracker_get_timing_titles(const vit_tracker_t *tracker, vit_tracker_timing_titles *out_titles); 460 + vit_result_t vit_tracker_get_timing_titles(const vit_tracker_t *tracker, vit_tracker_timing_titles *out_titles); 477 461 478 462 /*! 479 463 * @brief Destroys a pose. All of the data, timing and features associated to it will be invalidated. 480 464 */ 481 - void 482 - vit_pose_destroy(vit_pose_t *pose); 465 + void vit_pose_destroy(vit_pose_t *pose); 483 466 484 467 /*! 485 468 * @brief Gets the data form a given `vit_pose_t`. 486 469 * 487 470 * The data becomes invalid when the associated pose gets destroyed. 488 471 */ 489 - vit_result_t 490 - vit_pose_get_data(const vit_pose_t *pose, vit_pose_data_t *out_data); 472 + vit_result_t vit_pose_get_data(const vit_pose_t *pose, vit_pose_data_t *out_data); 491 473 492 474 /*! 493 475 * @brief Gets the timing form a given `vit_pose_t`. 494 476 * 495 477 * The timing data becomes invalid when the associated pose gets destroyed. 496 478 */ 497 - vit_result_t 498 - vit_pose_get_timing(const vit_pose_t *pose, vit_pose_timing_t *out_timing); 479 + vit_result_t vit_pose_get_timing(const vit_pose_t *pose, vit_pose_timing_t *out_timing); 499 480 500 481 /*! 501 482 * @brief Gets the features form a given `vit_pose_t`. 502 483 * 503 484 * The features data becomes invalid when the associated pose gets destroyed. 504 485 */ 505 - vit_result_t 506 - vit_pose_get_features(const vit_pose_t *pose, uint32_t camera_index, vit_pose_features_t *out_features); 486 + vit_result_t vit_pose_get_features(const vit_pose_t *pose, uint32_t camera_index, vit_pose_features_t *out_features); 507 487 508 488 #endif 509 489