mirror of https://github.com/CGAL/cgal
Add LSCM as parametrization method
This commit is contained in:
parent
2a244028a2
commit
af7fa2ac51
|
|
@ -37,7 +37,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>978</width>
|
||||
<height>21</height>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
|
@ -94,6 +94,7 @@
|
|||
</property>
|
||||
<addaction name="actionMVC"/>
|
||||
<addaction name="actionDCP"/>
|
||||
<addaction name="actionLSC"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuPCA">
|
||||
<property name="title">
|
||||
|
|
@ -294,8 +295,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>545</width>
|
||||
<height>178</height>
|
||||
<width>534</width>
|
||||
<height>174</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
|
|
@ -646,6 +647,11 @@
|
|||
<string>&Preferences</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLSC">
|
||||
<property name="text">
|
||||
<string>Least square conformal maps</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
#include <CGAL/Discrete_conformal_map_parameterizer_3.h>
|
||||
#include <CGAL/LSCM_parameterizer_3.h>
|
||||
#include <CGAL/Two_vertices_parameterizer_3.h>
|
||||
|
||||
#include <CGAL/Textured_polyhedron_builder.h>
|
||||
|
|
@ -34,7 +35,8 @@ public:
|
|||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
return QStringList() << "actionMVC"
|
||||
<< "actionDCP";
|
||||
<< "actionDCP"
|
||||
<< "actionLSC";
|
||||
}
|
||||
|
||||
bool applicable(QAction*) const {
|
||||
|
|
@ -44,9 +46,10 @@ public:
|
|||
public slots:
|
||||
void on_actionMVC_triggered();
|
||||
void on_actionDCP_triggered();
|
||||
void on_actionLSC_triggered();
|
||||
|
||||
protected:
|
||||
enum Parameterization_method { PARAM_MVC, PARAM_DCP };
|
||||
enum Parameterization_method { PARAM_MVC, PARAM_DCP, PARAM_LSC };
|
||||
void parameterize(Parameterization_method method);
|
||||
}; // end Polyhedron_demo_parameterization_plugin
|
||||
|
||||
|
|
@ -90,6 +93,13 @@ void Polyhedron_demo_parameterization_plugin::parameterize(const Parameterizatio
|
|||
typedef CGAL::Discrete_conformal_map_parameterizer_3<Adaptor> Parameterizer;
|
||||
Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
|
||||
success = err == Parameterizer::OK;
|
||||
}
|
||||
case PARAM_LSC:
|
||||
{
|
||||
std::cout << "Parameterize (LSC)...";
|
||||
typedef CGAL::LSCM_parameterizer_3<Adaptor> Parameterizer;
|
||||
Parameterizer::Error_code err = CGAL::parameterize(adaptor,Parameterizer());
|
||||
success = err == Parameterizer::OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,6 +155,11 @@ void Polyhedron_demo_parameterization_plugin::on_actionDCP_triggered()
|
|||
parameterize(PARAM_DCP);
|
||||
}
|
||||
|
||||
void Polyhedron_demo_parameterization_plugin::on_actionLSC_triggered()
|
||||
{
|
||||
std::cerr << "LSC...";
|
||||
parameterize(PARAM_LSC);
|
||||
}
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_parameterization_plugin, Polyhedron_demo_parameterization_plugin)
|
||||
|
||||
#include "Polyhedron_demo_parameterization_plugin.moc"
|
||||
|
|
|
|||
Loading…
Reference in New Issue