Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CGoGN
CGoGN
Commits
6065ae86
Commit
6065ae86
authored
Jan 30, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: create surface deformation plugin
parent
ee777b79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
0 deletions
+124
-0
SCHNApps/Plugins/surfaceDeformation/CMakeLists.txt
SCHNApps/Plugins/surfaceDeformation/CMakeLists.txt
+69
-0
SCHNApps/Plugins/surfaceDeformation/surfaceDeformation.cpp
SCHNApps/Plugins/surfaceDeformation/surfaceDeformation.cpp
+12
-0
SCHNApps/Plugins/surfaceDeformation/surfaceDeformation.h
SCHNApps/Plugins/surfaceDeformation/surfaceDeformation.h
+43
-0
No files found.
SCHNApps/Plugins/surfaceDeformation/CMakeLists.txt
0 → 100644
View file @
6065ae86
cmake_minimum_required
(
VERSION 2.8
)
INCLUDE_DIRECTORIES
(
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/Plugins/surfaceDeformation
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
PLUGIN_SRC
${
SCHNApps_ROOT_DIR
}
/Plugins/surfaceDeformation/surfaceDeformation.cpp
)
SET
(
PLUGIN_H
${
SCHNApps_ROOT_DIR
}
/Plugins/surfaceDeformation/surfaceDeformation.h
)
IF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
ADD_DEFINITIONS
(
-DDEBUG
)
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Debug
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ENDIF
(
WIN32
)
# QT4_WRAP_UI( PLUGIN_UI ${PLUGIN_FORM} )
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
SurfaceDeformationD SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
SurfaceDeformationD
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
)
ADD_DEPENDENCIES
(
SurfaceDeformationD SCHNAppsD
)
SET_TARGET_PROPERTIES
(
SurfaceDeformationD PROPERTIES COMPILE_DEFINITIONS
"DEBUG"
)
ELSE
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ENDIF
(
WIN32
)
# QT4_WRAP_UI( PLUGIN_UI ${PLUGIN_FORM} )
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
SurfaceDeformation SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
SurfaceDeformation
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
)
ADD_DEPENDENCIES
(
SurfaceDeformation SCHNApps
)
ENDIF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
SCHNApps/Plugins/surfaceDeformation/surfaceDeformation.cpp
0 → 100644
View file @
6065ae86
#include "surfaceDeformation.h"
bool
SurfaceDeformationPlugin
::
enable
()
{
return
true
;
}
#ifndef DEBUG
Q_EXPORT_PLUGIN2
(
SurfaceDeformationPlugin
,
SurfaceDeformationPlugin
)
#else
Q_EXPORT_PLUGIN2
(
SurfaceDeformationPluginD
,
SurfaceDeformationPlugin
)
#endif
SCHNApps/Plugins/surfaceDeformation/surfaceDeformation.h
0 → 100644
View file @
6065ae86
#ifndef _SURFACEDEFORMATION_PLUGIN_H_
#define _SURFACEDEFORMATION_PLUGIN_H_
#include "plugin.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
class
SurfaceDeformationPlugin
:
public
Plugin
{
Q_OBJECT
Q_INTERFACES
(
CGoGN
::
SCHNApps
::
Plugin
)
public:
SurfaceDeformationPlugin
()
{
setProvidesRendering
(
false
);
}
~
SurfaceDeformationPlugin
()
{}
virtual
bool
enable
();
virtual
void
disable
()
{}
virtual
void
redraw
(
View
*
view
)
{}
virtual
void
keyPress
(
View
*
view
,
int
key
)
{}
virtual
void
keyRelease
(
View
*
view
,
int
key
)
{}
virtual
void
mousePress
(
View
*
view
,
int
button
,
int
x
,
int
y
)
{}
virtual
void
mouseRelease
(
View
*
view
,
int
button
,
int
x
,
int
y
)
{}
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
public
slots
:
private:
};
#endif
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