libigl v2.5.0
|
Functions | |
void | frame_field (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::VectorXi &b, const Eigen::MatrixXd &bc1, const Eigen::MatrixXd &bc2, Eigen::MatrixXd &FF1, Eigen::MatrixXd &FF2) |
Generate a piecewise-constant frame-field field from a sparse set of constraints on faces using the algorithm proposed in: Frame Fields: Anisotropic and Non-Orthogonal Cross Fields Daniele Panozzo, Enrico Puppo, Marco Tarini, Olga Sorkine-Hornung, ACM Transactions on Graphics (SIGGRAPH, 2014) | |
template<typename DerivedV , typename DerivedF , typename DerivedU > | |
void | miq (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedV > &PD1, const Eigen::PlainObjectBase< DerivedV > &PD2, Eigen::PlainObjectBase< DerivedU > &UV, Eigen::PlainObjectBase< DerivedF > &FUV, double gradientSize=30.0, double stiffness=5.0, bool directRound=false, unsigned int iter=5, unsigned int localIter=5, bool doRound=true, bool singularityRound=true, const std::vector< int > &roundVertices=std::vector< int >(), const std::vector< std::vector< int > > &hardFeatures=std::vector< std::vector< int > >()) |
Global seamless parametrization aligned with a given per-face Jacobian (PD1, PD2). | |
template<typename DerivedV , typename DerivedF , typename DerivedU > | |
void | miq (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedV > &PD1_combed, const Eigen::PlainObjectBase< DerivedV > &PD2_combed, const Eigen::Matrix< int, Eigen::Dynamic, 3 > &mismatch, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &singular, const Eigen::Matrix< int, Eigen::Dynamic, 3 > &seams, Eigen::PlainObjectBase< DerivedU > &UV, Eigen::PlainObjectBase< DerivedF > &FUV, double gradientSize=30.0, double stiffness=5.0, bool directRound=false, unsigned int iter=5, unsigned int localIter=5, bool doRound=true, bool singularityRound=true, const std::vector< int > &roundVertices=std::vector< int >(), const std::vector< std::vector< int > > &hardFeatures=std::vector< std::vector< int > >()) |
miq Helper function that allows to directly provided pre-combed bisectors for an already cut mesh | |
void | nrosy (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::VectorXi &b, const Eigen::MatrixXd &bc, const Eigen::VectorXi &b_soft, const Eigen::VectorXd &w_soft, const Eigen::MatrixXd &bc_soft, int N, double soft, Eigen::MatrixXd &R, Eigen::VectorXd &S) |
Generate a N-RoSy field from a sparse set of constraints. | |
void | nrosy (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::VectorXi &b, const Eigen::MatrixXd &bc, int N, Eigen::MatrixXd &R, Eigen::VectorXd &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void igl::copyleft::comiso::frame_field | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::VectorXi & | b, | ||
const Eigen::MatrixXd & | bc1, | ||
const Eigen::MatrixXd & | bc2, | ||
Eigen::MatrixXd & | FF1, | ||
Eigen::MatrixXd & | FF2 | ||
) |
Generate a piecewise-constant frame-field field from a sparse set of constraints on faces using the algorithm proposed in: Frame Fields: Anisotropic and Non-Orthogonal Cross Fields Daniele Panozzo, Enrico Puppo, Marco Tarini, Olga Sorkine-Hornung, ACM Transactions on Graphics (SIGGRAPH, 2014)
[in] | V | #V by 3 list of mesh vertex coordinates |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | b | #B by 1 list of constrained face indices |
[in] | bc1 | #B by 3 list of the constrained first representative vector of the frame field (up to permutation and sign) |
[in] | bc2 | #B by 3 list of the constrained second representative vector of the frame field (up to permutation and sign) |
[out] | FF1 | #F by 3 the first representative vector of the frame field (up to permutation and sign) |
[out] | FF2 | #F by 3 the second representative vector of the frame field (up to permutation and sign) |
void igl::copyleft::comiso::miq | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedV > & | PD1, | ||
const Eigen::PlainObjectBase< DerivedV > & | PD2, | ||
Eigen::PlainObjectBase< DerivedU > & | UV, | ||
Eigen::PlainObjectBase< DerivedF > & | FUV, | ||
double | gradientSize = 30.0 , |
||
double | stiffness = 5.0 , |
||
bool | directRound = false , |
||
unsigned int | iter = 5 , |
||
unsigned int | localIter = 5 , |
||
bool | doRound = true , |
||
bool | singularityRound = true , |
||
const std::vector< int > & | roundVertices = std::vector< int >() , |
||
const std::vector< std::vector< int > > & | hardFeatures = std::vector< std::vector< int > >() |
||
) |
Global seamless parametrization aligned with a given per-face Jacobian (PD1, PD2).
The algorithm is based on "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383) We thank Nico Pietroni for providing a reference implementation of MIQ on which our code is based.
[in] | V | #V by 3 list of mesh vertex 3D positions |
[in] | F | #F by 3 list of faces indices in V |
[in] | PD1 | #V by 3 first line of the Jacobian per triangle |
[in] | PD2 | #V by 3 second line of the Jacobian per triangle (optional, if empty it will be a vector in the tangent plane orthogonal to PD1) |
[in] | gradientSize | global scaling for the gradient (controls the quads resolution) |
[in] | stiffness | weight for the stiffness iterations (Reserved but not used!) |
[in] | directRound | greedily round all integer variables at once (greatly improves optimization speed but lowers quality) |
[in] | iter | stiffness iterations (0 = no stiffness) |
[in] | localIter | number of local iterations for the integer rounding |
[in] | doRound | enables the integer rounding (disabling it could be useful for debugging) |
[in] | singularityRound | set true/false to decide if the singularities' coordinates should be rounded to the nearest integers |
[in] | roundVertices | id of additional vertices that should be snapped to integer coordinates |
[in] | hardFeatures | #H by 2 list of pairs of vertices that belongs to edges that should be snapped to integer coordinates |
[out] | UV | #UV by 2 list of vertices in 2D |
[out] | FUV | #FUV by 3 list of face indices in UV |
void igl::copyleft::comiso::miq | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedV > & | PD1_combed, | ||
const Eigen::PlainObjectBase< DerivedV > & | PD2_combed, | ||
const Eigen::Matrix< int, Eigen::Dynamic, 3 > & | mismatch, | ||
const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | singular, | ||
const Eigen::Matrix< int, Eigen::Dynamic, 3 > & | seams, | ||
Eigen::PlainObjectBase< DerivedU > & | UV, | ||
Eigen::PlainObjectBase< DerivedF > & | FUV, | ||
double | gradientSize = 30.0 , |
||
double | stiffness = 5.0 , |
||
bool | directRound = false , |
||
unsigned int | iter = 5 , |
||
unsigned int | localIter = 5 , |
||
bool | doRound = true , |
||
bool | singularityRound = true , |
||
const std::vector< int > & | roundVertices = std::vector< int >() , |
||
const std::vector< std::vector< int > > & | hardFeatures = std::vector< std::vector< int > >() |
||
) |
miq Helper function that allows to directly provided pre-combed bisectors for an already cut mesh
[in] | V | #V by 3 list of mesh vertex 3D positions |
[in] | F | #F by 3 list of faces indices in V |
[in] | Additional | Input: |
[in] | PD1_combed | #F by 3 first combed Jacobian |
[in] | PD2_combed | #F by 3 second combed Jacobian |
[in] | mismatch | #F by 3 list of per-corner integer PI/2 rotations |
[in] | singular | #V list of flag that denotes if a vertex is singular or not |
[in] | seams | #F by 3 list of per-corner flag that denotes seams |
[out] | UV | #UV by 2 list of vertices in 2D |
[out] | FUV | #FUV by 3 list of face indices in UV |
[in] | gradientSize | global scaling for the gradient (controls the quads resolution) |
[in] | stiffness | weight for the stiffness iterations (Reserved but not used!) |
[in] | directRound | greedily round all integer variables at once (greatly improves optimization speed but lowers quality) |
[in] | iter | stiffness iterations (0 = no stiffness) |
[in] | localIter | number of local iterations for the integer rounding |
[in] | doRound | enables the integer rounding (disabling it could be useful for debugging) |
[in] | singularityRound | set true/false to decide if the singularities' coordinates should be rounded to the nearest integers |
[in] | roundVertices | id of additional vertices that should be snapped to integer coordinates |
[in] | hardFeatures | #H by 2 list of pairs of vertices that belongs to edges that should be snapped to integer coordinates |
void igl::copyleft::comiso::nrosy | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::VectorXi & | b, | ||
const Eigen::MatrixXd & | bc, | ||
const Eigen::VectorXi & | b_soft, | ||
const Eigen::VectorXd & | w_soft, | ||
const Eigen::MatrixXd & | bc_soft, | ||
int | N, | ||
double | soft, | ||
Eigen::MatrixXd & | R, | ||
Eigen::VectorXd & | S | ||
) |
Generate a N-RoSy field from a sparse set of constraints.
[in] | V | #V by 3 list of mesh vertex coordinates |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | b | #B by 1 list of constrained face indices |
[in] | bc | #B by 3 list of representative vectors for the constrained faces |
[in] | b_soft | #S by 1 b for soft constraints |
[in] | w_soft | #S by 1 weight for the soft constraints (0-1) |
[in] | bc_soft | #S by 3 bc for soft constraints |
[in] | N | the degree of the N-RoSy vector field |
[in] | soft | the strength of the soft constraints w.r.t. smoothness (0 -> smoothness only, 1->constraints only) |
[out] | R | #F by 3 the representative vectors of the interpolated field |
[out] | S | #V by 1 the singularity index for each vertex (0 = regular) |
void igl::copyleft::comiso::nrosy | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::VectorXi & | b, | ||
const Eigen::MatrixXd & | bc, | ||
int | N, | ||
Eigen::MatrixXd & | R, | ||
Eigen::VectorXd & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.