assign.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Alec Jacobson <[email protected]>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_COPYLEFT_CGAL_ASSIGN_H
  9. #define IGL_COPYLEFT_CGAL_ASSIGN_H
  10. #include "../../igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
  13. namespace igl
  14. {
  15. namespace copyleft
  16. {
  17. namespace cgal
  18. {
  19. /// Vector version of assign_scalar
  20. ///
  21. /// @param[in] C matrix of scalars
  22. /// @param[in] slow_and_more_precise see assign_scalar
  23. /// @param[out] D matrix same size as C
  24. ///
  25. /// \see assign_scalar
  26. template <typename DerivedC, typename DerivedD>
  27. IGL_INLINE void assign(
  28. const Eigen::MatrixBase<DerivedC> & C,
  29. const bool slow_and_more_precise,
  30. Eigen::PlainObjectBase<DerivedD> & D);
  31. /// \overload
  32. template <typename DerivedC, typename DerivedD>
  33. IGL_INLINE void assign(
  34. const Eigen::MatrixBase<DerivedC> & C,
  35. Eigen::PlainObjectBase<DerivedD> & D);
  36. /// \overload
  37. template <typename ReturnScalar, typename DerivedC>
  38. IGL_INLINE
  39. Eigen::Matrix<
  40. ReturnScalar,
  41. DerivedC::RowsAtCompileTime,
  42. DerivedC::ColsAtCompileTime,
  43. 1,
  44. DerivedC::MaxRowsAtCompileTime,
  45. DerivedC::MaxColsAtCompileTime>
  46. assign(
  47. const Eigen::MatrixBase<DerivedC> & C);
  48. }
  49. }
  50. }
  51. #ifndef IGL_STATIC_LIBRARY
  52. # include "assign.cpp"
  53. #endif
  54. #endif