mirror of https://github.com/mosra/magnum.git
31 changed files with 34 additions and 607 deletions
@ -1,34 +0,0 @@ |
|||||||
# |
|
||||||
# This file is part of Magnum. |
|
||||||
# |
|
||||||
# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
|
||||||
# 2020 Vladimír Vondruš <mosra@centrum.cz> |
|
||||||
# |
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a |
|
||||||
# copy of this software and associated documentation files (the "Software"), |
|
||||||
# to deal in the Software without restriction, including without limitation |
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the |
|
||||||
# Software is furnished to do so, subject to the following conditions: |
|
||||||
# |
|
||||||
# The above copyright notice and this permission notice shall be included |
|
||||||
# in all copies or substantial portions of the Software. |
|
||||||
# |
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
||||||
# DEALINGS IN THE SOFTWARE. |
|
||||||
# |
|
||||||
|
|
||||||
set(MagnumMathGeometry_HEADERS |
|
||||||
Distance.h |
|
||||||
Intersection.h) |
|
||||||
|
|
||||||
# Force IDEs to display all header files in project view |
|
||||||
add_custom_target(MagnumMathGeometry SOURCES ${MagnumMathGeometry_HEADERS}) |
|
||||||
set_target_properties(MagnumMathGeometry PROPERTIES FOLDER "Magnum/Math/Geometry") |
|
||||||
|
|
||||||
install(FILES ${MagnumMathGeometry_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Math/Geometry) |
|
||||||
@ -1,139 +0,0 @@ |
|||||||
#ifndef Magnum_Math_Geometry_Distance_h |
|
||||||
#define Magnum_Math_Geometry_Distance_h |
|
||||||
/*
|
|
||||||
This file is part of Magnum. |
|
||||||
|
|
||||||
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
|
||||||
2020 Vladimír Vondruš <mosra@centrum.cz> |
|
||||||
Copyright © 2016 Jonathan Hale <squareys@googlemail.com> |
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a |
|
||||||
copy of this software and associated documentation files (the "Software"), |
|
||||||
to deal in the Software without restriction, including without limitation |
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
||||||
and/or sell copies of the Software, and to permit persons to whom the |
|
||||||
Software is furnished to do so, subject to the following conditions: |
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included |
|
||||||
in all copies or substantial portions of the Software. |
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
||||||
DEALINGS IN THE SOFTWARE. |
|
||||||
*/ |
|
||||||
|
|
||||||
/** @file
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Magnum/Math/Distance.h instead. |
|
||||||
*/ |
|
||||||
|
|
||||||
#include "Magnum/configure.h" |
|
||||||
|
|
||||||
#ifdef MAGNUM_BUILD_DEPRECATED |
|
||||||
#include "Magnum/Math/Distance.h" |
|
||||||
|
|
||||||
CORRADE_DEPRECATED_FILE("use Magnum/Math/Distance.h instead") |
|
||||||
|
|
||||||
/** @namespace Magnum::Math::Geometry::Distance
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Magnum::Math::Distance instead. |
|
||||||
*/ |
|
||||||
|
|
||||||
namespace Magnum { namespace Math { namespace Geometry { namespace Distance { |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::linePointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePointSquared() instead") T linePointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) { |
|
||||||
return Math::Distance::linePointSquared(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::linePoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePoint() instead") T linePoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) { |
|
||||||
return Math::Distance::linePoint(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::linePointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePointSquared() instead") T linePointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) { |
|
||||||
return Math::Distance::linePointSquared(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::linePoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::linePoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::linePoint() instead") T linePoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) { |
|
||||||
return Math::Distance::linePoint(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::lineSegmentPointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPointSquared(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPointSquared() instead") T lineSegmentPointSquared(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) { |
|
||||||
return Math::Distance::lineSegmentPointSquared(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::lineSegmentPoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPoint(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPoint() instead") T lineSegmentPoint(const Vector2<T>& a, const Vector2<T>& b, const Vector2<T>& point) { |
|
||||||
return Math::Distance::lineSegmentPoint(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::lineSegmentPointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPointSquared(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPointSquared() instead") T lineSegmentPointSquared(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) { |
|
||||||
return Math::Distance::lineSegmentPointSquared(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::lineSegmentPoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::lineSegmentPoint(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::lineSegmentPointSquared() instead") T lineSegmentPoint(const Vector3<T>& a, const Vector3<T>& b, const Vector3<T>& point) { |
|
||||||
return Math::Distance::lineSegmentPoint(a, b, point); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::pointPlaneScaled(const Vector3<T>&, const Vector4<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::pointPlaneScaled(const Vector3<T>&, const Vector4<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::pointPlaneScaled() instead") T pointPlaneScaled(const Vector3<T>& point, const Vector4<T>& plane) { |
|
||||||
return Math::Distance::pointPlaneScaled(point, plane); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::pointPlane(const Vector3<T>&, const Vector4<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::pointPlane(const Vector3<T>&, const Vector4<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::pointPlane() instead") T pointPlane(const Vector3<T>& point, const Vector4<T>& plane) { |
|
||||||
return Math::Distance::pointPlane(point, plane); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Distance::pointPlaneNormalized(const Vector3<T>&, const Vector4<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Distance::pointPlaneNormalized(const Vector3<T>&, const Vector4<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Distance::pointPlaneNormalized() instead") T pointPlaneNormalized(const Vector3<T>& point, const Vector4<T>& plane) { |
|
||||||
return Math::Distance::pointPlaneNormalized(point, plane); |
|
||||||
} |
|
||||||
|
|
||||||
}}}} |
|
||||||
#else |
|
||||||
#error use Magnum/Math/Distance.h instead |
|
||||||
#endif |
|
||||||
|
|
||||||
#endif |
|
||||||
@ -1,92 +0,0 @@ |
|||||||
#ifndef Magnum_Math_Geometry_Intersection_h |
|
||||||
#define Magnum_Math_Geometry_Intersection_h |
|
||||||
/*
|
|
||||||
This file is part of Magnum. |
|
||||||
|
|
||||||
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
|
||||||
2020 Vladimír Vondruš <mosra@centrum.cz> |
|
||||||
Copyright © 2016, 2018 Jonathan Hale <squareys@googlemail.com> |
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a |
|
||||||
copy of this software and associated documentation files (the "Software"), |
|
||||||
to deal in the Software without restriction, including without limitation |
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
||||||
and/or sell copies of the Software, and to permit persons to whom the |
|
||||||
Software is furnished to do so, subject to the following conditions: |
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included |
|
||||||
in all copies or substantial portions of the Software. |
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
||||||
DEALINGS IN THE SOFTWARE. |
|
||||||
*/ |
|
||||||
|
|
||||||
/** @file
|
|
||||||
* @m_deprecated_since{201,10} Use @ref Magnum/Math/Intersection.h instead. |
|
||||||
*/ |
|
||||||
|
|
||||||
#include "Magnum/configure.h" |
|
||||||
|
|
||||||
#ifdef MAGNUM_BUILD_DEPRECATED |
|
||||||
#include "Magnum/Math/Intersection.h" |
|
||||||
|
|
||||||
CORRADE_DEPRECATED_FILE("use Magnum/Math/Intersection.h instead") |
|
||||||
|
|
||||||
/** @namespace Magnum::Math::Geometry::Intersection
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Magnum::Math::Intersection instead. |
|
||||||
*/ |
|
||||||
|
|
||||||
namespace Magnum { namespace Math { namespace Geometry { namespace Intersection { |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Intersection::lineSegmentLineSegment(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::lineSegmentLineSegment(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::lineSegmentLineSegment() instead") std::pair<T, T> lineSegmentLineSegment(const Vector2<T>& p, const Vector2<T>& r, const Vector2<T>& q, const Vector2<T>& s) { |
|
||||||
return Math::Intersection::lineSegmentLineSegment(p, r, q, s); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Intersection::lineSegmentLine(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::lineSegmentLine(const Vector2<T>&, const Vector2<T>&, const Vector2<T>&, const Vector2<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::lineSegmentLine() instead") T lineSegmentLine(const Vector2<T>& p, const Vector2<T>& r, const Vector2<T>& q, const Vector2<T>& s) { |
|
||||||
return Math::Intersection::lineSegmentLine(p, r, q, s); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Intersection::planeLine(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&, const Vector3<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::planeLine(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&, const Vector3<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::planeLine() instead") T planeLine(const Vector3<T>& planePosition, const Vector3<T>& planeNormal, const Vector3<T>& p, const Vector3<T>& r) { |
|
||||||
return Math::Intersection::planeLine(planePosition, planeNormal, p, r); |
|
||||||
} |
|
||||||
|
|
||||||
/** @brief @copybrief Math::Intersection::pointFrustum(const Vector3<T>&, const Frustum<T>&)
|
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::pointFrustum(const Vector3<T>&, const Frustum<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::pointFrustum() instead") bool pointFrustum(const Vector3<T>& point, const Frustum<T>& frustum) { |
|
||||||
return Math::Intersection::pointFrustum(point, frustum); |
|
||||||
} |
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief @copybrief Math::Intersection::rangeFrustum(const Range3D<T>&, const Frustum<T>&) |
|
||||||
* @m_deprecated_since{2018,10} Use @ref Math::Intersection::rangeFrustum(const Range3D<T>&, const Frustum<T>&) |
|
||||||
* instead. |
|
||||||
*/ |
|
||||||
template<class T> inline CORRADE_DEPRECATED("use Math::Intersection::rangeFrustum() instead") bool boxFrustum(const Range3D<T>& box, const Frustum<T>& frustum) { |
|
||||||
return Math::Intersection::rangeFrustum(box, frustum); |
|
||||||
} |
|
||||||
|
|
||||||
}}}} |
|
||||||
#else |
|
||||||
#error use Magnum/Math/Intesection.h instead |
|
||||||
#endif |
|
||||||
|
|
||||||
#endif |
|
||||||
Loading…
Reference in new issue