mirror of https://github.com/CGAL/cgal
Misc minor changes
This commit is contained in:
parent
cff1c99d3d
commit
37e35eeea8
|
|
@ -54,7 +54,7 @@ int main(int argc, char * argv[])
|
|||
|
||||
// Two property maps to store the seam edges and vertices
|
||||
Seam_edge_pmap seam_edge_pm = sm.add_property_map<SM_edge_descriptor, bool>("e:on_seam", false).first;
|
||||
Seam_vertex_pmap seam_vertex_pm = sm.add_property_map<SM_vertex_descriptor, bool>("v:on_seam",false).first;
|
||||
Seam_vertex_pmap seam_vertex_pm = sm.add_property_map<SM_vertex_descriptor, bool>("v:on_seam", false).first;
|
||||
|
||||
const char* filename = (argc>2) ? argv[2] : "data/lion.selection.txt";
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ int main(int argc, char * argv[])
|
|||
|
||||
SurfaceMesh sm; // underlying mesh of the seam mesh
|
||||
|
||||
const char* mesh_filename = (argc>1) ? argv[1] : "../data/bunny.off";
|
||||
const char* mesh_filename = (argc>1) ? argv[1] : "../data/bear.off";
|
||||
std::ifstream in_mesh(mesh_filename);
|
||||
if(!in_mesh) {
|
||||
std::cerr << "Error: problem loading the input data" << std::endl;
|
||||
|
|
@ -160,7 +160,7 @@ int main(int argc, char * argv[])
|
|||
// -- the first line for the cones indices
|
||||
// -- the second line must be empty
|
||||
// -- the third line optionally provides the seam edges indices as 'e11 e12 e21 e22 e31 e32' etc.
|
||||
const char* cone_filename = (argc>2) ? argv[2] : "../data/bunny.selection.txt";
|
||||
const char* cone_filename = (argc>2) ? argv[2] : "../data/bear.selection.txt";
|
||||
|
||||
// Read the cones and find the corresponding vertex_descriptor in the underlying mesh 'sm'
|
||||
std::vector<SM_vertex_descriptor> cone_vds_in_sm(3);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/circulator.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/function_output_iterator.hpp>
|
||||
|
|
@ -61,14 +60,8 @@
|
|||
|
||||
// @todo Handle the case cot = 0 with a local parameterization aligned with the axes
|
||||
// (this produces C2=0 which is problematic to compute a & b)
|
||||
// @todo test ARAP + SEAM
|
||||
// @todo Add distortion measures
|
||||
// @todo non-simple border in MVC_post_processor
|
||||
// @todo clean OpenNL from LSCM
|
||||
// @todo Fix PMP::border_halfedges() (add a "!")
|
||||
|
||||
// @todo look up the matlab code
|
||||
|
||||
// @todo Parallelize the local phase?
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -1091,8 +1084,7 @@ private:
|
|||
// Solve "A*Xv = Bv". On success, the solution is (1/Dv) * Xv.
|
||||
NT Du, Dv;
|
||||
if(!get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) ||
|
||||
!get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv))
|
||||
{
|
||||
!get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv)) {
|
||||
std::cout << "Could not solve linear system" << std::endl;
|
||||
status = ERROR_CANNOT_SOLVE_LINEAR_SYSTEM;
|
||||
return status;
|
||||
|
|
@ -1227,19 +1219,6 @@ private:
|
|||
return OK;
|
||||
}
|
||||
|
||||
/// Compute the quality of the parameterization.
|
||||
void compute_quality(const TriangleMesh& mesh,
|
||||
const Faces_vector& faces) const
|
||||
{
|
||||
|
||||
BOOST_FOREACH(face_descriptor fd, faces) {
|
||||
// compute the jacobian
|
||||
|
||||
// compute the singular values
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
/// Check if the 3D -> 2D mapping is one-to-one.
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ void output_uvmap_to_off(const TriangleMesh& mesh,
|
|||
vertex_descriptor vd = *vit;
|
||||
os << get(uvmap, vd) << " 0" << '\n';
|
||||
|
||||
// the vertices in 'vertices' are not in the same order as in vimap
|
||||
// in case the vertices in 'vertices' are not in the same order as in vimap
|
||||
renumbering_vector[get(vimap, vd)] = counter++;
|
||||
}
|
||||
|
||||
|
|
@ -92,10 +92,9 @@ void output_uvmap_to_off(const TriangleMesh& mesh,
|
|||
}
|
||||
|
||||
template <typename TriangleMesh,
|
||||
typename HD,
|
||||
typename VertexUVMap>
|
||||
void output_uvmap_to_off(const TriangleMesh& mesh,
|
||||
HD bhd,
|
||||
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor bhd,
|
||||
const VertexUVMap uvmap,
|
||||
std::ostream& os)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include <CGAL/Polygon_mesh_processing/connected_components.h>
|
||||
|
||||
#include <CGAL/circulator.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
#ifdef CGAL_EIGEN3_ENABLED
|
||||
#include <CGAL/Eigen_solver_traits.h>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <CGAL/Surface_mesh_parameterization/Error_code.h>
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/circulator.h>
|
||||
#include <CGAL/Eigen_solver_traits.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
|
@ -132,8 +133,8 @@ public:
|
|||
{
|
||||
std::cout << "Constraining " << ind << std::endl;
|
||||
|
||||
A.set_coef(2*ind, 2*ind, w, true /*new_coeff*/);
|
||||
A.set_coef(2*ind + 1, 2*ind + 1, w, true /*new_coeff*/);
|
||||
A.set_coef(2*ind, 2*ind, w, true /*new_coef*/);
|
||||
A.set_coef(2*ind + 1, 2*ind + 1, w, true /*new_coef*/);
|
||||
|
||||
B[2*ind] = rhs[0];
|
||||
B[2*ind + 1] = rhs[1];
|
||||
|
|
@ -158,8 +159,8 @@ public:
|
|||
|
||||
// <T(vert_ind,:), x_si>
|
||||
// obj.A(end+1, 2*sinds(ind)+[-1,0]) = T(vert_ind,:);
|
||||
A.set_coef(2*s + vert_ind, 2*s, T(vert_ind, 0), true /*new_coeff*/);
|
||||
A.set_coef(2*s + vert_ind, 2*s + 1, T(vert_ind, 1), true /*new_coeff*/);
|
||||
A.set_coef(2*s + vert_ind, 2*s, T(vert_ind, 0), true /*new_coef*/);
|
||||
A.set_coef(2*s + vert_ind, 2*s + 1, T(vert_ind, 1), true /*new_coef*/);
|
||||
|
||||
// -<T(vert_ind,:), x_s1>
|
||||
// obj.A(end, 2*sinds(1)+[-1,0]) = obj.A(end, 2*sinds(1)+[-1,0]) - T(vert_ind,:);
|
||||
|
|
@ -367,7 +368,7 @@ public:
|
|||
const VertexIndexMap vimap) const
|
||||
{
|
||||
std::cout << "size of X: " << X.size() << std::endl;
|
||||
CGAL_assertion(X.size() == 2*num_vertices(mesh) );
|
||||
CGAL_assertion(X.size() == 2 * num_vertices(mesh) );
|
||||
|
||||
BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)) {
|
||||
int index = get(vimap, vd);
|
||||
|
|
@ -411,7 +412,7 @@ public:
|
|||
for(int k=0; k<L.eigen_object().outerSize(); ++k) {
|
||||
for(typename Eigen::SparseMatrix<double>::InnerIterator
|
||||
it(L.eigen_object(), k); it; ++it) {
|
||||
M.set_coef(it.row(), it.col(), it.value(), true /*new_coeff*/);
|
||||
M.set_coef(it.row(), it.col(), it.value(), true /*new_coef*/);
|
||||
// std::cout << it.row() << " " << it.col() << " " << it.value() << '\n';
|
||||
}
|
||||
}
|
||||
|
|
@ -421,8 +422,8 @@ public:
|
|||
for(int k=0; k<A.eigen_object().outerSize(); ++k) {
|
||||
for(typename Eigen::SparseMatrix<double>::InnerIterator
|
||||
it(A.eigen_object(), k); it; ++it) {
|
||||
M.set_coef(it.col(), it.row() + n, it.value(), true /*new_coeff*/); // A
|
||||
M.set_coef(it.row() + n, it.col(), it.value(), true /*new_coeff*/); // A'
|
||||
M.set_coef(it.col(), it.row() + n, it.value(), true /*new_coef*/); // A
|
||||
M.set_coef(it.row() + n, it.col(), it.value(), true /*new_coef*/); // A'
|
||||
// std::cout << it.row() << " " << it.col() << " " << it.value() << '\n';
|
||||
}
|
||||
}
|
||||
|
|
@ -518,7 +519,7 @@ public:
|
|||
// Energy (Laplacian)
|
||||
// %%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
Matrix L(2*nbVertices, 2*nbVertices);
|
||||
Matrix L(2 * nbVertices, 2 * nbVertices);
|
||||
mean_value_laplacian(mesh, vimap, L);
|
||||
|
||||
#ifdef CGAL_SMP_OUTPUT_ORBITAL_MATRICES
|
||||
|
|
|
|||
Loading…
Reference in New Issue