mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
a/math: Move functionality into official namespaces.
This commit is contained in:
parent
2ae3ce883d
commit
265c49d337
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
using namespace xrt::auxiliary::math;
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
18
src/xrt/auxiliary/math/m_documentation.hpp
Normal file
18
src/xrt/auxiliary/math/m_documentation.hpp
Normal 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
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <memory>
|
||||
|
||||
using xrt::auxiliary::tracking::SimpleIMUFusion;
|
||||
using namespace xrt::auxiliary::math;
|
||||
|
||||
struct imu_fusion
|
||||
{
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
namespace xrt::auxiliary::tracking {
|
||||
|
||||
using namespace xrt::auxiliary::math;
|
||||
|
||||
//! Anonymous namespace to hide implementation names
|
||||
namespace {
|
||||
|
||||
|
|
Loading…
Reference in a new issue