Browse Source

Math: add the Bezier class and aliases to the forward declaration header.

pull/175/merge
Vladimír Vondruš 10 years ago
parent
commit
4af823a674
  1. 12
      src/Magnum/Math/Bezier.h
  2. 8
      src/Magnum/Math/Math.h

12
src/Magnum/Math/Bezier.h

@ -135,7 +135,9 @@ Convenience alternative to `Bezier<2, dimensions, T>`. See @ref Bezier for more
information.
@see @ref QuadraticBezier2D, @ref QuadraticBezier3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<UnsignedInt dimensions, class T> using QuadraticBezier = Bezier<2, dimensions, T>;
#endif
/**
@brief Two-dimensional quadratic Bézier curve
@ -144,7 +146,9 @@ Convenience alternative to `QuadraticBezier<2, T>`. See @ref QuadraticBezier
and @ref Bezier for more information.
@see @ref QuadraticBezier3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using QuadraticBezier2D = QuadraticBezier<2, T>;
#endif
/**
@brief Three-dimensional quadratic Bézier curve
@ -153,7 +157,9 @@ Convenience alternative to `QuadraticBezier<3, T>`. See @ref QuadraticBezier
and @ref Bezier for more information.
@see @ref QuadraticBezier2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using QuadraticBezier3D = QuadraticBezier<3, T>;
#endif
/**
@brief Cubic Bézier curve
@ -162,7 +168,9 @@ Convenience alternative to `Bezier<3, dimensions, T>`. See @ref Bezier for more
information.
@see @ref CubicBezier2D, @ref CubicBezier3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<UnsignedInt dimensions, class T> using CubicBezier = Bezier<3, dimensions, T>;
#endif
/**
@brief Two-dimensional cubic Bézier curve
@ -171,7 +179,9 @@ Convenience alternative to `CubicBezier<2, T>`. See @ref CubicBezier
and @ref Bezier for more information.
@see @ref CubicBezier3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using CubicBezier2D = CubicBezier<2, T>;
#endif
/**
@brief Three-dimensional cubic Bézier curve
@ -180,7 +190,9 @@ Convenience alternative to `CubicBezier<3, T>`. See @ref CubicBezier
and @ref Bezier for more information.
@see @ref CubicBezier2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using CubicBezier3D = CubicBezier<3, T>;
#endif
}}

8
src/Magnum/Math/Math.h

@ -41,6 +41,14 @@ namespace Magnum { namespace Math {
#ifndef DOXYGEN_GENERATING_OUTPUT
/* Class Constants used only statically */
template<UnsignedInt, UnsignedInt, class> class Bezier;
template<UnsignedInt dimensions, class T> using QuadraticBezier = Bezier<2, dimensions, T>;
template<UnsignedInt dimensions, class T> using CubicBezier = Bezier<3, dimensions, T>;
template<class T> using QuadraticBezier2D = QuadraticBezier<2, T>;
template<class T> using QuadraticBezier3D = QuadraticBezier<3, T>;
template<class T> using CubicBezier2D = CubicBezier<2, T>;
template<class T> using CubicBezier3D = CubicBezier<3, T>;
template<class> class Complex;
template<class> class Dual;
template<class> class DualComplex;

Loading…
Cancel
Save