a/math: Move functionality into official namespaces.

This commit is contained in:
Ryan Pavlik 2021-04-30 17:23:32 -05:00
parent 2ae3ce883d
commit 265c49d337
6 changed files with 28 additions and 1 deletions

View file

@ -17,6 +17,7 @@
#include <assert.h>
using namespace xrt::auxiliary::math;
/*
*

View file

@ -0,0 +1,18 @@
// Copyright 2021, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Header with just documentation.
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @ingroup aux_math
*/
#pragma once
namespace xrt::auxiliary {
//! C++-only functionality in the Math helper library
namespace math {
} // namespace math
} // namespace xrt::auxiliary

View file

@ -1,4 +1,4 @@
// Copyright 2019, Collabora, Ltd.
// Copyright 2019-2021, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -18,6 +18,7 @@
#include <Eigen/Core>
#include <Eigen/Geometry>
namespace xrt::auxiliary::math {
/*!
* @brief Wrap an internal quaternion struct in an Eigen type, const overload.
@ -124,3 +125,5 @@ position(struct xrt_pose &pose)
{
return map_vec3(pose.position);
}
} // namespace xrt::auxiliary::math

View file

@ -130,6 +130,8 @@ quat_ln(Eigen::Quaternion<Scalar> const &quat)
} // namespace
using namespace xrt::auxiliary::math;
extern "C" void
math_quat_integrate_velocity(const struct xrt_quat *quat,
const struct xrt_vec3 *ang_vel,

View file

@ -17,6 +17,7 @@
#include <memory>
using xrt::auxiliary::tracking::SimpleIMUFusion;
using namespace xrt::auxiliary::math;
struct imu_fusion
{

View file

@ -30,6 +30,8 @@
namespace xrt::auxiliary::tracking {
using namespace xrt::auxiliary::math;
//! Anonymous namespace to hide implementation names
namespace {