From 6fb8a216a32b4d8a20c92cbbc8fb0047bc7165c7 Mon Sep 17 00:00:00 2001
From: Jakob Bornecrantz <jakob@collabora.com>
Date: Sat, 6 Apr 2019 12:29:47 +0100
Subject: [PATCH] aux/math: Group the files and structs in documentation

---
 src/xrt/auxiliary/math/m_api.h           | 24 ++++++++++++++++++++++++
 src/xrt/auxiliary/math/m_base.cpp        |  1 +
 src/xrt/auxiliary/math/m_eigen_interop.h |  1 +
 src/xrt/auxiliary/math/m_optics.c        |  1 +
 src/xrt/auxiliary/math/m_quatexpmap.cpp  |  1 +
 src/xrt/auxiliary/util/u_documentation.h |  2 +-
 6 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/xrt/auxiliary/math/m_api.h b/src/xrt/auxiliary/math/m_api.h
index 1d1e23308..16543e1b9 100644
--- a/src/xrt/auxiliary/math/m_api.h
+++ b/src/xrt/auxiliary/math/m_api.h
@@ -9,6 +9,7 @@
  * @see xrt_quat
  * @see xrt_pose
  * @see xrt_space_relation
+ * @ingroup aux_math
  */
 
 #pragma once
@@ -20,12 +21,21 @@ extern "C" {
 #endif
 
 
+/*!
+ * @defgroup aux_math Math
+ * @ingroup aux
+ *
+ * @brief C interface to some transform-related math functions.
+ */
+
 /*!
  * @dir auxiliary/math
+ * @ingroup aux
  *
  * @brief C interface to some transform-related math functions.
  */
 
+
 /*
  *
  * Vector functions
@@ -39,6 +49,7 @@ extern "C" {
  * OK if the two arguments are the same addresses.
  *
  * @relates xrt_vec3
+ * @ingroup aux_math
  */
 void
 math_vec3_accum(const struct xrt_vec3 *additional, struct xrt_vec3 *inAndOut);
@@ -54,6 +65,7 @@ math_vec3_accum(const struct xrt_vec3 *additional, struct xrt_vec3 *inAndOut);
  *
  * @relates xrt_quat
  * @relatesalso xrt_vec3
+ * @ingroup aux_math
  */
 void
 math_quat_rotate_vec3(const struct xrt_quat *left,
@@ -64,6 +76,7 @@ math_quat_rotate_vec3(const struct xrt_quat *left,
  * Rotate a quaternion (compose rotations).
  *
  * @relates xrt_quat
+ * @ingroup aux_math
  */
 void
 math_quat_rotate(const struct xrt_quat *left,
@@ -80,6 +93,7 @@ math_quat_rotate(const struct xrt_quat *left,
  *
  * @relates xrt_quat
  * @relatesalso xrt_vec3
+ * @ingroup aux_math
  */
 void
 math_quat_integrate_velocity(const struct xrt_quat *quat,
@@ -98,6 +112,7 @@ math_quat_integrate_velocity(const struct xrt_quat *quat,
  *
  * @relates xrt_quat
  * @relatesalso xrt_vec3
+ * @ingroup aux_math
  */
 void
 math_quat_finite_difference(const struct xrt_quat *quat0,
@@ -115,6 +130,7 @@ math_quat_finite_difference(const struct xrt_quat *quat0,
  * Check if this pose can be used in transformation operations.
  *
  * @relates xrt_pose
+ * @ingroup aux_math
  */
 bool
 math_pose_validate(const struct xrt_pose *pose);
@@ -125,6 +141,7 @@ math_pose_validate(const struct xrt_pose *pose);
  * OK if input and output are the same addresses.
  *
  * @relates xrt_pose
+ * @ingroup aux_math
  */
 void
 math_pose_invert(const struct xrt_pose *pose, struct xrt_pose *outPose);
@@ -135,6 +152,7 @@ math_pose_invert(const struct xrt_pose *pose, struct xrt_pose *outPose);
  * OK if input and output are the same addresses.
  *
  * @relates xrt_pose
+ * @ingroup aux_math
  */
 void
 math_pose_transform(const struct xrt_pose *transform,
@@ -150,6 +168,7 @@ math_pose_transform(const struct xrt_pose *transform,
  * OK if input and output are the same addresses.
  *
  * @relates xrt_pose
+ * @ingroup aux_math
  */
 void
 math_pose_openxr_locate(const struct xrt_pose *space_pose,
@@ -167,6 +186,7 @@ math_pose_openxr_locate(const struct xrt_pose *space_pose,
  * Reset a relation to zero velocity, located at origin, and all validity flags.
  *
  * @relates xrt_space_relation
+ * @ingroup aux_math
  */
 void
 math_relation_reset(struct xrt_space_relation *out);
@@ -179,6 +199,7 @@ math_relation_reset(struct xrt_space_relation *out);
  *
  * @relates xrt_space_relation
  * @see xrt_pose
+ * @ingroup aux_math
  */
 void
 math_relation_accumulate_transform(const struct xrt_pose *transform,
@@ -190,6 +211,7 @@ math_relation_accumulate_transform(const struct xrt_pose *transform,
  * Updates all valid pose and derivative fields, as well as the validity mask.
  *
  * @relates xrt_space_relation
+ * @ingroup aux_math
  */
 void
 math_relation_accumulate_relation(
@@ -207,6 +229,7 @@ math_relation_accumulate_relation(
  *
  * @relates xrt_space_relation
  * @see xrt_pose
+ * @ingroup aux_math
  */
 void
 math_relation_openxr_locate(const struct xrt_pose *space_pose,
@@ -254,6 +277,7 @@ math_relation_openxr_locate(const struct xrt_pose *space_pose,
  * ```
  *
  * @return true if successful.
+ * @ingroup aux_math
  */
 bool
 math_compute_fovs(double w_total,
diff --git a/src/xrt/auxiliary/math/m_base.cpp b/src/xrt/auxiliary/math/m_base.cpp
index ca3a248db..312bef066 100644
--- a/src/xrt/auxiliary/math/m_base.cpp
+++ b/src/xrt/auxiliary/math/m_base.cpp
@@ -5,6 +5,7 @@
  * @brief  Base implementations for math library.
  * @author Jakob Bornecrantz <jakob@collabora.com>
  * @author Ryan Pavlik <ryan.pavlik@collabora.com>
+ * @ingroup aux_math
  */
 
 #include <Eigen/Core>
diff --git a/src/xrt/auxiliary/math/m_eigen_interop.h b/src/xrt/auxiliary/math/m_eigen_interop.h
index 8ea1c1748..750637f95 100644
--- a/src/xrt/auxiliary/math/m_eigen_interop.h
+++ b/src/xrt/auxiliary/math/m_eigen_interop.h
@@ -4,6 +4,7 @@
  * @file
  * @brief  Interoperability helpers connecting internal math types and Eigen.
  * @author Ryan Pavlik <ryan.pavlik@collabora.com>
+ * @ingroup aux_math
  */
 
 #pragma once
diff --git a/src/xrt/auxiliary/math/m_optics.c b/src/xrt/auxiliary/math/m_optics.c
index fb1efae79..d22a914ab 100644
--- a/src/xrt/auxiliary/math/m_optics.c
+++ b/src/xrt/auxiliary/math/m_optics.c
@@ -4,6 +4,7 @@
  * @file
  * @brief  Functions related to field-of-view.
  * @author Ryan Pavlik <ryan.pavlik@collabora.com>
+ * @ingroup aux_math
  */
 
 
diff --git a/src/xrt/auxiliary/math/m_quatexpmap.cpp b/src/xrt/auxiliary/math/m_quatexpmap.cpp
index 31a526c78..2c94f4f21 100644
--- a/src/xrt/auxiliary/math/m_quatexpmap.cpp
+++ b/src/xrt/auxiliary/math/m_quatexpmap.cpp
@@ -5,6 +5,7 @@
  * @file
  * @brief  Base implementations for math library.
  * @author Ryan Pavlik <ryan.pavlik@collabora.com>
+ * @ingroup aux_math
  *
  * Based in part on inc/osvr/Util/EigenQuatExponentialMap.h in OSVR-Core
  */
diff --git a/src/xrt/auxiliary/util/u_documentation.h b/src/xrt/auxiliary/util/u_documentation.h
index 4116065ab..134e959b1 100644
--- a/src/xrt/auxiliary/util/u_documentation.h
+++ b/src/xrt/auxiliary/util/u_documentation.h
@@ -27,7 +27,7 @@
 
 /*!
  * @dir auxiliary
- * @ingroup aux
+ * @ingroup xrt
  *
  * @brief Shared code and helpers for Monado.
  */
-- 
GitLab