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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
0db0b7b1
Commit
0db0b7b1
authored
Dec 05, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn:~kraemer/CGoGN
parents
4e02ea52
81df0944
Changes
89
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
89 changed files
with
3253 additions
and
6878 deletions
+3253
-6878
CMakeLists.txt
CMakeLists.txt
+1
-0
SCHNApps/CMakeLists.txt
SCHNApps/CMakeLists.txt
+3
-0
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+34
-19
SCHNApps/Plugins/firstPlugin/CMakeLists.txt
SCHNApps/Plugins/firstPlugin/CMakeLists.txt
+2
-2
SCHNApps/Plugins/firstPlugin/include/firstPlugin.h
SCHNApps/Plugins/firstPlugin/include/firstPlugin.h
+30
-52
SCHNApps/Plugins/firstPlugin/src/firstPlugin.cpp
SCHNApps/Plugins/firstPlugin/src/firstPlugin.cpp
+29
-43
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+34
-21
SCHNApps/forms/cameraDialog.ui
SCHNApps/forms/cameraDialog.ui
+70
-0
SCHNApps/forms/cameraOptionDialog.ui
SCHNApps/forms/cameraOptionDialog.ui
+0
-174
SCHNApps/forms/cameraSceneDialog.ui
SCHNApps/forms/cameraSceneDialog.ui
+0
-136
SCHNApps/forms/cameraViewDialog.ui
SCHNApps/forms/cameraViewDialog.ui
+20
-105
SCHNApps/forms/globalCameraDialog.ui
SCHNApps/forms/globalCameraDialog.ui
+0
-99
SCHNApps/forms/linkViewDialog.ui
SCHNApps/forms/linkViewDialog.ui
+0
-94
SCHNApps/forms/mapPluginDialog.ui
SCHNApps/forms/mapPluginDialog.ui
+0
-111
SCHNApps/forms/mapsViewDialog.ui
SCHNApps/forms/mapsViewDialog.ui
+58
-0
SCHNApps/forms/newSceneDialog.ui
SCHNApps/forms/newSceneDialog.ui
+0
-134
SCHNApps/forms/pluginDialog.ui
SCHNApps/forms/pluginDialog.ui
+68
-102
SCHNApps/forms/pluginsViewDialog.ui
SCHNApps/forms/pluginsViewDialog.ui
+55
-0
SCHNApps/forms/window.ui
SCHNApps/forms/window.ui
+25
-57
SCHNApps/include/camera.h
SCHNApps/include/camera.h
+46
-22
SCHNApps/include/cameraDialog.h
SCHNApps/include/cameraDialog.h
+27
-0
SCHNApps/include/cameraOptionDialog.h
SCHNApps/include/cameraOptionDialog.h
+0
-26
SCHNApps/include/cameraSceneDialog.h
SCHNApps/include/cameraSceneDialog.h
+0
-51
SCHNApps/include/cameraViewDialog.h
SCHNApps/include/cameraViewDialog.h
+14
-15
SCHNApps/include/context.h
SCHNApps/include/context.h
+0
-16
SCHNApps/include/globalCameraDialog.h
SCHNApps/include/globalCameraDialog.h
+0
-93
SCHNApps/include/linkViewDialog.h
SCHNApps/include/linkViewDialog.h
+0
-32
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+40
-23
SCHNApps/include/mapPluginDialog.h
SCHNApps/include/mapPluginDialog.h
+0
-32
SCHNApps/include/mapsViewDialog.h
SCHNApps/include/mapsViewDialog.h
+30
-0
SCHNApps/include/newSceneDialog.h
SCHNApps/include/newSceneDialog.h
+0
-37
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+77
-82
SCHNApps/include/pluginDialog.h
SCHNApps/include/pluginDialog.h
+30
-27
SCHNApps/include/pluginsViewDialog.h
SCHNApps/include/pluginsViewDialog.h
+30
-0
SCHNApps/include/renderContainer.h
SCHNApps/include/renderContainer.h
+0
-72
SCHNApps/include/scene.h
SCHNApps/include/scene.h
+0
-101
SCHNApps/include/simplePlugin.h
SCHNApps/include/simplePlugin.h
+0
-74
SCHNApps/include/splitArea.h
SCHNApps/include/splitArea.h
+9
-8
SCHNApps/include/system.h
SCHNApps/include/system.h
+88
-61
SCHNApps/include/texture.h
SCHNApps/include/texture.h
+17
-0
SCHNApps/include/types.h
SCHNApps/include/types.h
+28
-36
SCHNApps/include/vboHandler.h
SCHNApps/include/vboHandler.h
+15
-19
SCHNApps/include/view.h
SCHNApps/include/view.h
+63
-72
SCHNApps/include/viewButtonArea.h
SCHNApps/include/viewButtonArea.h
+17
-30
SCHNApps/include/viewSelector.h
SCHNApps/include/viewSelector.h
+55
-31
SCHNApps/include/visualPlugin.h
SCHNApps/include/visualPlugin.h
+0
-94
SCHNApps/include/window.h
SCHNApps/include/window.h
+146
-232
SCHNApps/resources/icons/broken_link_32.png
SCHNApps/resources/icons/broken_link_32.png
+0
-0
SCHNApps/resources/icons/camera_32.png
SCHNApps/resources/icons/camera_32.png
+0
-0
SCHNApps/resources/icons/check_32.png
SCHNApps/resources/icons/check_32.png
+0
-0
SCHNApps/resources/icons/close_32.png
SCHNApps/resources/icons/close_32.png
+0
-0
SCHNApps/resources/icons/give_32.png
SCHNApps/resources/icons/give_32.png
+0
-0
SCHNApps/resources/icons/link_32.png
SCHNApps/resources/icons/link_32.png
+0
-0
SCHNApps/resources/icons/maps_32.png
SCHNApps/resources/icons/maps_32.png
+0
-0
SCHNApps/resources/icons/plugins_32.png
SCHNApps/resources/icons/plugins_32.png
+0
-0
SCHNApps/resources/icons/separate_camera_32.png
SCHNApps/resources/icons/separate_camera_32.png
+0
-0
SCHNApps/resources/icons/share_32.png
SCHNApps/resources/icons/share_32.png
+0
-0
SCHNApps/resources/resources.qrc
SCHNApps/resources/resources.qrc
+10
-8
SCHNApps/src/camera.cpp
SCHNApps/src/camera.cpp
+21
-45
SCHNApps/src/cameraDialog.cpp
SCHNApps/src/cameraDialog.cpp
+55
-0
SCHNApps/src/cameraOptionDialog.cpp
SCHNApps/src/cameraOptionDialog.cpp
+0
-63
SCHNApps/src/cameraSceneDialog.cpp
SCHNApps/src/cameraSceneDialog.cpp
+0
-243
SCHNApps/src/cameraViewDialog.cpp
SCHNApps/src/cameraViewDialog.cpp
+54
-76
SCHNApps/src/context.cpp
SCHNApps/src/context.cpp
+0
-9
SCHNApps/src/globalCameraDialog.cpp
SCHNApps/src/globalCameraDialog.cpp
+0
-333
SCHNApps/src/linkViewDialog.cpp
SCHNApps/src/linkViewDialog.cpp
+0
-202
SCHNApps/src/main.cpp
SCHNApps/src/main.cpp
+4
-4
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+63
-61
SCHNApps/src/mapPluginDialog.cpp
SCHNApps/src/mapPluginDialog.cpp
+0
-120
SCHNApps/src/mapsViewDialog.cpp
SCHNApps/src/mapsViewDialog.cpp
+81
-0
SCHNApps/src/newSceneDialog.cpp
SCHNApps/src/newSceneDialog.cpp
+0
-234
SCHNApps/src/plugin.cpp
SCHNApps/src/plugin.cpp
+123
-0
SCHNApps/src/pluginDialog.cpp
SCHNApps/src/pluginDialog.cpp
+260
-281
SCHNApps/src/pluginsViewDialog.cpp
SCHNApps/src/pluginsViewDialog.cpp
+85
-0
SCHNApps/src/renderContainer.cpp
SCHNApps/src/renderContainer.cpp
+0
-212
SCHNApps/src/scene.cpp
SCHNApps/src/scene.cpp
+0
-423
SCHNApps/src/sceneSelector.cpp
SCHNApps/src/sceneSelector.cpp
+0
-511
SCHNApps/src/simplePlugin.cpp
SCHNApps/src/simplePlugin.cpp
+0
-92
SCHNApps/src/splitArea.cpp
SCHNApps/src/splitArea.cpp
+124
-118
SCHNApps/src/system.cpp
SCHNApps/src/system.cpp
+85
-95
SCHNApps/src/vboHandler.cpp
SCHNApps/src/vboHandler.cpp
+0
-30
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+152
-356
SCHNApps/src/viewButtonArea.cpp
SCHNApps/src/viewButtonArea.cpp
+53
-53
SCHNApps/src/viewSelector.cpp
SCHNApps/src/viewSelector.cpp
+496
-0
SCHNApps/src/visualPlugin.cpp
SCHNApps/src/visualPlugin.cpp
+0
-356
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+409
-518
include/Topology/generic/attributeHandler.h
include/Topology/generic/attributeHandler.h
+14
-0
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+1
-0
include/Utils/vbo.h
include/Utils/vbo.h
+2
-0
No files found.
CMakeLists.txt
View file @
0db0b7b1
...
...
@@ -146,6 +146,7 @@ IF(WIN32)
# set(CMAKE_CONFIGURATION_TYPES "Release Debug" CACHE STRING "Only Release or Debug" FORCE)
ELSE
(
WIN32
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -fPIC"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall -fPIC"
)
add_subdirectory
(
Release
)
add_subdirectory
(
Debug
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
...
...
SCHNApps/CMakeLists.txt
View file @
0db0b7b1
...
...
@@ -8,12 +8,15 @@ SET( QT_USE_QTDESIGNER TRUE )
SET
(
QT_USE_QTGUI TRUE
)
SET
(
QT_USE_QTPLUGIN TRUE
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -fPIC"
)
#========CGoGN========#
SET
(
CGoGN_ROOT_DIR
${
CMAKE_SOURCE_DIR
}
/.. CACHE STRING
"CGoGN root dir"
)
INCLUDE
(
${
CGoGN_ROOT_DIR
}
/apps_cmake.txt
)
find_package
(
Qt4 REQUIRED
)
#=======QGLViewer=========#
find_package
(
QGLViewer REQUIRED
)
...
...
SCHNApps/Debug/CMakeLists.txt
View file @
0db0b7b1
...
...
@@ -20,34 +20,49 @@ INCLUDE_DIRECTORIES(
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/context.cpp
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/interface/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/visualization/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/splitArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/system.cpp
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewSelector.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsViewDialog.cpp
)
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
${
SCHNApps_ROOT_DIR
}
/include/camera.h
${
SCHNApps_ROOT_DIR
}
/include/mapHandler.h
${
SCHNApps_ROOT_DIR
}
/include/plugin.h
${
SCHNApps_ROOT_DIR
}
/include/splitArea.h
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/viewSelector.h
${
SCHNApps_ROOT_DIR
}
/include/cameraDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginDialog.h
${
SCHNApps_ROOT_DIR
}
/include/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsViewDialog.h
)
file
(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/*.ui
${
SCHNApps_ROOT_DIR
}
/forms/window.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsViewDialog.ui
)
QT4_WRAP_UI
(
UI_H_FILES
...
...
SCHNApps/Plugins/firstPlugin/CMakeLists.txt
View file @
0db0b7b1
...
...
@@ -7,17 +7,17 @@ INCLUDE_DIRECTORIES(
)
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
)
ADD_DEFINITIONS
(
-DDEBUG
)
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ELSE
(
WIN32
)
...
...
SCHNApps/Plugins/firstPlugin/include/firstPlugin.h
View file @
0db0b7b1
#ifndef _FIRSTPLUGIN_H_
#define _FIRSTPLUGIN_H_
#include "plugin
s/visualPlugin
.h"
#include "plugin.h"
/**---CGoGN includes **/
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Algo/Render/GL2/topoRender.h"
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderFlat.h"
/**---CGoGN includes **/
/**---Definitions specific to CGoGN ---*/
...
...
@@ -36,12 +37,9 @@ typedef PFP::VEC3 VEC3;
*/
/**
* Our plugin must inherit from VisualPlugin,
* that is a class that itself is an implementation
* of the Plugin interface (virtual class). It contains
* many useful and essantial methods.
* Our plugin must inherit from Plugin
*/
class
FirstPlugin
:
public
Visual
Plugin
class
FirstPlugin
:
public
Plugin
{
/**
* Essential Qt macros.
...
...
@@ -50,70 +48,50 @@ class FirstPlugin : public VisualPlugin
Q_INTERFACES
(
Plugin
)
public:
FirstPlugin
()
{}
~
FirstPlugin
()
{}
FirstPlugin
()
{
setProvidesRendering
(
true
);
}
/**
* The classical call back for the initGL method
* When a scene will be link to this plugin, it will call
* back this method with itself as a parameter.
*/
void
cb_initGL
(
Scene
*
scene
);
~
FirstPlugin
()
{}
/**
* The drawing method that needs to be overloaded.
* Each time a scene (that is to say, at least one of the
* views that is contains) needs to be refresh, it calls back
* this method with itself as a parameter
*/
void
cb_redraw
(
Scene
*
scene
);
/**
* The plugin's activation method
* The plugin's enable method
* Each time the main application loads this plugin,
* it call this method. Writing this method is
* the occasion to initialize the plugin and check certain
* conditions.
* If this methods return 'false', the plugin load will be aborted.
*/
bool
activat
e
();
bool
enabl
e
();
/**
* The plugin's disabl
ing
method
* The plugin's disabl
e
method
* Each time the main application will unload the plugin
* it will call this method.
*/
void
disable
();
protected:
/** Attributes that are specific to this plugin **/
MAP
myMap
;
virtual
void
redraw
(
View
*
view
);
// attribute for vertices positions
VertexAttribute
<
VEC3
>
position
;
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 mouseClick(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
)
{}
// render (for the topo)
Algo
::
Render
::
GL2
::
TopoRender
*
m_render_topo
;
virtual
void
viewAdded
(
View
*
view
);
virtual
void
viewRemoved
(
View
*
view
)
{}
// 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 **/
protected:
MAP
myMap
;
VertexAttribute
<
VEC3
>
position
;
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Utils
::
VBO
*
m_positionVBO
;
Utils
::
ShaderFlat
*
m_flatShader
;
};
#endif // _FIRSTPLUGIN_H_
SCHNApps/Plugins/firstPlugin/src/firstPlugin.cpp
View file @
0db0b7b1
#include "firstPlugin.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Import/import.h"
void
FirstPlugin
::
cb_initGL
(
Scene
*
scene
)
bool
FirstPlugin
::
enable
(
)
{
if
(
scene
)
{
// we fit the first (possibly the only) view of the newly liked
// scene to the content of our map
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
()
;
m_positionVBO
=
new
Utils
::
VBO
()
;
m_flatShader
=
new
Utils
::
ShaderFlat
()
;
m_flatShader
->
setAttributePosition
(
m_positionVBO
)
;
m_flatShader
->
setAmbiant
(
Geom
::
Vec4f
(
0.2
f
,
0.2
f
,
0.2
f
,
0.1
f
))
;
m_flatShader
->
setDiffuse
(
Geom
::
Vec4f
(
0.8
f
,
0.9
f
,
0.7
f
,
1.0
f
))
;
m_flatShader
->
setExplode
(
1.0
f
)
;
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
NULL
,
m_flatShader
)
;
// bounding box of scene
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
std
::
vector
<
std
::
string
>
attrNames
;
CGoGN
::
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
"/home/kraemer/Media/Data/surface/lowRes/duck_163.ply"
,
attrNames
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
scene
->
firstViewFitSphere
(
bb
.
center
()[
0
],
bb
.
center
()[
1
],
bb
.
center
()[
2
],
bb
.
maxSize
());
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
CGoGN
::
Algo
::
Render
::
GL2
::
POINTS
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
CGoGN
::
Algo
::
Render
::
GL2
::
LINES
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
)
;
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRender
(
)
;
m_positionVBO
->
updateData
(
position
)
;
// 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
::
cb_redraw
(
Scene
*
scene
)
void
FirstPlugin
::
disable
(
)
{
m_render_topo
->
drawTopo
();
}
bool
FirstPlugin
::
activate
(
)
void
FirstPlugin
::
redraw
(
View
*
view
)
{
// 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
);
m_render_topo
=
NULL
;
return
true
;
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
)
;
glEnable
(
GL_LIGHTING
)
;
m_render
->
draw
(
m_flatShader
,
Algo
::
Render
::
GL2
::
TRIANGLES
)
;
}
void
FirstPlugin
::
disable
(
)
void
FirstPlugin
::
viewAdded
(
View
*
view
)
{
if
(
m_render_topo
)
{
delete
m_render_topo
;
}
CGoGN
::
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
)
;
qglviewer
::
Vec
min
(
bb
.
min
()[
0
],
bb
.
min
()[
1
],
bb
.
min
()[
2
]);
qglviewer
::
Vec
max
(
bb
.
max
()[
0
],
bb
.
max
()[
1
],
bb
.
max
()[
2
])
;
view
->
setSceneBoundingBox
(
min
,
max
);
}
/**
...
...
@@ -67,7 +53,7 @@ void FirstPlugin::disable()
// essential Qt function:
// arguments are
// - the complied name of the plugin
// - the main class of our plugin
(that extends VisualPlugin)
// - the main class of our plugin
Q_EXPORT_PLUGIN2
(
FirstPlugin
,
FirstPlugin
)
#else
Q_EXPORT_PLUGIN2
(
FirstPluginD
,
FirstPlugin
)
...
...
SCHNApps/Release/CMakeLists.txt
View file @
0db0b7b1
...
...
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8)
SET
(
CMAKE_BUILD_TYPE Release
)
ADD_DEFINITIONS
(
-fPIC
)
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ELSE
(
WIN32
)
...
...
@@ -22,34 +20,49 @@ INCLUDE_DIRECTORIES(
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/context.cpp
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/interface/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/visualization/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/dialogs/*.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/splitArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/system.cpp
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewSelector.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsViewDialog.cpp
)
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
${
SCHNApps_ROOT_DIR
}
/include/camera.h
${
SCHNApps_ROOT_DIR
}
/include/mapHandler.h
${
SCHNApps_ROOT_DIR
}
/include/plugin.h
${
SCHNApps_ROOT_DIR
}
/include/splitArea.h
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/viewSelector.h
${
SCHNApps_ROOT_DIR
}
/include/cameraDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginDialog.h
${
SCHNApps_ROOT_DIR
}
/include/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsViewDialog.h
)
file
(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/*.ui
${
SCHNApps_ROOT_DIR
}
/forms/window.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsViewDialog.ui
)
QT4_WRAP_UI
(
UI_H_FILES
...
...
SCHNApps/forms/cameraDialog.ui
0 → 100644
View file @
0db0b7b1
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
CameraDialog
</class>
<widget
class=
"QDialog"
name=
"CameraDialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
198
</width>
<height>
318
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
CameraDialog
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QPushButton"
name=
"addCameraButton"
>
<property
name=
"text"
>
<string>
Add
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"removeCameraButton"
>
<property
name=
"text"
>
<string>
Remove
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QListWidget"
name=
"cameraList"
/>
</item>
</layout>
</item>
<item>
<widget
class=
"QPushButton"
name=
"OKButton"
>
<property
name=
"text"
>
<string>
OK
</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>
OKButton
</sender>
<signal>
clicked()
</signal>
<receiver>
CameraDialog
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
115
</x>
<y>
407
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
115
</x>
<y>
214
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
SCHNApps/forms/cameraOptionDialog.ui
deleted
100644 → 0
View file @
4e02ea52
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
CODialog
</class>
<widget
class=
"QDialog"
name=
"CODialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
363
</width>
<height>
357
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Dialog
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"title"
>
<string>
Camera draw options
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QCheckBox"
name=
"draw_Check"
>
<property
name=
"text"
>
<string>
Draw
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"farPlane_Check"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Draw far plane
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Camera scale:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"scale_Spin"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"minimum"
>
<double>
0.100000000000000
</double>
</property>
<property
name=
"value"
>
<double>
1.000000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"drawPath_Check"
>
<property
name=
"text"
>
<string>
Draw user path
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_2"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"title"
>
<string>
Draw path option
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QCheckBox"
name=
"drawAxis_Check"
>
<property
name=
"text"
>
<string>
draw axis
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Scale:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"frameScale_Spin"
>
<property
name=
"minimum"
>
<double>
0.100000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>