Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
0435b0d5
Commit
0435b0d5
authored
Nov 19, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn:~kraemer/CGoGN
parents
d7f201ae
51b765cb
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
905 additions
and
799 deletions
+905
-799
SCHNApps/CMakeLists.txt
SCHNApps/CMakeLists.txt
+7
-12
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+38
-69
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+3
-0
SCHNApps/Plugins/firstPlugin/CMakeLists.txt
SCHNApps/Plugins/firstPlugin/CMakeLists.txt
+67
-0
SCHNApps/Plugins/firstPlugin/include/firstPlugin.h
SCHNApps/Plugins/firstPlugin/include/firstPlugin.h
+44
-46
SCHNApps/Plugins/firstPlugin/src/firstPlugin.cpp
SCHNApps/Plugins/firstPlugin/src/firstPlugin.cpp
+41
-41
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+38
-69
SCHNApps/include/dialogs/globalCameraDialog.h
SCHNApps/include/dialogs/globalCameraDialog.h
+2
-6
SCHNApps/include/dialogs/newSceneDialog.h
SCHNApps/include/dialogs/newSceneDialog.h
+0
-3
SCHNApps/include/dialogs/pluginDialog.h
SCHNApps/include/dialogs/pluginDialog.h
+0
-1
SCHNApps/include/dialogs/sceneSelector.h
SCHNApps/include/dialogs/sceneSelector.h
+7
-12
SCHNApps/include/interface/system.h
SCHNApps/include/interface/system.h
+0
-8
SCHNApps/include/interface/window.h
SCHNApps/include/interface/window.h
+3
-10
SCHNApps/include/plugins/plugin.h
SCHNApps/include/plugins/plugin.h
+10
-9
SCHNApps/include/plugins/simplePlugin.h
SCHNApps/include/plugins/simplePlugin.h
+3
-3
SCHNApps/include/plugins/visualPlugin.h
SCHNApps/include/plugins/visualPlugin.h
+3
-3
SCHNApps/include/types.h
SCHNApps/include/types.h
+0
-2
SCHNApps/include/visualization/camera.h
SCHNApps/include/visualization/camera.h
+3
-4
SCHNApps/include/visualization/context.h
SCHNApps/include/visualization/context.h
+2
-4
SCHNApps/include/visualization/mapHandler.h
SCHNApps/include/visualization/mapHandler.h
+2
-5
SCHNApps/include/visualization/renderContainer.h
SCHNApps/include/visualization/renderContainer.h
+1
-3
SCHNApps/include/visualization/scene.h
SCHNApps/include/visualization/scene.h
+2
-6
SCHNApps/include/visualization/view.h
SCHNApps/include/visualization/view.h
+3
-7
SCHNApps/resources/resources.qrc
SCHNApps/resources/resources.qrc
+1
-1
SCHNApps/src/dialogs/cameraOptionDialog.cpp
SCHNApps/src/dialogs/cameraOptionDialog.cpp
+16
-11
SCHNApps/src/dialogs/cameraSceneDialog.cpp
SCHNApps/src/dialogs/cameraSceneDialog.cpp
+75
-50
SCHNApps/src/dialogs/cameraViewDialog.cpp
SCHNApps/src/dialogs/cameraViewDialog.cpp
+3
-5
SCHNApps/src/dialogs/globalCameraDialog.cpp
SCHNApps/src/dialogs/globalCameraDialog.cpp
+37
-37
SCHNApps/src/dialogs/linkViewDialog.cpp
SCHNApps/src/dialogs/linkViewDialog.cpp
+14
-13
SCHNApps/src/dialogs/mapPluginDialog.cpp
SCHNApps/src/dialogs/mapPluginDialog.cpp
+4
-4
SCHNApps/src/dialogs/newSceneDialog.cpp
SCHNApps/src/dialogs/newSceneDialog.cpp
+7
-8
SCHNApps/src/dialogs/pluginDialog.cpp
SCHNApps/src/dialogs/pluginDialog.cpp
+67
-51
SCHNApps/src/dialogs/sceneSelector.cpp
SCHNApps/src/dialogs/sceneSelector.cpp
+2
-2
SCHNApps/src/interface/splitArea.cpp
SCHNApps/src/interface/splitArea.cpp
+1
-2
SCHNApps/src/interface/stateHandler.cpp
SCHNApps/src/interface/stateHandler.cpp
+5
-8
SCHNApps/src/interface/system.cpp
SCHNApps/src/interface/system.cpp
+1
-1
SCHNApps/src/interface/viewButtonArea.cpp
SCHNApps/src/interface/viewButtonArea.cpp
+4
-9
SCHNApps/src/interface/window.cpp
SCHNApps/src/interface/window.cpp
+12
-12
SCHNApps/src/main.cpp
SCHNApps/src/main.cpp
+7
-8
SCHNApps/src/plugins/simplePlugin.cpp
SCHNApps/src/plugins/simplePlugin.cpp
+2
-6
SCHNApps/src/plugins/visualPlugin.cpp
SCHNApps/src/plugins/visualPlugin.cpp
+2
-2
SCHNApps/src/visualization/camera.cpp
SCHNApps/src/visualization/camera.cpp
+40
-24
SCHNApps/src/visualization/context.cpp
SCHNApps/src/visualization/context.cpp
+5
-10
SCHNApps/src/visualization/mapHandler.cpp
SCHNApps/src/visualization/mapHandler.cpp
+3
-9
SCHNApps/src/visualization/renderContainer.cpp
SCHNApps/src/visualization/renderContainer.cpp
+2
-3
SCHNApps/src/visualization/scene.cpp
SCHNApps/src/visualization/scene.cpp
+7
-11
SCHNApps/src/visualization/vboHandler.cpp
SCHNApps/src/visualization/vboHandler.cpp
+2
-3
SCHNApps/src/visualization/view.cpp
SCHNApps/src/visualization/view.cpp
+12
-12
ThirdParty/CMakeLists.txt
ThirdParty/CMakeLists.txt
+0
-1
apps_cmake.txt
apps_cmake.txt
+1
-12
include/Algo/BooleanOperator/mergeVertices.h
include/Algo/BooleanOperator/mergeVertices.h
+3
-0
include/Algo/BooleanOperator/mergeVertices.hpp
include/Algo/BooleanOperator/mergeVertices.hpp
+33
-18
include/Algo/Import/importSvg.hpp
include/Algo/Import/importSvg.hpp
+21
-25
include/Algo/MovingObjects/particle_cell_2D.hpp
include/Algo/MovingObjects/particle_cell_2D.hpp
+2
-1
include/Algo/MovingObjects/particle_cell_2D_memo.h
include/Algo/MovingObjects/particle_cell_2D_memo.h
+9
-16
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
+43
-34
include/Algo/Selection/raySelector.hpp
include/Algo/Selection/raySelector.hpp
+0
-14
include/Geometry/orientation.h
include/Geometry/orientation.h
+64
-29
include/Geometry/orientation.hpp
include/Geometry/orientation.hpp
+68
-21
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+48
-0
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+2
-2
include/Topology/generic/traversorCell.hpp
include/Topology/generic/traversorCell.hpp
+1
-1
No files found.
SCHNApps/CMakeLists.txt
View file @
0435b0d5
...
...
@@ -3,9 +3,9 @@ cmake_minimum_required(VERSION 2.8)
project
(
SCHNApps
)
SET
(
QT_USE_QTXML TRUE
)
SET
(
QT_USE_QTDESIGNER TRUE
)
SET
(
QT_USE_QTGUI TRUE
)
SET
(
QT_USE_QTPLUGIN TRUE
)
SET
(
QT_USE_QTDESIGNER TRUE
)
SET
(
QT_USE_QTGUI TRUE
)
SET
(
QT_USE_QTPLUGIN TRUE
)
#========CGoGN========#
SET
(
CGoGN_ROOT_DIR
${
CMAKE_SOURCE_DIR
}
/.. CACHE STRING
"CGoGN root dir"
)
...
...
@@ -16,14 +16,10 @@ INCLUDE(${CGoGN_ROOT_DIR}/apps_cmake.txt)
find_package
(
QGLViewer REQUIRED
)
#======Directories=======#
SET
(
INC_DIR
${
CMAKE_SOURCE_DIR
}
/include
)
SET
(
SRC_DIR
${
CMAKE_SOURCE_DIR
}
/src
)
SET
(
FORMS_DIR
${
CMAKE_SOURCE_DIR
}
/forms
)
SET
(
RESOURCES_DIR
${
CMAKE_SOURCE_DIR
}
/resources
)
SET
(
PLUGIN_DIR
${
CMAKE_SOURCE_DIR
}
/Plugins
)
SET
(
PLUGIN_COMPILE_DIR
${
EXECUTABLE_OUTPUT_PATH
}
/plugins
)
#======SCHNApps=======#
SET
(
SCHNApps_ROOT_DIR
${
CGoGN_ROOT_DIR
}
/SCHNApps
)
SET
(
EXECUTABLE_OUTPUT_PATH
${
SCHNApps_ROOT_DIR
}
/bin
)
SET
(
LIBRARY_OUTPUT_PATH
${
SCHNApps_ROOT_DIR
}
/plugins/lib
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/Release Release
)
IF
(
NOT WIN32
)
...
...
@@ -43,4 +39,3 @@ add_custom_target(doc
COMMENT
"Generating API documentation with Doxygen"
VERBATIM
)
endif
(
DOXYGEN_FOUND
)
SCHNApps/Debug/CMakeLists.txt
View file @
0435b0d5
...
...
@@ -14,95 +14,64 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
SCHNApps_ROOT_DIR
}
/include
)
SET
(
SRC_FILES
${
SRC_DIR
}
/main.cpp
${
SRC_DIR
}
/interface/window.cpp
${
SRC_DIR
}
/interface/system.cpp
${
SRC_DIR
}
/interface/stateHandler.cpp
${
SRC_DIR
}
/visualization/view.cpp
${
SRC_DIR
}
/visualization/scene.cpp
${
SRC_DIR
}
/visualization/camera.cpp
${
SRC_DIR
}
/interface/splitArea.cpp
${
SRC_DIR
}
/dialogs/newSceneDialog.cpp
${
SRC_DIR
}
/dialogs/sceneSelector.cpp
${
SRC_DIR
}
/interface/viewButtonArea.cpp
${
SRC_DIR
}
/dialogs/cameraViewDialog.cpp
${
SRC_DIR
}
/dialogs/cameraOptionDialog.cpp
${
SRC_DIR
}
/dialogs/cameraSceneDialog.cpp
${
SRC_DIR
}
/dialogs/globalCameraDialog.cpp
${
SRC_DIR
}
/dialogs/pluginDialog.cpp
${
SRC_DIR
}
/dialogs/linkViewDialog.cpp
${
SRC_DIR
}
/visualization/vboHandler.cpp
${
SRC_DIR
}
/visualization/mapHandler.cpp
${
SRC_DIR
}
/visualization/context.cpp
${
SRC_DIR
}
/dialogs/mapPluginDialog.cpp
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/interface/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/visualization/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/*.cpp
)
SET
(
H_OBJECT_FILES
${
INC_DIR
}
/interface/window.h
${
INC_DIR
}
/interface/system.h
${
INC_DIR
}
/visualization/view
.h
${
INC_DIR
}
/visualization/scene
.h
${
INC_DIR
}
/interface/splitArea
.h
${
INC_DIR
}
/dialogs/newSceneDialog
.h
${
INC_DIR
}
/dialogs/sceneSelector
.h
${
INC_DIR
}
/interface/viewButtonArea
.h
${
INC_DIR
}
/dialogs/cameraViewDialog.h
${
INC_DIR
}
/dialogs/cameraOptionDialog.h
${
INC_DIR
}
/dialogs/cameraSceneDialog.h
${
INC_DIR
}
/dialogs/globalCameraDialog.h
${
INC_DIR
}
/dialogs/pluginDialog.h
${
INC_DIR
}
/dialogs/linkViewDialog.h
${
INC_DIR
}
/dialogs/mapPluginDialog.h
SET
(
SCHNApps_
H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include
/interface/window.h
${
SCHNApps_ROOT_DIR
}
/include
/interface/system.h
${
SCHNApps_ROOT_DIR
}
/include/interface/viewButtonArea
.h
${
SCHNApps_ROOT_DIR
}
/include/interface/splitArea
.h
${
SCHNApps_ROOT_DIR
}
/include/visualization/view
.h
${
SCHNApps_ROOT_DIR
}
/include/visualization/scene
.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/newSceneDialog
.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/sceneSelector
.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/cameraOptionDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/cameraSceneDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/globalCameraDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/pluginDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/linkViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/mapPluginDialog.h
)
SET
(
FORMS_FILES
${
FORMS_DIR
}
/window.ui
${
FORMS_DIR
}
/questionSessionDialog.ui
${
FORMS_DIR
}
/infoDialog.ui
${
FORMS_DIR
}
/newSceneDialog.ui
${
FORMS_DIR
}
/cameraViewDialog.ui
${
FORMS_DIR
}
/cameraOptionDialog.ui
${
FORMS_DIR
}
/cameraSceneDialog.ui
${
FORMS_DIR
}
/globalCameraDialog.ui
${
FORMS_DIR
}
/pluginDialog.ui
${
FORMS_DIR
}
/linkViewDialog.ui
${
FORMS_DIR
}
/mapPluginDialog.ui
file
(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/*.ui
)
QT4_WRAP_UI
(
UI_H_FILES
${
FORMS
_FILES
}
QT4_WRAP_UI
(
UI_H_FILES
${
SCHNApps_FORM
_FILES
}
)
QT4_WRAP_CPP
(
MOC_FILES
${
H_OBJECT_FILES
}
QT4_WRAP_CPP
(
MOC_FILES
${
SCHNApps_
H_OBJECT_FILES
}
)
QT4_ADD_RESOURCES
(
RCC_FILES
${
RESOURCES_DIR
}
/resources.qrc
QT4_ADD_RESOURCES
(
RCC_FILES
${
SCHNApps_ROOT_DIR
}
/resources
/resources.qrc
)
INCLUDE_DIRECTORIES
(
${
FORMS
}
${
INC_DIR
}
${
INC_DIR
}
/interface
${
INC_DIR
}
/visualization
${
INC_DIR
}
/dialogs
${
INC_DIR
}
/plugins
)
ADD_EXECUTABLE
(
CGoGN_plugD
${
SRC_FILES
}
ADD_EXECUTABLE
(
SCHNAppsD
${
SCHNApps_SRC_FILES
}
${
UI_H_FILES
}
${
MOC_FILES
}
${
RCC_FILES
}
)
TARGET_LINK_LIBRARIES
(
CGoGN_plug
D
TARGET_LINK_LIBRARIES
(
SCHNApps
D
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
)
#ADD_SUBDIRECTORY(${PLUGIN_DIR} plugins)
ADD_SUBDIRECTORY
(
${
SCHNApps_ROOT_DIR
}
/Plugins PluginsD
)
SCHNApps/Plugins/CMakeLists.txt
0 → 100644
View file @
0435b0d5
cmake_minimum_required
(
VERSION 2.8
)
ADD_SUBDIRECTORY
(
firstPlugin
)
SCHNApps/Plugins/firstPlugin/CMakeLists.txt
0 → 100644
View file @
0435b0d5
cmake_minimum_required
(
VERSION 2.8
)
INCLUDE_DIRECTORIES
(
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/Plugins/firstPlugin/include
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
FIRSTPLUGIN_PLUGIN_SRC
${
SCHNApps_ROOT_DIR
}
/src/plugins/visualPlugin.cpp
${
SCHNApps_ROOT_DIR
}
/Plugins/firstPlugin/src/firstPlugin.cpp
)
SET
(
FIRSTPLUGIN_PLUGIN_H
${
SCHNApps_ROOT_DIR
}
/include/plugins/visualPlugin.h
${
SCHNApps_ROOT_DIR
}
/Plugins/firstPlugin/include/firstPlugin.h
)
IF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
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_CPP
(
FIRSTPLUGIN_MOC
${
FIRSTPLUGIN_PLUGIN_H
}
)
ADD_LIBRARY
(
FirstPluginD SHARED
${
FIRSTPLUGIN_PLUGIN_SRC
}
${
FIRSTPLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
FirstPluginD
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_INCLUDE_LIBRARY
}
)
ADD_DEPENDENCIES
(
FirstPluginD SCHNAppsD
)
SET_TARGET_PROPERTIES
(
FirstPluginD 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_CPP
(
FIRSTPLUGIN_MOC
${
FIRSTPLUGIN_PLUGIN_H
}
)
ADD_LIBRARY
(
FirstPlugin SHARED
${
FIRSTPLUGIN_PLUGIN_SRC
}
${
FIRSTPLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
FirstPlugin
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_INCLUDE_LIBRARY
}
)
ADD_DEPENDENCIES
(
FirstPlugin SCHNApps
)
ENDIF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
SCHNApps/Plugins/firstPlugin/include/firstPlugin.h
View file @
0435b0d5
#ifndef FIRSTPLUGIN_H_
#define FIRSTPLUGIN_H_
#include "visualPlugin.h"
#include "plugins/visualPlugin.h"
/**---CGoGN includes **/
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
#include "Topology/generic/parameters.h"
#include "Topology/generic/parameters.h"
#ifdef USE_GMAP
#include "Topology/gmap/embeddedGMap2.h"
#else
#include "Topology/map/embeddedMap2.h"
#endif
#ifdef USE_GMAP
#include "Topology/gmap/embeddedGMap2.h"
#else
#include "Topology/map/embeddedMap2.h"
#endif
#include "Algo/Render/GL2/topoRender.h"
#include "Algo/Render/GL2/topoRender.h"
/**---CGoGN includes **/
/**---Definitions specific to CGoGN ---*/
using
namespace
CGoGN
;
/**---Definitions specific to CGoGN ---*/
using
namespace
CGoGN
;
/**
* Struct that contains some informations about the types of the manipulated objects
* Mainly here to be used by the algorithms that are parameterized by it
*/
struct
PFP
:
public
PFP_STANDARD
{
// definition of the type of the map
#ifdef USE_GMAP
typedef
EmbeddedGMap2
MAP
;
#else
typedef
EmbeddedMap2
MAP
;
#endif
};
/**
* Struct that contains some informations about the types of the manipulated objects
* Mainly here to be used by the algorithms that are parameterized by it
*/
struct
PFP
:
public
PFP_STANDARD
{
// definition of the type of the map
#ifdef USE_GMAP
typedef
EmbeddedGMap2
MAP
;
#else
typedef
EmbeddedMap2
MAP
;
#endif
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
/**---Definitions specific to CGoGN ---*/
/**
...
...
@@ -58,15 +54,17 @@
* of the Plugin interface (virtual class). It contains
* many useful and essantial methods.
*/
class
FirstPlugin
:
public
VisualPlugin
{
class
FirstPlugin
:
public
VisualPlugin
{
/**
* Essential Qt macros.
*/
Q_OBJECT
Q_INTERFACES
(
Plugin
)
public:
FirstPlugin
(){}
~
FirstPlugin
(){}
FirstPlugin
()
{}
~
FirstPlugin
()
{}
/**
* The classical call back for the initGL method
...
...
@@ -92,6 +90,7 @@ public:
* If this methods return 'false', the plugin load will be aborted.
*/
bool
activate
();
/**
* The plugin's disabling method
* Each time the main application will unload the plugin
...
...
@@ -99,23 +98,22 @@ public:
*/
void
disable
();
protected:
/** Attributes that are specific to this plugin **/
MAP
myMap
;
MAP
myMap
;
// attribute for vertices positions
VertexAttribute
<
VEC3
>
position
;
// attribute for vertices positions
VertexAttribute
<
VEC3
>
position
;
// render (for the topo)
Algo
::
Render
::
GL2
::
TopoRender
*
m_render_topo
;
// render (for the topo)
Algo
::
Render
::
GL2
::
TopoRender
*
m_render_topo
;
// just for more compact writing
inline
Dart
PHI1
(
Dart
d
)
{
return
myMap
.
phi1
(
d
);
}
inline
Dart
PHI_1
(
Dart
d
)
{
return
myMap
.
phi_1
(
d
);
}
inline
Dart
PHI2
(
Dart
d
)
{
return
myMap
.
phi2
(
d
);
}
template
<
int
X
>
Dart
PHI
(
Dart
d
)
{
return
myMap
.
phi
<
X
>
(
d
);
}
// just for more compact writing
inline
Dart
PHI1
(
Dart
d
)
{
return
myMap
.
phi1
(
d
);
}
inline
Dart
PHI_1
(
Dart
d
)
{
return
myMap
.
phi_1
(
d
);
}
inline
Dart
PHI2
(
Dart
d
)
{
return
myMap
.
phi2
(
d
);
}
template
<
int
X
>
Dart
PHI
(
Dart
d
)
{
return
myMap
.
phi
<
X
>
(
d
);
}
/** Attributes that are specific to this plugin **/
};
...
...
SCHNApps/Plugins/firstPlugin/src/firstPlugin.cpp
View file @
0435b0d5
#include "firstPlugin.h"
#include "Algo/Geometry/boundingbox.h"
void
FirstPlugin
::
cb_initGL
(
Scene
*
scene
)
{
if
(
scene
)
{
// we fit the first (possibly the only) view of the newly liked
// scene to the content of our map
bool
FirstPlugin
::
activate
(){
// creation of 2 new faces: 1 triangle and 1 square
Dart
d1
=
myMap
.
newFace
(
3
);
Dart
d2
=
myMap
.
newFace
(
4
);
// sew these faces along one of their edge
myMap
.
sewFaces
(
d1
,
d2
);
// creation of a new attribute on vertices of type 3D vector for position.
// a handler to this attribute is returned
position
=
myMap
.
addAttribute
<
VEC3
,
VERTEX
>
(
"position"
);
// affect position by moving in the map
position
[
d1
]
=
VEC3
(
0
,
0
,
0
);
position
[
PHI1
(
d1
)]
=
VEC3
(
2
,
0
,
0
);
position
[
PHI_1
(
d1
)]
=
VEC3
(
1
,
2
,
0
);
position
[
PHI
<
11
>
(
d2
)]
=
VEC3
(
0
,
-
2
,
0
);
position
[
PHI_1
(
d2
)]
=
VEC3
(
2
,
-
2
,
0
);
// bounding box of scene
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
m_render_topo
=
NULL
;
scene
->
firstViewFitSphere
(
bb
.
center
()[
0
],
bb
.
center
()[
1
],
bb
.
center
()[
2
],
bb
.
maxSize
())
;
return
true
;
}
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRender
()
;
void
FirstPlugin
::
disable
(){
if
(
m_render_topo
){
delete
m_render_topo
;
// render the topo of the map without boundary darts
SelectorDartNoBoundary
<
PFP
::
MAP
>
nb
(
myMap
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
,
nb
)
;
}
}
void
FirstPlugin
::
cb_redraw
(
Scene
*
scene
){
void
FirstPlugin
::
cb_redraw
(
Scene
*
scene
)
{
m_render_topo
->
drawTopo
();
}
void
FirstPlugin
::
cb_initGL
(
Scene
*
scene
){
if
(
scene
){
//we fit the first (possibly the only) view of the newly liked
//scene to the content of our map
// bounding box of scene
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
bool
FirstPlugin
::
activate
()
{
// creation of 2 new faces: 1 triangle and 1 square
Dart
d1
=
myMap
.
newFace
(
3
);
Dart
d2
=
myMap
.
newFace
(
4
);
scene
->
firstViewFitSphere
(
bb
.
center
()[
0
],
bb
.
center
()[
1
],
bb
.
center
()[
2
],
bb
.
maxSize
());
// sew these faces along one of their edge
myMap
.
sewFaces
(
d1
,
d2
);
// creation of a new attribute on vertices of type 3D vector for position.
// a handler to this attribute is returned
position
=
myMap
.
addAttribute
<
VEC3
,
VERTEX
>
(
"position"
);
// affect position by moving in the map
position
[
d1
]
=
VEC3
(
0
,
0
,
0
);
position
[
PHI1
(
d1
)]
=
VEC3
(
2
,
0
,
0
);
position
[
PHI_1
(
d1
)]
=
VEC3
(
1
,
2
,
0
);
position
[
PHI
<
11
>
(
d2
)]
=
VEC3
(
0
,
-
2
,
0
);
position
[
PHI_1
(
d2
)]
=
VEC3
(
2
,
-
2
,
0
);
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRender
()
;
m_render_topo
=
NULL
;
// render the topo of the map without boundary darts
SelectorDartNoBoundary
<
PFP
::
MAP
>
nb
(
myMap
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
,
nb
);
return
true
;
}
void
FirstPlugin
::
disable
()
{
if
(
m_render_topo
)
{
delete
m_render_topo
;
}
}
/**
* If we want to compile this plugin in debug mode,
* we also define a DEBUG macro at the compilation
*/
#ifndef DEBUG
//essential Qt function:
//arguments are
//
essential Qt function:
//
arguments are
// - the complied name of the plugin
// - the main class of our plugin (that extends VisualPlugin)
Q_EXPORT_PLUGIN2
(
FirstPlugin
,
FirstPlugin
)
...
...
SCHNApps/Release/CMakeLists.txt
View file @
0435b0d5
...
...
@@ -16,95 +16,64 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
SCHNApps_ROOT_DIR
}
/include
)
SET
(
SRC_FILES
${
SRC_DIR
}
/main.cpp
${
SRC_DIR
}
/interface/window.cpp
${
SRC_DIR
}
/interface/system.cpp
${
SRC_DIR
}
/interface/stateHandler.cpp
${
SRC_DIR
}
/visualization/view.cpp
${
SRC_DIR
}
/visualization/scene.cpp
${
SRC_DIR
}
/visualization/camera.cpp
${
SRC_DIR
}
/interface/splitArea.cpp
${
SRC_DIR
}
/dialogs/newSceneDialog.cpp
${
SRC_DIR
}
/dialogs/sceneSelector.cpp
${
SRC_DIR
}
/interface/viewButtonArea.cpp
${
SRC_DIR
}
/dialogs/cameraViewDialog.cpp
${
SRC_DIR
}
/dialogs/cameraOptionDialog.cpp
${
SRC_DIR
}
/dialogs/cameraSceneDialog.cpp
${
SRC_DIR
}
/dialogs/globalCameraDialog.cpp
${
SRC_DIR
}
/dialogs/pluginDialog.cpp
${
SRC_DIR
}
/dialogs/linkViewDialog.cpp
${
SRC_DIR
}
/visualization/vboHandler.cpp
${
SRC_DIR
}
/visualization/mapHandler.cpp
${
SRC_DIR
}
/visualization/context.cpp
${
SRC_DIR
}
/dialogs/mapPluginDialog.cpp
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/interface/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/visualization/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/*.cpp
)
SET
(
H_OBJECT_FILES
${
INC_DIR
}
/interface/window.h
${
INC_DIR
}
/interface/system.h
${
INC_DIR
}
/visualization/view
.h
${
INC_DIR
}
/visualization/scene
.h
${
INC_DIR
}
/interface/splitArea
.h
${
INC_DIR
}
/dialogs/newSceneDialog
.h
${
INC_DIR
}
/dialogs/sceneSelector
.h
${
INC_DIR
}
/interface/viewButtonArea
.h
${
INC_DIR
}
/dialogs/cameraViewDialog.h
${
INC_DIR
}
/dialogs/cameraOptionDialog.h
${
INC_DIR
}
/dialogs/cameraSceneDialog.h
${
INC_DIR
}
/dialogs/globalCameraDialog.h
${
INC_DIR
}
/dialogs/pluginDialog.h
${
INC_DIR
}
/dialogs/linkViewDialog.h
${
INC_DIR
}
/dialogs/mapPluginDialog.h
SET
(
SCHNApps_
H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include
/interface/window.h
${
SCHNApps_ROOT_DIR
}
/include
/interface/system.h
${
SCHNApps_ROOT_DIR
}
/include/interface/viewButtonArea
.h
${
SCHNApps_ROOT_DIR
}
/include/interface/splitArea
.h
${
SCHNApps_ROOT_DIR
}
/include/visualization/view
.h
${
SCHNApps_ROOT_DIR
}
/include/visualization/scene
.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/newSceneDialog
.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/sceneSelector
.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/cameraOptionDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/cameraSceneDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/globalCameraDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/pluginDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/linkViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include
/dialogs/mapPluginDialog.h
)
SET
(
FORMS_FILES
${
FORMS_DIR
}
/window.ui
${
FORMS_DIR
}
/questionSessionDialog.ui
${
FORMS_DIR
}
/infoDialog.ui
${
FORMS_DIR
}
/newSceneDialog.ui
${
FORMS_DIR
}
/cameraViewDialog.ui
${
FORMS_DIR
}
/cameraOptionDialog.ui
${
FORMS_DIR
}
/cameraSceneDialog.ui
${
FORMS_DIR
}
/globalCameraDialog.ui
${
FORMS_DIR
}
/pluginDialog.ui
${
FORMS_DIR
}
/linkViewDialog.ui
${
FORMS_DIR
}
/mapPluginDialog.ui
file
(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/*.ui
)
QT4_WRAP_UI
(
UI_H_FILES
${
FORMS
_FILES
}
QT4_WRAP_UI
(
UI_H_FILES
${
SCHNApps_FORM
_FILES
}
)
QT4_WRAP_CPP
(
MOC_FILES
${
H_OBJECT_FILES
}
QT4_WRAP_CPP
(
MOC_FILES
${
SCHNApps_
H_OBJECT_FILES
}