Monado OpenXR Runtime
oxr_pretty_print.h
Go to the documentation of this file.
1 // Copyright 2019-2022, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief Pretty printing functions.
6  * @author Jakob Bornecrantz <jakob@collabora.com>
7  * @ingroup oxr_main
8  */
9 
10 #include "xrt/xrt_compiler.h"
11 
12 struct oxr_sink_logger;
13 
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 
20 /*!
21  * Prints a fov to a @ref oxr_sink_logger, on the form of `\n\t${name}->fov ...`.
22  *
23  * Note no trailing line break and but a starting line break, see @ref aux_pretty.
24  *
25  * @ingroup oxr_main
26  */
27 void
28 oxr_pp_fov_indented_as_object(struct oxr_sink_logger *slog, const struct xrt_fov *fov, const char *name);
29 
30 /*!
31  * Prints a pose to a @ref oxr_sink_logger, on the form of `\n\t${name}->pose ...`.
32  *
33  * Note no trailing line break and but a starting line break, see @ref aux_pretty.
34  *
35  * @ingroup oxr_main
36  */
37 void
38 oxr_pp_pose_indented_as_object(struct oxr_sink_logger *slog, const struct xrt_pose *pose, const char *name);
39 
40 /*!
41  * Prints a space to a @ref oxr_sink_logger, on the form of `\n\t${name}-><field> ...`.
42  *
43  * Note no trailing line break and but a starting line break, see @ref aux_pretty.
44  *
45  * @ingroup oxr_main
46  */
47 void
48 oxr_pp_space_indented(struct oxr_sink_logger *slog, const struct oxr_space *spc, const char *name);
49 
50 /*!
51  * Prints a space to a @ref oxr_sink_logger, on the form of `\n\t${name}-><field> ...`.
52  *
53  * Note no trailing line break and but a starting line break, see @ref aux_pretty.
54  *
55  * @ingroup oxr_main
56  */
57 void
58 oxr_pp_relation_indented(struct oxr_sink_logger *slog, const struct xrt_space_relation *relation, const char *name);
59 
60 
61 #ifdef __cplusplus
62 }
63 #endif
void oxr_pp_pose_indented_as_object(struct oxr_sink_logger *slog, const struct xrt_pose *pose, const char *name)
Prints a pose to a oxr_sink_logger, on the form of \n\t${name}->pose ....
Definition: oxr_pretty_print.c:53
void oxr_pp_fov_indented_as_object(struct oxr_sink_logger *slog, const struct xrt_fov *fov, const char *name)
Prints a fov to a oxr_sink_logger, on the form of \n\t${name}->fov ....
Definition: oxr_pretty_print.c:46
void oxr_pp_space_indented(struct oxr_sink_logger *slog, const struct oxr_space *spc, const char *name)
Prints a space to a oxr_sink_logger, on the form of \n\t${name}-><field> ....
Definition: oxr_pretty_print.c:59
void oxr_pp_relation_indented(struct oxr_sink_logger *slog, const struct xrt_space_relation *relation, const char *name)
Prints a space to a oxr_sink_logger, on the form of \n\t${name}-><field> ....
Definition: oxr_pretty_print.c:87
Allocate on the stack, make sure to zero initialize.
Definition: oxr_logger.h:88
Can be one of several reference space types, or a space that is bound to an action.
Definition: oxr_objects.h:2172
Describes a projection matrix fov.
Definition: xrt_defines.h:486
A pose composed of a position and orientation.
Definition: xrt_defines.h:465
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:657
Header holding common defines.