Commit 4af88cba authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps plugin for camera control

parent 2771f708
cmake_minimum_required(VERSION 2.8)
INCLUDE_DIRECTORIES(
${SCHNApps_ROOT_DIR}/include
${SCHNApps_ROOT_DIR}/Plugins/cameraControl
${CMAKE_CURRENT_BINARY_DIR}
)
SET( PLUGIN_SRC
${SCHNApps_ROOT_DIR}/Plugins/cameraControl/cameraControl.cpp
)
SET( PLUGIN_H
${SCHNApps_ROOT_DIR}/Plugins/cameraControl/cameraControl.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( CameraControlD SHARED
${PLUGIN_SRC}
${PLUGIN_UI}
${PLUGIN_MOC}
)
TARGET_LINK_LIBRARIES( CameraControlD
${CGoGN_LIBS_D}
${COMMON_LIBS}
)
ADD_DEPENDENCIES( CameraControlD SCHNAppsD )
SET_TARGET_PROPERTIES( CameraControlD 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( CameraControl SHARED
${PLUGIN_SRC}
${PLUGIN_UI}
${PLUGIN_MOC}
)
TARGET_LINK_LIBRARIES( CameraControl
${CGoGN_LIBS_R}
${COMMON_LIBS}
)
ADD_DEPENDENCIES( CameraControl SCHNApps )
ENDIF ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
#include "cameraControl.h"
#include "mapHandler.h"
#include "Algo/Import/import.h"
#include <QFileDialog>
#include <QFileInfo>
bool CameraControlPlugin::enable()
{
return true;
}
#ifndef DEBUG
Q_EXPORT_PLUGIN2(CameraControlPlugin, CameraControlPlugin)
#else
Q_EXPORT_PLUGIN2(CameraControlPluginD, CameraControlPlugin)
#endif
#ifndef _CAMERACONTROL_PLUGIN_H_
#define _CAMERACONTROL_PLUGIN_H_
#include "plugin.h"
using namespace CGoGN;
using namespace SCHNApps;
class CameraControlPlugin : public Plugin
{
Q_OBJECT
Q_INTERFACES(CGoGN::SCHNApps::Plugin)
public:
CameraControlPlugin()
{
setProvidesRendering(false);
}
~CameraControlPlugin()
{}
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
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