Commit 8baf5193 authored by Jan Möbius's avatar Jan Möbius

Added butterfly and interpolating sqrt3 from OpenMesh

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10245 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 661016e2
......@@ -11,6 +11,11 @@
#include <OpenFlipper/INIFile/INIFile.hh>
#include <ACG/Scenegraph/PointNode.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/LoopT.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh>
void SubdividerPlugin::initializePlugin()
{
if ( OpenFlipper::Options::gui() ) {
......@@ -56,7 +61,7 @@ void SubdividerPlugin::slot_subdivide()
subdivider(steps);
subdivider.detach();
}
else
else if ( tool_->sqrt3_radioButton->isChecked() )
{
OpenMesh::Subdivider::Uniform::Sqrt3T<TriMesh,double> subdivider;
......@@ -64,6 +69,23 @@ void SubdividerPlugin::slot_subdivide()
subdivider(steps);
subdivider.detach();
}
else if ( tool_->LabsikGreiner_radioButton->isChecked() )
{
OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT<TriMesh,double> subdivider;
subdivider.attach(*mesh);
subdivider(steps);
subdivider.detach();
}
else if ( tool_->modifiedButterfly_radioButton->isChecked() )
{
OpenMesh::Subdivider::Uniform::ModifiedButterflyT<TriMesh,double> subdivider;
subdivider.attach(*mesh);
subdivider(steps);
subdivider.detach();
}
mesh->update_face_normals();
mesh->update_vertex_normals();
......@@ -113,4 +135,4 @@ void SubdividerPlugin::slotKeyEvent( QKeyEvent* _event )
}
} // END slotKeyEvent
Q_EXPORT_PLUGIN2( subdividerplugin , SubdividerPlugin );
\ No newline at end of file
Q_EXPORT_PLUGIN2( subdividerplugin , SubdividerPlugin );
......@@ -19,9 +19,6 @@
#include <OpenFlipper/common/Types.hh>
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/LoopT.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh>
#include "subdividerToolbar.hh"
// Subdivider types
......
......@@ -47,6 +47,10 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="loop_radioButton">
<property name="toolTip">
<string>C. T. Loop, &quot;Smooth Subdivision Surfaces Based on Triangles&quot;,
M.S. Thesis, Department of Mathematics, University of Utah, August 1987.</string>
</property>
<property name="text">
<string>Loop</string>
</property>
......@@ -59,11 +63,36 @@
</item>
<item>
<widget class="QRadioButton" name="sqrt3_radioButton">
<property name="toolTip">
<string>L. Kobbelt, &lt;a href=&quot;http://www-i8.informatik.rwth-aachen.de/publications/downloads/sqrt3.pdf&quot;&gt;&quot;Sqrt(3) subdivision&quot;&lt;/a&gt;, Proceedings of SIGGRAPH 2000.</string>
</property>
<property name="text">
<string>Sqrt3</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="LabsikGreiner_radioButton">
<property name="toolTip">
<string>Interpolating Labsik Greiner Subdivider as described in &quot;interpolating sqrt(3) subdivision&quot; Labsik &amp; Greiner, 2000</string>
</property>
<property name="text">
<string>Interpolating Sqrt3</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="modifiedButterfly_radioButton">
<property name="toolTip">
<string>The modified butterfly scheme of Denis Zorin, Peter Schröder and Wim Sweldens,
``Interpolating subdivision for meshes with arbitrary topology,'' in Proceedings
of SIGGRAPH 1996, ACM SIGGRAPH, 1996, pp. 189-192.</string>
</property>
<property name="text">
<string>Modified Butterfly</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment