[Bf-blender-cvs] [47e71e8746] uv_unwrapping_slim_algorithm: taking care of compiler warnings
Aurel Gruber
noreply at git.blender.org
Wed Mar 15 16:49:14 CET 2017
Commit: 47e71e8746c6d9eff88b58d44520fcb891e3d15f
Author: Aurel Gruber
Date: Wed Mar 15 16:33:38 2017 +0100
Branches: uv_unwrapping_slim_algorithm
https://developer.blender.org/rB47e71e8746c6d9eff88b58d44520fcb891e3d15f
taking care of compiler warnings
===================================================================
D intern/slim/ext/libigl_extract/igl/harmonic.cpp
D intern/slim/ext/libigl_extract/igl/harmonic.h
D intern/slim/ext/libigl_extract/min_quad_with_fixed.cpp
D intern/slim/ext/libigl_extract/min_quad_with_fixed.h
D intern/slim/ext/libigl_extract/slice.cpp
D intern/slim/ext/libigl_extract/slice.h
M intern/slim/intern/slim.cpp
M intern/slim/intern/slim_parametrizer.cpp
M intern/slim/intern/uv_initializer.cpp
M source/blender/editors/uvedit/uvedit_parametrizer.c
===================================================================
diff --git a/intern/slim/ext/libigl_extract/igl/harmonic.cpp b/intern/slim/ext/libigl_extract/igl/harmonic.cpp
deleted file mode 100644
index 7a787b457e..0000000000
--- a/intern/slim/ext/libigl_extract/igl/harmonic.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-//
-// Copyright (C) 2014 Alec Jacobson <alecjacobson at gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla Public License
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can
-// obtain one at http://mozilla.org/MPL/2.0/.
-#include "harmonic.h"
-#include "massmatrix.h"
-#include "isdiag.h"
-#include "min_quad_with_fixed.h"
-#include "cotmatrix.h"
-#include "invert_diag.h"
-
-
-/*
-#include "adjacency_matrix.h"
-#include "diag.h"
-#include "invert_diag.h"
-#include "isdiag.h"
-#include "massmatrix.h"
-#include "min_quad_with_fixed.h"
-#include "speye.h"
-#include "sum.h"
-#include <Eigen/Sparse>*/
-
-#include <Eigen/Sparse>
-
-template <
- typename DerivedV,
- typename DerivedF,
- typename Derivedb,
- typename Derivedbc,
- typename DerivedW>
-IGL_INLINE bool igl::harmonic(
- const Eigen::PlainObjectBase<DerivedV> & V,
- const Eigen::PlainObjectBase<DerivedF> & F,
- const Eigen::PlainObjectBase<Derivedb> & b,
- const Eigen::PlainObjectBase<Derivedbc> & bc,
- const int k,
- Eigen::PlainObjectBase<DerivedW> & W)
-{
- using namespace Eigen;
- typedef typename DerivedV::Scalar Scalar;
- SparseMatrix<Scalar> L,M;
- cotmatrix(V,F,L);
- massmatrix(V,F,MASSMATRIX_TYPE_DEFAULT,M);
- return harmonic(L,M,b,bc,k,W);
-}
-
-template <
- typename DerivedF,
- typename Derivedb,
- typename Derivedbc,
- typename DerivedW>
-IGL_INLINE bool igl::harmonic(
- const Eigen::PlainObjectBase<DerivedF> & F,
- const Eigen::PlainObjectBase<Derivedb> & b,
- const Eigen::PlainObjectBase<Derivedbc> & bc,
- const int k,
- Eigen::PlainObjectBase<DerivedW> & W)
-{
- using namespace Eigen;
- typedef typename Derivedbc::Scalar Scalar;
- SparseMatrix<Scalar> A;
- adjacency_matrix(F,A);
- // sum each row
- SparseVector<Scalar> Asum;
- sum(A,1,Asum);
- // Convert row sums into diagonal of sparse matrix
- SparseMatrix<Scalar> Adiag;
- diag(Asum,Adiag);
- SparseMatrix<Scalar> L = A-Adiag;
- SparseMatrix<Scalar> M;
- speye(L.rows(),M);
- return harmonic(L,M,b,bc,k,W);
-}
-
-template <
- typename DerivedL,
- typename DerivedM,
- typename Derivedb,
- typename Derivedbc,
- typename DerivedW>
-IGL_INLINE bool igl::harmonic(
- const Eigen::SparseMatrix<DerivedL> & L,
- const Eigen::SparseMatrix<DerivedM> & M,
- const Eigen::PlainObjectBase<Derivedb> & b,
- const Eigen::PlainObjectBase<Derivedbc> & bc,
- const int k,
- Eigen::PlainObjectBase<DerivedW> & W)
-{
- const int n = L.rows();
- assert(n == L.cols() && "L must be square");
- assert(n == M.cols() && "M must be same size as L");
- assert(n == M.rows() && "M must be square");
- assert(igl::isdiag(M) && "Mass matrix should be diagonal");
-
- Eigen::SparseMatrix<DerivedL> Q;
- igl::harmonic(L,M,k,Q);
-
- typedef DerivedL Scalar;
- min_quad_with_fixed_data<Scalar> data;
- min_quad_with_fixed_precompute(Q,b,Eigen::SparseMatrix<Scalar>(),true,data);
- W.resize(n,bc.cols());
- typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1> VectorXS;
- const VectorXS B = VectorXS::Zero(n,1);
- for(int w = 0;w<bc.cols();w++)
- {
- const VectorXS bcw = bc.col(w);
- VectorXS Ww;
- if(!min_quad_with_fixed_solve(data,B,bcw,VectorXS(),Ww))
- {
- return false;
- }
- W.col(w) = Ww;
- }
- return true;
-}
-
-template <
- typename DerivedL,
- typename DerivedM,
- typename DerivedQ>
-IGL_INLINE void igl::harmonic(
- const Eigen::SparseMatrix<DerivedL> & L,
- const Eigen::SparseMatrix<DerivedM> & M,
- const int k,
- Eigen::SparseMatrix<DerivedQ> & Q)
-{
- assert(L.rows() == L.cols()&&"L should be square");
- assert(M.rows() == M.cols()&&"M should be square");
- assert(L.rows() == M.rows()&&"L should match M's dimensions");
- Eigen::SparseMatrix<DerivedM> Mi;
- invert_diag(M,Mi);
- Q = -L;
- for(int p = 1;p<k;p++)
- {
- Q = (Q*Mi*-L).eval();
- }
-}
-
-template <
- typename DerivedV,
- typename DerivedF,
- typename DerivedQ>
-IGL_INLINE void igl::harmonic(
- const Eigen::PlainObjectBase<DerivedV> & V,
- const Eigen::PlainObjectBase<DerivedF> & F,
- const int k,
- Eigen::SparseMatrix<DerivedQ> & Q)
-{
- Eigen::SparseMatrix<DerivedQ> L,M;
- cotmatrix(V,F,L);
- massmatrix(V,F,MASSMATRIX_TYPE_DEFAULT,M);
- return harmonic(L,M,k,Q);
-}
-
-#ifdef IGL_STATIC_LIBRARY
-// Explicit template specialization
-template bool igl::harmonic<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, [...]
-template bool igl::harmonic<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1 [...]
-template bool igl::harmonic<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double [...]
-
-template bool igl::harmonic<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
-template bool igl::harmonic<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
-template bool igl::harmonic<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
-template void igl::harmonic<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, int, Eigen::SparseMatrix<double, 0, int>&);
-#endif
diff --git a/intern/slim/ext/libigl_extract/igl/harmonic.h b/intern/slim/ext/libigl_extract/igl/harmonic.h
deleted file mode 100644
index 23d515238c..0000000000
--- a/intern/slim/ext/libigl_extract/igl/harmonic.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// This file is part of libigl, a simple c++ geometry processing library.
-//
-// Copyright (C) 2013 Alec Jacobson <alecjacobson at gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla Public License
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can
-// obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef IGL_HARMONIC_H
-#define IGL_HARMONIC_H
-#include "igl_inline.h"
-#include <Eigen/Core>
-#include <Eigen/Sparse>
-namespace igl
-{
- // Compute k-harmonic weight functions "coordinates".
- //
- //
- // Inputs:
- // V #V by dim vertex positions
- // F #F by simplex-size list of element indices
- // b #b boundary indices into V
- // bc #b by #W list of boundary values
- // k power of harmonic operation (1: harmonic, 2: biharmonic, etc)
- // Outputs:
- // W #V by #W list of weights
- //
- template <
- typename DerivedV,
- typename DerivedF,
- typename Derivedb,
- typename Derivedbc,
- typename DerivedW>
- IGL_INLINE bool harmonic(
- const Eigen::PlainObjectBase<DerivedV> & V,
- const Eigen::PlainObjectBase<DerivedF> & F,
- const Eigen::PlainObjectBase<Derivedb> & b,
- const Eigen::PlainObjectBase<Derivedbc> & bc,
- const int k,
- Eigen::PlainObjectBase<DerivedW> & W);
- // Compute harmonic map using uniform laplacian operator
- //
- // Inputs:
- // F #F by simplex-size list of element indices
- // b #b boundary indices into V
- // bc #b by #W list of boundary values
- // k power of harmonic operation (1: harmonic, 2: biharmonic, etc)
- // Outputs:
- // W #V by #W list of weights
- //
- template <
- typename DerivedF,
- typename Derivedb,
- typename Derivedbc,
- typename DerivedW>
- IGL_INLINE bool harmonic(
- const Eigen::PlainObjectBase<DerivedF> & F
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list