quadric_binary_plus_operator.cpp 891 B

123456789101112131415161718192021222324
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Alec Jacobson <alecjacobson@gmail.com>
  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. #include "quadric_binary_plus_operator.h"
  9. IGL_INLINE std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double>
  10. igl::operator+(
  11. const std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double> & a,
  12. const std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double> & b)
  13. {
  14. std::tuple<
  15. Eigen::MatrixXd,
  16. Eigen::RowVectorXd,
  17. double> c;
  18. std::get<0>(c) = (std::get<0>(a) + std::get<0>(b)).eval();
  19. std::get<1>(c) = (std::get<1>(a) + std::get<1>(b)).eval();
  20. std::get<2>(c) = (std::get<2>(a) + std::get<2>(b));
  21. return c;
  22. }