mirror of https://github.com/CGAL/cgal
Fixed documenting some functions that should not be documented
This commit is contained in:
parent
d7db2cba16
commit
c2981be99d
|
|
@ -202,31 +202,31 @@ private:
|
||||||
|
|
||||||
// Private fields
|
// Private fields
|
||||||
private:
|
private:
|
||||||
/// %Object that maps (at least two) border vertices onto a 2D space
|
// %Object that maps (at least two) border vertices onto a 2D space
|
||||||
Border_parameterizer m_borderParameterizer;
|
Border_parameterizer m_borderParameterizer;
|
||||||
|
|
||||||
/// Traits object to solve a sparse linear system
|
// Traits object to solve a sparse linear system
|
||||||
Solver_traits m_linearAlgebra;
|
Solver_traits m_linearAlgebra;
|
||||||
|
|
||||||
/// Controlling parameters
|
// Controlling parameters
|
||||||
const NT m_lambda;
|
const NT m_lambda;
|
||||||
const NT m_lambda_tolerance; // used to determine when we switch to full ARAP
|
const NT m_lambda_tolerance; // used to determine when we switch to full ARAP
|
||||||
|
|
||||||
/// Energy minimization parameters
|
// Energy minimization parameters
|
||||||
const unsigned int m_iterations;
|
const unsigned int m_iterations;
|
||||||
const NT m_tolerance;
|
const NT m_tolerance;
|
||||||
|
|
||||||
// Private accessors
|
// Private accessors
|
||||||
private:
|
private:
|
||||||
/// Get the object that maps the surface's border onto a 2D space.
|
// Get the object that maps the surface's border onto a 2D space.
|
||||||
Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; }
|
Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; }
|
||||||
|
|
||||||
/// Get the sparse linear algebra (traits object to access the linear system).
|
// Get the sparse linear algebra (traits object to access the linear system).
|
||||||
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
|
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
|
||||||
|
|
||||||
// Private utilities
|
// Private utilities
|
||||||
private:
|
private:
|
||||||
/// Print the parameterized mesh.
|
// Print the parameterized mesh.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
void output_uvmap(const std::string filename,
|
void output_uvmap(const std::string filename,
|
||||||
|
|
@ -240,7 +240,7 @@ private:
|
||||||
IO::output_uvmap_to_off(mesh, vertices, faces, uvmap, vimap, out);
|
IO::output_uvmap_to_off(mesh, vertices, faces, uvmap, vimap, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Print the parameterized mesh.
|
// Print the parameterized mesh.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
void output_uvmap(const std::string filename,
|
void output_uvmap(const std::string filename,
|
||||||
|
|
@ -257,7 +257,7 @@ private:
|
||||||
output_uvmap_to_off(mesh, vertices, faces, uvmap, vimap, out);
|
output_uvmap_to_off(mesh, vertices, faces, uvmap, vimap, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copy the data from two vectors to the UVmap.
|
// Copy the data from two vectors to the UVmap.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
void assign_solution(const Vector& Xu,
|
void assign_solution(const Vector& Xu,
|
||||||
|
|
@ -276,7 +276,7 @@ private:
|
||||||
|
|
||||||
// Private operations
|
// Private operations
|
||||||
private:
|
private:
|
||||||
/// Store the vertices and faces of the mesh in memory.
|
// Store the vertices and faces of the mesh in memory.
|
||||||
Error_code initialize_containers(const TriangleMesh& mesh,
|
Error_code initialize_containers(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd,
|
halfedge_descriptor bhd,
|
||||||
Vertex_set& vertices,
|
Vertex_set& vertices,
|
||||||
|
|
@ -294,7 +294,7 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize the UV values with a first parameterization of the input.
|
// Initialize the UV values with a first parameterization of the input.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
Error_code compute_initial_uv_map(TriangleMesh& mesh,
|
Error_code compute_initial_uv_map(TriangleMesh& mesh,
|
||||||
|
|
@ -330,8 +330,8 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parameterize the border. The number of fixed vertices depends on the value
|
// Parameterize the border. The number of fixed vertices depends on the value
|
||||||
/// of the parameter λ.
|
// of the parameter λ.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
|
|
@ -367,7 +367,7 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the cotangent of the angle between the vectors ij and ik.
|
// Compute the cotangent of the angle between the vectors ij and ik.
|
||||||
void compute_cotangent_angle(const TriangleMesh& mesh,
|
void compute_cotangent_angle(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor hd,
|
halfedge_descriptor hd,
|
||||||
vertex_descriptor vi,
|
vertex_descriptor vi,
|
||||||
|
|
@ -387,7 +387,7 @@ private:
|
||||||
put(ctmap, hd, cot);
|
put(ctmap, hd, cot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fill the map 'ctmap' with the cotangents of the angles of the faces of 'mesh'.
|
// Fill the map 'ctmap' with the cotangents of the angles of the faces of 'mesh'.
|
||||||
Error_code compute_cotangent_angles(const TriangleMesh& mesh,
|
Error_code compute_cotangent_angles(const TriangleMesh& mesh,
|
||||||
const Faces_vector& faces,
|
const Faces_vector& faces,
|
||||||
Cot_map ctmap) const
|
Cot_map ctmap) const
|
||||||
|
|
@ -414,7 +414,7 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
|
// Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i.
|
||||||
NT compute_w_ij(const TriangleMesh& mesh,
|
NT compute_w_ij(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor hd,
|
halfedge_descriptor hd,
|
||||||
const Cot_map ctmap) const
|
const Cot_map ctmap) const
|
||||||
|
|
@ -433,13 +433,13 @@ private:
|
||||||
return weight;
|
return weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the line i of matrix A
|
// Compute the line i of matrix A
|
||||||
/// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
|
// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
|
||||||
/// - compute w_ii = - sum of w_ijs.
|
// - compute w_ii = - sum of w_ijs.
|
||||||
///
|
//
|
||||||
/// \pre Vertices must be indexed.
|
// \pre Vertices must be indexed.
|
||||||
/// \pre Vertex i musn't be already parameterized.
|
// \pre Vertex i musn't be already parameterized.
|
||||||
/// \pre Line i of A must contain only zeros.
|
// \pre Line i of A must contain only zeros.
|
||||||
template <typename VertexIndexMap>
|
template <typename VertexIndexMap>
|
||||||
Error_code fill_linear_system_matrix(Matrix& A,
|
Error_code fill_linear_system_matrix(Matrix& A,
|
||||||
const TriangleMesh& mesh,
|
const TriangleMesh& mesh,
|
||||||
|
|
@ -480,8 +480,8 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize the (constant) matrix A in the linear system "A*X = B",
|
// Initialize the (constant) matrix A in the linear system "A*X = B",
|
||||||
/// after (at least two) border vertices parameterization.
|
// after (at least two) border vertices parameterization.
|
||||||
template <typename VertexIndexMap,
|
template <typename VertexIndexMap,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
Error_code initialize_matrix_A(const TriangleMesh& mesh,
|
Error_code initialize_matrix_A(const TriangleMesh& mesh,
|
||||||
|
|
@ -510,7 +510,7 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Solves the cubic equation a3 x^3 + a2 x^2 + a1 x + a0 = 0.
|
// Solves the cubic equation a3 x^3 + a2 x^2 + a1 x + a0 = 0.
|
||||||
int solve_cubic_equation(const NT a3, const NT a2, const NT a1, const NT a0,
|
int solve_cubic_equation(const NT a3, const NT a2, const NT a1, const NT a0,
|
||||||
std::vector<NT>& roots) const
|
std::vector<NT>& roots) const
|
||||||
{
|
{
|
||||||
|
|
@ -529,7 +529,7 @@ private:
|
||||||
return roots.size();
|
return roots.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Solves the equation a3 x^3 + a2 x^2 + a1 x + a0 = 0, using CGAL's algeabric kernel.
|
// Solves the equation a3 x^3 + a2 x^2 + a1 x + a0 = 0, using CGAL's algeabric kernel.
|
||||||
int solve_cubic_equation_with_AK(const NT a3, const NT a2,
|
int solve_cubic_equation_with_AK(const NT a3, const NT a2,
|
||||||
const NT a1, const NT a0,
|
const NT a1, const NT a0,
|
||||||
std::vector<NT>& roots) const
|
std::vector<NT>& roots) const
|
||||||
|
|
@ -573,10 +573,10 @@ private:
|
||||||
return roots.size();
|
return roots.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Solve the bivariate system
|
// Solve the bivariate system
|
||||||
/// { C1 * a + 2 * lambda * a ( a^2 + b^2 - 1 ) = C2
|
// { C1 * a + 2 * lambda * a ( a^2 + b^2 - 1 ) = C2
|
||||||
/// { C1 * b + 2 * lambda * b ( a^2 + b^2 - 1 ) = C3
|
// { C1 * b + 2 * lambda * b ( a^2 + b^2 - 1 ) = C3
|
||||||
/// using CGAL's algeabric kernel.
|
// using CGAL's algeabric kernel.
|
||||||
int solve_bivariate_system(const NT C1, const NT C2, const NT C3,
|
int solve_bivariate_system(const NT C1, const NT C2, const NT C3,
|
||||||
std::vector<NT>& a_roots, std::vector<NT>& b_roots) const
|
std::vector<NT>& a_roots, std::vector<NT>& b_roots) const
|
||||||
{
|
{
|
||||||
|
|
@ -638,7 +638,7 @@ private:
|
||||||
return a_roots.size();
|
return a_roots.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the root that gives the lowest face energy.
|
// Compute the root that gives the lowest face energy.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
std::size_t compute_root_with_lowest_energy(const TriangleMesh& mesh,
|
std::size_t compute_root_with_lowest_energy(const TriangleMesh& mesh,
|
||||||
face_descriptor fd,
|
face_descriptor fd,
|
||||||
|
|
@ -665,7 +665,7 @@ private:
|
||||||
return index_arg;
|
return index_arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the root that gives the lowest face energy.
|
// Compute the root that gives the lowest face energy.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
std::size_t compute_root_with_lowest_energy(const TriangleMesh& mesh,
|
std::size_t compute_root_with_lowest_energy(const TriangleMesh& mesh,
|
||||||
face_descriptor fd,
|
face_descriptor fd,
|
||||||
|
|
@ -691,7 +691,7 @@ private:
|
||||||
return index_arg;
|
return index_arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the optimal values of the linear transformation matrices Lt.
|
// Compute the optimal values of the linear transformation matrices Lt.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
Error_code compute_optimal_Lt_matrices(const TriangleMesh& mesh,
|
Error_code compute_optimal_Lt_matrices(const TriangleMesh& mesh,
|
||||||
const Faces_vector& faces,
|
const Faces_vector& faces,
|
||||||
|
|
@ -792,8 +792,8 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the coordinates of the vertices p0, p1, p2
|
// Computes the coordinates of the vertices p0, p1, p2
|
||||||
/// in a local 2D orthonormal basis of the triangle's plane.
|
// in a local 2D orthonormal basis of the triangle's plane.
|
||||||
void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // in
|
void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // in
|
||||||
Point_2& z0, Point_2& z1, Point_2& z2) const // out
|
Point_2& z0, Point_2& z1, Point_2& z2) const // out
|
||||||
{
|
{
|
||||||
|
|
@ -821,7 +821,7 @@ private:
|
||||||
z2 = Point_2(x2, y2);
|
z2 = Point_2(x2, y2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the local parameterization (2D) of a face and store it in memory.
|
// Compute the local parameterization (2D) of a face and store it in memory.
|
||||||
void project_face(const TriangleMesh& mesh,
|
void project_face(const TriangleMesh& mesh,
|
||||||
vertex_descriptor vi,
|
vertex_descriptor vi,
|
||||||
vertex_descriptor vj,
|
vertex_descriptor vj,
|
||||||
|
|
@ -846,8 +846,8 @@ private:
|
||||||
lp.push_back(pvk);
|
lp.push_back(pvk);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Utility for fill_linear_system_rhs():
|
// Utility for fill_linear_system_rhs():
|
||||||
/// Compute the local isometric parameterization (2D) of the faces of the mesh.
|
// Compute the local isometric parameterization (2D) of the faces of the mesh.
|
||||||
Error_code compute_local_parameterization(const TriangleMesh& mesh,
|
Error_code compute_local_parameterization(const TriangleMesh& mesh,
|
||||||
const Faces_vector& faces,
|
const Faces_vector& faces,
|
||||||
Local_points& lp,
|
Local_points& lp,
|
||||||
|
|
@ -884,8 +884,8 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the coefficient b_ij = (i, j) of the right hand side vector B,
|
// Compute the coefficient b_ij = (i, j) of the right hand side vector B,
|
||||||
/// for j neighbor vertex of i.
|
// for j neighbor vertex of i.
|
||||||
void compute_b_ij(const TriangleMesh& mesh,
|
void compute_b_ij(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor hd,
|
halfedge_descriptor hd,
|
||||||
const Cot_map ctmap,
|
const Cot_map ctmap,
|
||||||
|
|
@ -950,12 +950,12 @@ private:
|
||||||
y += ct_l * ( -b_l * diff_l_x + a_l * diff_l_y );
|
y += ct_l * ( -b_l * diff_l_x + a_l * diff_l_y );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the line i of right hand side vectors Bu and Bv
|
// Compute the line i of right hand side vectors Bu and Bv
|
||||||
/// - call compute_b_ij() for each neighbor v_j to compute the B coefficient b_i
|
// - call compute_b_ij() for each neighbor v_j to compute the B coefficient b_i
|
||||||
///
|
//
|
||||||
/// \pre Vertices must be indexed.
|
// \pre Vertices must be indexed.
|
||||||
/// \pre Vertex i musn't be already parameterized.
|
// \pre Vertex i musn't be already parameterized.
|
||||||
/// \pre Lines i of Bu and Bv must be zero.
|
// \pre Lines i of Bu and Bv must be zero.
|
||||||
template <typename VertexIndexMap>
|
template <typename VertexIndexMap>
|
||||||
Error_code fill_linear_system_rhs(const TriangleMesh& mesh,
|
Error_code fill_linear_system_rhs(const TriangleMesh& mesh,
|
||||||
vertex_descriptor vertex,
|
vertex_descriptor vertex,
|
||||||
|
|
@ -995,9 +995,9 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the entries of the right hand side of the ARAP linear system.
|
// Compute the entries of the right hand side of the ARAP linear system.
|
||||||
///
|
//
|
||||||
/// \pre Vertices must be indexed.
|
// \pre Vertices must be indexed.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
|
|
@ -1034,8 +1034,8 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the right hand side and solve the linear system to obtain the
|
// Compute the right hand side and solve the linear system to obtain the
|
||||||
/// new UV coordinates.
|
// new UV coordinates.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
|
|
@ -1093,7 +1093,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Compute the current energy of a face, given a linear transformation matrix.
|
// Compute the current energy of a face, given a linear transformation matrix.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
NT compute_current_face_energy(const TriangleMesh& mesh,
|
NT compute_current_face_energy(const TriangleMesh& mesh,
|
||||||
face_descriptor fd,
|
face_descriptor fd,
|
||||||
|
|
@ -1136,7 +1136,7 @@ private:
|
||||||
return Ef;
|
return Ef;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the current energy of a face.
|
// Compute the current energy of a face.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
NT compute_current_face_energy(const TriangleMesh& mesh,
|
NT compute_current_face_energy(const TriangleMesh& mesh,
|
||||||
face_descriptor fd,
|
face_descriptor fd,
|
||||||
|
|
@ -1153,7 +1153,7 @@ private:
|
||||||
return compute_current_face_energy(mesh, fd, ctmap, lp, lpmap, uvmap, a, b);
|
return compute_current_face_energy(mesh, fd, ctmap, lp, lpmap, uvmap, a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the current energy of the parameterization.
|
// Compute the current energy of the parameterization.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
NT compute_current_energy(const TriangleMesh& mesh,
|
NT compute_current_energy(const TriangleMesh& mesh,
|
||||||
const Faces_vector& faces,
|
const Faces_vector& faces,
|
||||||
|
|
@ -1176,8 +1176,8 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Post processing functions
|
// Post processing functions
|
||||||
/// Use the convex virtual boundary algorithm of Karni et al.[2005] to fix
|
// Use the convex virtual boundary algorithm of Karni et al.[2005] to fix
|
||||||
/// the (hopefully few) flips in the result.
|
// the (hopefully few) flips in the result.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
Error_code post_process(const TriangleMesh& mesh,
|
Error_code post_process(const TriangleMesh& mesh,
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ protected:
|
||||||
|
|
||||||
// Private operations
|
// Private operations
|
||||||
private:
|
private:
|
||||||
/// Compute the total length of the border
|
// Compute the total length of the border
|
||||||
NT compute_border_length(const TriangleMesh& mesh,
|
NT compute_border_length(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd) const
|
halfedge_descriptor bhd) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -404,10 +404,10 @@ protected:
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
private:
|
private:
|
||||||
/// Object that maps the surface's border onto a 2D space.
|
// Object that maps the surface's border onto a 2D space.
|
||||||
Border_parameterizer m_borderParameterizer;
|
Border_parameterizer m_borderParameterizer;
|
||||||
|
|
||||||
/// Traits object to solve a sparse linear system
|
// Traits object to solve a sparse linear system
|
||||||
Solver_traits m_linearAlgebra;
|
Solver_traits m_linearAlgebra;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -272,12 +272,12 @@ public:
|
||||||
|
|
||||||
// Private operations
|
// Private operations
|
||||||
private:
|
private:
|
||||||
/// Initialize "A*X = B" linear system after
|
// Initialize "A*X = B" linear system after
|
||||||
/// (at least two) border vertices are parameterized.
|
// (at least two) border vertices are parameterized.
|
||||||
///
|
//
|
||||||
/// \pre Vertices must be indexed.
|
// \pre Vertices must be indexed.
|
||||||
/// \pre X and B must be allocated and empty.
|
// \pre X and B must be allocated and empty.
|
||||||
/// \pre At least 2 border vertices must be parameterized.
|
// \pre At least 2 border vertices must be parameterized.
|
||||||
template <typename UVmap, typename VertexIndexMap, typename VertexParameterizedMap>
|
template <typename UVmap, typename VertexIndexMap, typename VertexParameterizedMap>
|
||||||
void initialize_system_from_mesh_border(LeastSquaresSolver& solver,
|
void initialize_system_from_mesh_border(LeastSquaresSolver& solver,
|
||||||
const boost::unordered_set<vertex_descriptor>& ccvertices,
|
const boost::unordered_set<vertex_descriptor>& ccvertices,
|
||||||
|
|
@ -306,9 +306,9 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Utility for setup_triangle_relations():
|
// Utility for setup_triangle_relations():
|
||||||
/// Computes the coordinates of the vertices of a triangle
|
// Computes the coordinates of the vertices of a triangle
|
||||||
/// in a local 2D orthonormal basis of the triangle's plane.
|
// in a local 2D orthonormal basis of the triangle's plane.
|
||||||
void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // in
|
void project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // in
|
||||||
Point_2& z0, Point_2& z1, Point_2& z2) const // out
|
Point_2& z0, Point_2& z1, Point_2& z2) const // out
|
||||||
{
|
{
|
||||||
|
|
@ -338,9 +338,10 @@ private:
|
||||||
z2 = Point_2(x2, y2);
|
z2 = Point_2(x2, y2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create two lines in the linear system per triangle (one for u, one for v).
|
// Create two lines in the linear system per triangle (one for u, one for v).
|
||||||
///
|
//
|
||||||
/// \pre vertices of `mesh` must be indexed.
|
// \pre vertices of `mesh` must be indexed.
|
||||||
|
//
|
||||||
// Implementation note: LSCM equation is:
|
// Implementation note: LSCM equation is:
|
||||||
// (Z1 - Z0)(U2 - U0) = (Z2 - Z0)(U1 - U0)
|
// (Z1 - Z0)(U2 - U0) = (Z2 - Z0)(U1 - U0)
|
||||||
// where Uk = uk + i.v_k is the complex number corresponding to (u,v) coords
|
// where Uk = uk + i.v_k is the complex number corresponding to (u,v) coords
|
||||||
|
|
@ -427,18 +428,18 @@ private:
|
||||||
|
|
||||||
// Private accessors
|
// Private accessors
|
||||||
private:
|
private:
|
||||||
/// Get the object that maps the surface's border onto a 2D space.
|
// Get the object that maps the surface's border onto a 2D space.
|
||||||
Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; }
|
Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; }
|
||||||
|
|
||||||
/// Get the sparse linear algebra (traits object to access the linear system).
|
// Get the sparse linear algebra (traits object to access the linear system).
|
||||||
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
|
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
private:
|
private:
|
||||||
/// %Object that maps (at least two) border vertices onto a 2D space
|
// %Object that maps (at least two) border vertices onto a 2D space
|
||||||
Border_parameterizer m_borderParameterizer;
|
Border_parameterizer m_borderParameterizer;
|
||||||
|
|
||||||
/// Traits object to solve a sparse linear system
|
// Traits object to solve a sparse linear system
|
||||||
Solver_traits m_linearAlgebra;
|
Solver_traits m_linearAlgebra;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,6 @@ namespace Surface_mesh_parameterization {
|
||||||
// Declaration
|
// Declaration
|
||||||
// ------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// /// \ingroup PkgSurfaceParameterizationMethods
|
|
||||||
///
|
///
|
||||||
/// The class `MVC_post_processor_3` implements
|
/// The class `MVC_post_processor_3` implements
|
||||||
/// the *Free boundary linear Parameterization* algorithm \cgalCite{kami2005free}.
|
/// the *Free boundary linear Parameterization* algorithm \cgalCite{kami2005free}.
|
||||||
|
|
@ -149,16 +148,16 @@ private:
|
||||||
|
|
||||||
// Private fields
|
// Private fields
|
||||||
private:
|
private:
|
||||||
/// Traits object to solve a sparse linear system
|
// Traits object to solve a sparse linear system
|
||||||
Solver_traits m_linearAlgebra;
|
Solver_traits m_linearAlgebra;
|
||||||
|
|
||||||
// Private accessors
|
// Private accessors
|
||||||
private:
|
private:
|
||||||
/// Get the sparse linear algebra (traits object to access the linear system).
|
// Get the sparse linear algebra (traits object to access the linear system).
|
||||||
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
|
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
|
||||||
|
|
||||||
// Private utility
|
// Private utility
|
||||||
/// Print the exterior faces of the constrained triangulation.
|
// Print the exterior faces of the constrained triangulation.
|
||||||
template <typename CT>
|
template <typename CT>
|
||||||
void output_ct_exterior_faces(const CT& ct) const
|
void output_ct_exterior_faces(const CT& ct) const
|
||||||
{
|
{
|
||||||
|
|
@ -178,7 +177,7 @@ private:
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copy the data from two vectors to the UVmap.
|
// Copy the data from two vectors to the UVmap.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
void assign_solution(const Vector& Xu,
|
void assign_solution(const Vector& Xu,
|
||||||
|
|
@ -197,7 +196,7 @@ private:
|
||||||
|
|
||||||
// Private operations
|
// Private operations
|
||||||
private:
|
private:
|
||||||
/// Store the vertices and faces of the mesh in memory.
|
// Store the vertices and faces of the mesh in memory.
|
||||||
void initialize_containers(const TriangleMesh& mesh,
|
void initialize_containers(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd,
|
halfedge_descriptor bhd,
|
||||||
Vertex_set& vertices,
|
Vertex_set& vertices,
|
||||||
|
|
@ -210,7 +209,7 @@ private:
|
||||||
boost::make_function_output_iterator(fc));
|
boost::make_function_output_iterator(fc));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks whether the polygon's border is simple.
|
// Checks whether the polygon's border is simple.
|
||||||
template <typename VertexUVMap>
|
template <typename VertexUVMap>
|
||||||
bool is_polygon_simple(const TriangleMesh& mesh,
|
bool is_polygon_simple(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd,
|
halfedge_descriptor bhd,
|
||||||
|
|
@ -240,8 +239,8 @@ private:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Spread the inside / outside coloring from a Face to its neighbors
|
// Spread the inside / outside coloring from a Face to its neighbors
|
||||||
/// depending on whether the common edge is constrained.
|
// depending on whether the common edge is constrained.
|
||||||
template <typename CT>
|
template <typename CT>
|
||||||
void spread(CT& ct,
|
void spread(CT& ct,
|
||||||
const typename CT::Face_handle fh) const
|
const typename CT::Face_handle fh) const
|
||||||
|
|
@ -277,7 +276,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Triangulate the convex hull of the border of the parameterization.
|
// Triangulate the convex hull of the border of the parameterization.
|
||||||
template <typename CT,
|
template <typename CT,
|
||||||
typename VertexUVMap>
|
typename VertexUVMap>
|
||||||
Error_code triangulate_convex_hull(const TriangleMesh& mesh,
|
Error_code triangulate_convex_hull(const TriangleMesh& mesh,
|
||||||
|
|
@ -311,7 +310,7 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Color the (finite) faces of the constrained triangulation with an outside (-1) tag
|
// Color the (finite) faces of the constrained triangulation with an outside (-1) tag
|
||||||
template <typename CT>
|
template <typename CT>
|
||||||
Error_code color_faces(CT& ct) const
|
Error_code color_faces(CT& ct) const
|
||||||
{
|
{
|
||||||
|
|
@ -353,7 +352,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
// -> ->
|
// -> ->
|
||||||
/// Return angle (in radians) of of (P,Q,R) corner (i.e. QP,QR angle).
|
// Return angle (in radians) of of (P,Q,R) corner (i.e. QP,QR angle).
|
||||||
double compute_angle_rad(const Point_2& P,
|
double compute_angle_rad(const Point_2& P,
|
||||||
const Point_2& Q,
|
const Point_2& Q,
|
||||||
const Point_2& R) const
|
const Point_2& R) const
|
||||||
|
|
@ -368,7 +367,7 @@ private:
|
||||||
return angle;
|
return angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fix vertices that are on the convex hull.
|
// Fix vertices that are on the convex hull.
|
||||||
template <typename CT,
|
template <typename CT,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
void fix_convex_hull_border(const CT& ct,
|
void fix_convex_hull_border(const CT& ct,
|
||||||
|
|
@ -440,8 +439,8 @@ private:
|
||||||
A.add_coef(i, i, w_ii);
|
A.add_coef(i, i, w_ii);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Partially fill the matrix coefficients A(i,i), A(i,j) and A(i,k)
|
// Partially fill the matrix coefficients A(i,i), A(i,j) and A(i,k)
|
||||||
/// Precondition: i, j, and k are ordered counterclockwise
|
// Precondition: i, j, and k are ordered counterclockwise
|
||||||
template <typename CT,
|
template <typename CT,
|
||||||
typename VertexUVMap,
|
typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
|
|
@ -478,7 +477,7 @@ private:
|
||||||
fill_linear_system_matrix_mvc_from_points(pi, i, pj, j, pk, k, A);
|
fill_linear_system_matrix_mvc_from_points(pi, i, pj, j, pk, k, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add the corresponding coefficients in A for all the edges of the face fh
|
// Add the corresponding coefficients in A for all the edges of the face fh
|
||||||
template <typename CT,
|
template <typename CT,
|
||||||
typename VertexUVMap,
|
typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
|
|
@ -538,7 +537,7 @@ private:
|
||||||
fill_linear_system_matrix_mvc_from_points(pi, i, pj, j, pk, k, A);
|
fill_linear_system_matrix_mvc_from_points(pi, i, pj, j, pk, k, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fill the matrix A in an MVC linear system with the face 'fd' of 'mesh'.
|
// Fill the matrix A in an MVC linear system with the face 'fd' of 'mesh'.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
|
|
@ -558,8 +557,8 @@ private:
|
||||||
uvmap, vimap, vpmap, A);
|
uvmap, vimap, vpmap, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the matrix A in the MVC linear system using the exterior faces
|
// Compute the matrix A in the MVC linear system using the exterior faces
|
||||||
/// of the constrained triangulation 'ct' and the graph 'mesh'.
|
// of the constrained triangulation 'ct' and the graph 'mesh'.
|
||||||
template <typename CT,
|
template <typename CT,
|
||||||
typename VertexUVMap,
|
typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
|
|
@ -601,7 +600,7 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the right hand side of a MVC linear system.
|
// Compute the right hand side of a MVC linear system.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
typename VertexParameterizedMap>
|
typename VertexParameterizedMap>
|
||||||
|
|
@ -624,7 +623,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Solve the two linear systems A*Xu=Bu and A*Xv=Bv.
|
// Solve the two linear systems A*Xu=Bu and A*Xv=Bv.
|
||||||
Error_code solve_mvc(const Matrix& A,
|
Error_code solve_mvc(const Matrix& A,
|
||||||
const Vector& Bu, const Vector& Bv,
|
const Vector& Bu, const Vector& Bv,
|
||||||
Vector& Xu, Vector& Xv)
|
Vector& Xu, Vector& Xv)
|
||||||
|
|
@ -640,7 +639,7 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Color the faces with inside/outside information and fix the border.
|
// Color the faces with inside/outside information and fix the border.
|
||||||
template <typename CT, typename VertexParameterizedMap>
|
template <typename CT, typename VertexParameterizedMap>
|
||||||
Error_code prepare_CT_for_parameterization(CT& ct,
|
Error_code prepare_CT_for_parameterization(CT& ct,
|
||||||
VertexParameterizedMap vpmap) const
|
VertexParameterizedMap vpmap) const
|
||||||
|
|
@ -658,7 +657,7 @@ private:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run an MVC parameterization on the (2D) ARAP UV map and the convexified mesh.
|
// Run an MVC parameterization on the (2D) ARAP UV map and the convexified mesh.
|
||||||
template <typename CT,
|
template <typename CT,
|
||||||
typename VertexUVMap,
|
typename VertexUVMap,
|
||||||
typename VertexIndexMap,
|
typename VertexIndexMap,
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ private:
|
||||||
const Weight_type weight_type;
|
const Weight_type weight_type;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Check input's correctness.
|
// Check input's correctness.
|
||||||
template<typename ConeMap>
|
template<typename ConeMap>
|
||||||
Error_code check_cones(ConeMap cmap) const
|
Error_code check_cones(ConeMap cmap) const
|
||||||
{
|
{
|
||||||
|
|
@ -192,8 +192,7 @@ private:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Linear system
|
// Compute the number of linear constraints in the system.
|
||||||
/// Compute the number of linear constraints in the system.
|
|
||||||
int number_of_linear_constraints(const SeamMesh& mesh) const
|
int number_of_linear_constraints(const SeamMesh& mesh) const
|
||||||
{
|
{
|
||||||
if(orb_type == Parallelogram) {
|
if(orb_type == Parallelogram) {
|
||||||
|
|
@ -208,7 +207,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a positional constraint on a vertex x_ind, so that x_ind * w = rhs.
|
// Adds a positional constraint on a vertex x_ind, so that x_ind * w = rhs.
|
||||||
void addConstraint(Matrix& M, Vector& B, int& id_r, int id_c, double w, Point_2 rhs) const
|
void addConstraint(Matrix& M, Vector& B, int& id_r, int id_c, double w, Point_2 rhs) const
|
||||||
{
|
{
|
||||||
M.set_coef(2*id_r, 2*id_c, w, true /*new_coef*/);
|
M.set_coef(2*id_r, 2*id_c, w, true /*new_coef*/);
|
||||||
|
|
@ -227,9 +226,9 @@ private:
|
||||||
++id_r; // current line index in A is increased
|
++id_r; // current line index in A is increased
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds constraints so that T * x_sinds = x_tinds, where T is a 2x2
|
// Adds constraints so that T * x_sinds = x_tinds, where T is a 2x2
|
||||||
/// matrix, and the Transformation T is modified to affine from
|
// matrix, and the Transformation T is modified to affine from
|
||||||
/// linear by requiring that T * x_si - x_ti = T * x_s1 - x_t1.
|
// linear by requiring that T * x_si - x_ti = T * x_s1 - x_t1.
|
||||||
void addTransConstraints(int s0, int t0, int s, int t,
|
void addTransConstraints(int s0, int t0, int s, int t,
|
||||||
int& id_r,
|
int& id_r,
|
||||||
const std::vector<double>& T,
|
const std::vector<double>& T,
|
||||||
|
|
@ -283,7 +282,7 @@ private:
|
||||||
++id_r; // current line index in M is increased
|
++id_r; // current line index in M is increased
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add the constraints from a seam segment to the linear system.
|
// Add the constraints from a seam segment to the linear system.
|
||||||
void constrain_seam_segment(const std::vector<std::pair<int, int> >& seam_segment,
|
void constrain_seam_segment(const std::vector<std::pair<int, int> >& seam_segment,
|
||||||
NT ang, int& current_line_id_in_M,
|
NT ang, int& current_line_id_in_M,
|
||||||
Matrix& M, Vector& B) const
|
Matrix& M, Vector& B) const
|
||||||
|
|
@ -325,8 +324,8 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the rotational constraint on the border of the mesh.
|
// Computes the rotational constraint on the border of the mesh.
|
||||||
/// Cone constraints are also added.
|
// Cone constraints are also added.
|
||||||
template<typename ConeMap,
|
template<typename ConeMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
void AddRotationalConstraint(const SeamMesh& mesh,
|
void AddRotationalConstraint(const SeamMesh& mesh,
|
||||||
|
|
@ -448,8 +447,8 @@ private:
|
||||||
return weight;
|
return weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the coefficients of the mean value Laplacian matrix for the edge.
|
// Computes the coefficients of the mean value Laplacian matrix for the edge.
|
||||||
/// `ij` in the face `ijk`
|
// `ij` in the face `ijk`
|
||||||
void fill_mvc_matrix(const Point_3& pi, int i,
|
void fill_mvc_matrix(const Point_3& pi, int i,
|
||||||
const Point_3& pj, int j,
|
const Point_3& pj, int j,
|
||||||
const Point_3& pk, int k, Matrix& M) const
|
const Point_3& pk, int k, Matrix& M) const
|
||||||
|
|
@ -492,7 +491,7 @@ private:
|
||||||
M.add_coef(2*i + 1, 2*i + 1, w_ii);
|
M.add_coef(2*i + 1, 2*i + 1, w_ii);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the mean value Laplacian matrix.
|
// Compute the mean value Laplacian matrix.
|
||||||
template<typename VertexIndexMap>
|
template<typename VertexIndexMap>
|
||||||
void mean_value_laplacian(const SeamMesh& mesh,
|
void mean_value_laplacian(const SeamMesh& mesh,
|
||||||
VertexIndexMap vimap,
|
VertexIndexMap vimap,
|
||||||
|
|
@ -519,7 +518,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the system weights using a Cotangent Laplacian.
|
// Compute the system weights using a Cotangent Laplacian.
|
||||||
template<typename VertexIndexMap>
|
template<typename VertexIndexMap>
|
||||||
void cotangent_laplacien(SeamMesh& mesh,
|
void cotangent_laplacien(SeamMesh& mesh,
|
||||||
VertexIndexMap vimap,
|
VertexIndexMap vimap,
|
||||||
|
|
@ -565,7 +564,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copy the solution into the UV property map.
|
// Copy the solution into the UV property map.
|
||||||
template <typename VertexIndexMap, typename VertexUVMap>
|
template <typename VertexIndexMap, typename VertexUVMap>
|
||||||
void assign_solution(const SeamMesh& mesh,
|
void assign_solution(const SeamMesh& mesh,
|
||||||
const Vector& X,
|
const Vector& X,
|
||||||
|
|
@ -583,7 +582,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Solves the linear system.
|
// Solves the linear system.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
Error_code computeFlattening(const SeamMesh& mesh,
|
Error_code computeFlattening(const SeamMesh& mesh,
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ protected:
|
||||||
|
|
||||||
// Private operations
|
// Private operations
|
||||||
private:
|
private:
|
||||||
/// Compute the total length of the border.
|
// Compute the total length of the border.
|
||||||
double compute_border_length(const TriangleMesh& mesh,
|
double compute_border_length(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd) const
|
halfedge_descriptor bhd) const
|
||||||
{
|
{
|
||||||
|
|
@ -113,8 +113,8 @@ private:
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Utility method for parameterize().
|
// Utility method for parameterize().
|
||||||
/// Compute the mesh iterator whose offset is closest to 'value'.
|
// Compute the mesh iterator whose offset is closest to 'value'.
|
||||||
halfedge_around_face_iterator closest_iterator(const TriangleMesh& mesh,
|
halfedge_around_face_iterator closest_iterator(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd,
|
halfedge_descriptor bhd,
|
||||||
Offset_map& offset,
|
Offset_map& offset,
|
||||||
|
|
@ -139,8 +139,8 @@ private:
|
||||||
return best;
|
return best;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the corners by splitting the border of the mesh in four
|
// Set the corners by splitting the border of the mesh in four
|
||||||
/// approximately equal segments.
|
// approximately equal segments.
|
||||||
template<typename VertexParameterizedMap>
|
template<typename VertexParameterizedMap>
|
||||||
halfedge_descriptor compute_offsets_without_given_vertices(const TriangleMesh& mesh,
|
halfedge_descriptor compute_offsets_without_given_vertices(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd,
|
halfedge_descriptor bhd,
|
||||||
|
|
@ -185,9 +185,9 @@ private:
|
||||||
return bhd;
|
return bhd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the offset values for all the vertices of the border of
|
// Compute the offset values for all the vertices of the border of
|
||||||
/// the mesh. The vertices between two given vertices vi and vj are
|
// the mesh. The vertices between two given vertices vi and vj are
|
||||||
/// sent to the same side of the square.
|
// sent to the same side of the square.
|
||||||
template<typename VertexParameterizedMap>
|
template<typename VertexParameterizedMap>
|
||||||
halfedge_descriptor compute_offsets(const TriangleMesh& mesh,
|
halfedge_descriptor compute_offsets(const TriangleMesh& mesh,
|
||||||
halfedge_descriptor bhd,
|
halfedge_descriptor bhd,
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,6 @@ public:
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Map two extreme vertices of the 3D mesh and mark them as <i>parameterized</i>.
|
/// Map two extreme vertices of the 3D mesh and mark them as <i>parameterized</i>.
|
||||||
///
|
///
|
||||||
/// \tparam VertexUVmap must be a model of `ReadWritePropertyMap` with
|
/// \tparam VertexUVmap must be a model of `ReadWritePropertyMap` with
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ namespace Surface_mesh_parameterization {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// -> ->
|
// -> ->
|
||||||
/// Return cotangent of (P,Q,R) corner (i.e. cotan of QP, QR angle).
|
// Return cotangent of (P,Q,R) corner (i.e. cotan of QP, QR angle).
|
||||||
template<typename K>
|
template<typename K>
|
||||||
typename K::FT cotangent(const typename K::Point_3& P,
|
typename K::FT cotangent(const typename K::Point_3& P,
|
||||||
const typename K::Point_3& Q,
|
const typename K::Point_3& Q,
|
||||||
|
|
@ -53,7 +53,7 @@ typename K::FT cotangent(const typename K::Point_3& P,
|
||||||
}
|
}
|
||||||
|
|
||||||
// -> ->
|
// -> ->
|
||||||
/// Return tangent of (P,Q,R) corner (i.e. tangent of QP, QR angle).
|
// Return tangent of (P,Q,R) corner (i.e. tangent of QP, QR angle).
|
||||||
template<typename K>
|
template<typename K>
|
||||||
typename K::FT tangent(const typename K::Point_3& P,
|
typename K::FT tangent(const typename K::Point_3& P,
|
||||||
const typename K::Point_3& Q,
|
const typename K::Point_3& Q,
|
||||||
|
|
@ -74,7 +74,7 @@ typename K::FT tangent(const typename K::Point_3& P,
|
||||||
return 0.0; // undefined
|
return 0.0; // undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fix sine to be within [-1;1].
|
// Fix sine to be within [-1;1].
|
||||||
template<typename K>
|
template<typename K>
|
||||||
typename K::FT fix_sine(typename K::FT sine)
|
typename K::FT fix_sine(typename K::FT sine)
|
||||||
{
|
{
|
||||||
|
|
@ -87,7 +87,7 @@ typename K::FT fix_sine(typename K::FT sine)
|
||||||
}
|
}
|
||||||
|
|
||||||
// -> ->
|
// -> ->
|
||||||
/// Return angle (in radians) of of (P,Q,R) corner (i.e. QP, QR angle).
|
// Return angle (in radians) of of (P,Q,R) corner (i.e. QP, QR angle).
|
||||||
template<typename K>
|
template<typename K>
|
||||||
typename K::FT compute_angle_rad(const typename K::Point_3& P,
|
typename K::FT compute_angle_rad(const typename K::Point_3& P,
|
||||||
const typename K::Point_3& Q,
|
const typename K::Point_3& Q,
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ bool are_cones_unique(const Cone_container& cones)
|
||||||
return (n_of_cones == unique_cones.size());
|
return (n_of_cones == unique_cones.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Locate the cone tagged 'First_unique_cone' and its index in the seam mesh.
|
// Locate the cone tagged 'First_unique_cone' and its index in the seam mesh.
|
||||||
template<typename vertex_descriptor,
|
template<typename vertex_descriptor,
|
||||||
typename ConeMap,
|
typename ConeMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap>
|
||||||
|
|
@ -175,7 +175,7 @@ void find_start_cone(const ConeMap& cmap,
|
||||||
CGAL_postcondition(false);
|
CGAL_postcondition(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Locate the cone tagged 'First_unique_cone' in the seam mesh.
|
// Locate the cone tagged 'First_unique_cone' in the seam mesh.
|
||||||
template<typename vertex_descriptor,
|
template<typename vertex_descriptor,
|
||||||
typename ConeMap>
|
typename ConeMap>
|
||||||
void find_start_cone(const ConeMap& cmap,
|
void find_start_cone(const ConeMap& cmap,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue