Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
Plugin-SimpleSmoother
Commits
d507ae2b
Commit
d507ae2b
authored
Dec 08, 2017
by
Martin Heistermann
Browse files
Fix ODR (and property name) conflict with Plugin-Smoother
parent
9eeed579
Changes
2
Hide whitespace changes
Inline
Side-by-side
SmootherPlugin.cc
→
Simple
SmootherPlugin.cc
View file @
d507ae2b
...
...
@@ -49,24 +49,24 @@
#include "SmootherPlugin.hh"
#include "
Simple
SmootherPlugin.hh"
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
SmootherPlugin
::
SmootherPlugin
()
:
Simple
SmootherPlugin
::
Simple
SmootherPlugin
()
:
iterationsSpinbox_
(
0
)
{
}
SmootherPlugin
::~
SmootherPlugin
()
Simple
SmootherPlugin
::~
Simple
SmootherPlugin
()
{
}
void
SmootherPlugin
::
initializePlugin
()
void
Simple
SmootherPlugin
::
initializePlugin
()
{
// Create the Toolbox Widget
QWidget
*
toolBox
=
new
QWidget
();
...
...
@@ -99,7 +99,7 @@ void SmootherPlugin::initializePlugin()
emit
addToolbox
(
tr
(
"Simple Smoother"
)
,
toolBox
,
toolIcon
);
}
void
SmootherPlugin
::
pluginsInitialized
()
{
void
Simple
SmootherPlugin
::
pluginsInitialized
()
{
// Emit slot description
emit
setSlotDescription
(
tr
(
"simpleLaplace(int)"
),
tr
(
"Smooth mesh using the Laplace operator with uniform weights."
),
...
...
@@ -111,7 +111,7 @@ void SmootherPlugin::pluginsInitialized() {
* Smooth mesh using the Laplace operator
* with uniform weights.
*/
void
SmootherPlugin
::
simpleLaplace
()
{
void
Simple
SmootherPlugin
::
simpleLaplace
()
{
int
iterations
=
1
;
...
...
@@ -129,7 +129,7 @@ void SmootherPlugin::simpleLaplace() {
*
* @param _iterations Number of iterations
*/
void
SmootherPlugin
::
simpleLaplace
(
int
_iterations
)
{
void
Simple
SmootherPlugin
::
simpleLaplace
(
int
_iterations
)
{
for
(
PluginFunctions
::
ObjectIterator
o_it
(
PluginFunctions
::
TARGET_OBJECTS
)
;
o_it
!=
PluginFunctions
::
objectsEnd
();
++
o_it
)
{
...
...
@@ -144,7 +144,7 @@ void SmootherPlugin::simpleLaplace(int _iterations) {
OpenMesh
::
VPropHandleT
<
TriMesh
::
Point
>
origPositions
;
// Add a property to the mesh to store original vertex positions
mesh
->
add_property
(
origPositions
,
"SmootherPlugin_Original_Positions"
);
mesh
->
add_property
(
origPositions
,
"
Simple
SmootherPlugin_Original_Positions"
);
for
(
int
i
=
0
;
i
<
_iterations
;
++
i
)
{
...
...
@@ -213,7 +213,7 @@ void SmootherPlugin::simpleLaplace(int _iterations) {
OpenMesh
::
VPropHandleT
<
TriMesh
::
Point
>
origPositions
;
// Add a property to the mesh to store original vertex positions
mesh
->
add_property
(
origPositions
,
"SmootherPlugin_Original_Positions"
);
mesh
->
add_property
(
origPositions
,
"
Simple
SmootherPlugin_Original_Positions"
);
for
(
int
i
=
0
;
i
<
_iterations
;
++
i
)
{
...
...
@@ -287,7 +287,7 @@ void SmootherPlugin::simpleLaplace(int _iterations) {
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2
(
smootherplugin
,
SmootherPlugin
);
Q_EXPORT_PLUGIN2
(
smootherplugin
,
Simple
SmootherPlugin
);
#endif
...
...
SmootherPlugin.hh
→
Simple
SmootherPlugin.hh
View file @
d507ae2b
...
...
@@ -60,7 +60,7 @@
#include <OpenFlipper/BasePlugin/BackupInterface.hh>
#include <OpenFlipper/common/Types.hh>
class
SmootherPlugin
:
public
QObject
,
BaseInterface
,
ToolboxInterface
,
LoggingInterface
,
ScriptInterface
,
BackupInterface
class
Simple
SmootherPlugin
:
public
QObject
,
BaseInterface
,
ToolboxInterface
,
LoggingInterface
,
ScriptInterface
,
BackupInterface
{
Q_OBJECT
Q_INTERFACES
(
BaseInterface
)
...
...
@@ -95,8 +95,8 @@ class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingI
public:
SmootherPlugin
();
~
SmootherPlugin
();
Simple
SmootherPlugin
();
~
Simple
SmootherPlugin
();
// BaseInterface
QString
name
()
{
return
(
QString
(
"Simple Smoother"
));
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment