The open source OpenXR runtime
0
fork

Configure Feed

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

u/var: Improve documentation

+75 -4
+75 -4
src/xrt/auxiliary/util/u_var.h
··· 25 25 struct m_ff_vec3_f32; 26 26 27 27 /*! 28 - * @addtogroup aux_util 29 - * @{ 28 + * Used to plot an array for values. 29 + * 30 + * @ingroup aux_util 30 31 */ 31 - 32 32 struct u_var_f32_arr 33 33 { 34 34 void *data; ··· 36 36 int length; 37 37 }; 38 38 39 + /*! 40 + * Used to plot a graph of timing information. 41 + * 42 + * @ingroup aux_util 43 + */ 39 44 struct u_var_timing 40 45 { 41 46 //! Values to be plotted. ··· 59 64 60 65 /*! 61 66 * Callback for a button action 67 + * 68 + * @ingroup aux_util 62 69 */ 63 70 typedef void (*u_var_button_cb)(void *); 64 71 72 + /*! 73 + * Simple pushable button. 74 + * 75 + * @ingroup aux_util 76 + */ 65 77 struct u_var_button 66 78 { 67 79 //! Callback function to execute on button press ··· 81 93 bool disabled; 82 94 }; 83 95 96 + /*! 97 + * Combo box information. 98 + * 99 + * @ingroup aux_util 100 + */ 84 101 struct u_var_combo 85 102 { 86 103 //! Number of options. ··· 93 110 int *value; 94 111 }; 95 112 113 + /*! 114 + * Draggable single precision float information. 115 + * 116 + * @ingroup aux_util 117 + */ 96 118 struct u_var_draggable_f32 97 119 { 98 120 float val; ··· 101 123 float max; 102 124 }; 103 125 126 + /*! 127 + * Draggable usingned 16-bit integer information. 128 + * 129 + * @ingroup aux_util 130 + */ 104 131 struct u_var_draggable_u16 105 132 { 106 133 //! @note Using a float instead of storing the value like @ref ··· 113 140 uint16_t max; 114 141 }; 115 142 143 + /*! 144 + * Histogram based on single precision bars. 145 + * 146 + * @ingroup aux_util 147 + */ 116 148 struct u_var_histogram_f32 117 149 { 118 150 float *values; //!< Bin heights ··· 121 153 float height; //!< Widget height or 0 for auto 122 154 }; 123 155 156 + /*! 157 + * A point on the curve, uses doubles like ImPlotPoint. 158 + * 159 + * @ingroup aux_util 160 + */ 124 161 struct u_var_curve_point 125 162 { 126 - // Using doubles like ImPlotPoint 127 163 double x; 128 164 double y; 129 165 }; 130 166 167 + /*! 168 + * Callback for getting points on a curve. 169 + * 170 + * @ingroup aux_util 171 + */ 131 172 typedef struct u_var_curve_point (*u_var_curve_getter)(void *data, int i); 132 173 174 + /*! 175 + * A single curve on a plot. 176 + * 177 + * @ingroup aux_util 178 + */ 133 179 struct u_var_curve 134 180 { 135 181 u_var_curve_getter getter; //!< Getter of 2D points for the curve ··· 140 186 const char *ylabel; //!< Label of the Y axis 141 187 }; 142 188 189 + /*! 190 + * A collection of curves to be plotted. 191 + * 192 + * @ingroup aux_util 193 + */ 143 194 struct u_var_curves 144 195 { 145 196 struct u_var_curve curves[16]; ··· 152 203 153 204 /*! 154 205 * What kind of variable is this tracking. 206 + * 207 + * @ingroup aux_util 155 208 */ 156 209 enum u_var_kind 157 210 { ··· 197 250 U_VAR_KIND_CURVES, 198 251 }; 199 252 253 + /*! 254 + * Maximum string length for a tracked variable. 255 + * 256 + * @ingroup aux_util 257 + */ 200 258 #define U_VAR_NAME_STRING_SIZE 256 259 + 201 260 /*! 202 261 * Struct that keeps all of the information about the variable, some of the UI 203 262 * state is kept on it. 263 + * 264 + * @ingroup aux_util 204 265 */ 205 266 struct u_var_info 206 267 { ··· 217 278 218 279 /*! 219 280 * Callback for entering and leaving root nodes. 281 + * 282 + * @ingroup aux_util 220 283 */ 221 284 typedef void (*u_var_root_cb)(const char *, void *); 222 285 223 286 /*! 224 287 * Callback on each variable a root node has. 288 + * 289 + * @ingroup aux_util 225 290 */ 226 291 typedef void (*u_var_elm_cb)(struct u_var_info *info, void *); 227 292 ··· 252 317 253 318 /*! 254 319 * Remove the root node. 320 + * 321 + * @ingroup aux_util 255 322 */ 256 323 void 257 324 u_var_remove_root(void *root); 258 325 259 326 /*! 260 327 * Visit all root nodes and their variables. 328 + * 329 + * @ingroup aux_util 261 330 */ 262 331 void 263 332 u_var_visit(u_var_root_cb enter_cb, u_var_root_cb exit_cb, u_var_elm_cb elem_cb, void *priv); 264 333 265 334 /*! 266 335 * This forces the variable tracking code to on, it is disabled by default. 336 + * 337 + * @ingroup aux_util 267 338 */ 268 339 void 269 340 u_var_force_on(void);