Re-united some function bodies with their declaration

This commit is contained in:
Mael Rouxel-Labbé 2017-06-21 17:52:43 +02:00
parent 9881f814a1
commit f3671d45e1
1 changed files with 109 additions and 132 deletions

View File

@ -310,42 +310,6 @@ private:
/// 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
/// Create two lines in the linear system per triangle (one for u, one for v).
///
/// \pre vertices must be indexed.
template <typename VertexIndexMap >
Error_code setup_triangle_relations(LeastSquaresSolver& solver,
const TriangleMesh& mesh,
face_descriptor facet,
VertexIndexMap vimap) const;
// Private accessors
private:
/// Get the object that maps the surface's border onto a 2D space.
Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; }
/// Get the sparse linear algebra (traits object to access the linear system).
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
// Fields
private:
/// %Object that maps (at least two) border vertices onto a 2D space
Border_parameterizer m_borderParameterizer;
/// Traits object to solve a sparse linear system
Solver_traits m_linearAlgebra;
};
// Utility for setup_triangle_relations():
// Computes the coordinates of the vertices of a triangle
// in a local 2D orthonormal basis of the triangle's plane.
template<class TriangleMesh, class Border_param, class Sparse_LA>
inline
void
LSCM_parameterizer_3<TriangleMesh, Border_param, Sparse_LA>::
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
{ {
Vector_3 X = p1 - p0; Vector_3 X = p1 - p0;
@ -383,12 +347,8 @@ project_triangle(const Point_3& p0, const Point_3& p1, const Point_3& p2, // i
// Zk = xk + i.yk is the complex number corresponding to local (x,y) coords // Zk = xk + i.yk is the complex number corresponding to local (x,y) coords
// cool: no divide with this expression; makes it more numerically stable // cool: no divide with this expression; makes it more numerically stable
// in presence of degenerate triangles // in presence of degenerate triangles
template<class TriangleMesh, class Border_param, class Sparse_LA>
template <typename VertexIndexMap > template <typename VertexIndexMap >
inline Error_code setup_triangle_relations(LeastSquaresSolver& solver,
Error_code
LSCM_parameterizer_3<TriangleMesh, Border_param, Sparse_LA>::
setup_triangle_relations(LeastSquaresSolver& solver,
const TriangleMesh& mesh, const TriangleMesh& mesh,
face_descriptor facet, face_descriptor facet,
VertexIndexMap vimap) const VertexIndexMap vimap) const
@ -465,7 +425,24 @@ setup_triangle_relations(LeastSquaresSolver& solver,
return OK; return OK;
} }
} // namespace // Private accessors
private:
/// Get the object that maps the surface's border onto a 2D space.
Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; }
/// Get the sparse linear algebra (traits object to access the linear system).
Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; }
// Fields
private:
/// %Object that maps (at least two) border vertices onto a 2D space
Border_parameterizer m_borderParameterizer;
/// Traits object to solve a sparse linear system
Solver_traits m_linearAlgebra;
};
} // namespace Surface_mesh_parameterization
} // namespace CGAL } // namespace CGAL