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
7a3c137f
Commit
7a3c137f
authored
Dec 11, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: added namespaces
parent
417d1506
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
471 additions
and
104 deletions
+471
-104
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+12
-12
SCHNApps/Plugins/import/CMakeLists.txt
SCHNApps/Plugins/import/CMakeLists.txt
+3
-3
SCHNApps/Plugins/import/import.cpp
SCHNApps/Plugins/import/import.cpp
+26
-12
SCHNApps/Plugins/import/import.h
SCHNApps/Plugins/import/import.h
+8
-4
SCHNApps/Plugins/render/render.cpp
SCHNApps/Plugins/render/render.cpp
+39
-3
SCHNApps/Plugins/render/render.h
SCHNApps/Plugins/render/render.h
+20
-5
SCHNApps/Plugins/render/render.ui
SCHNApps/Plugins/render/render.ui
+32
-2
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+12
-12
SCHNApps/include/camera.h
SCHNApps/include/camera.h
+10
-0
SCHNApps/include/dialogs/cameraViewDialog.h
SCHNApps/include/dialogs/cameraViewDialog.h
+10
-0
SCHNApps/include/dialogs/camerasDialog.h
SCHNApps/include/dialogs/camerasDialog.h
+10
-0
SCHNApps/include/dialogs/mapsDialog.h
SCHNApps/include/dialogs/mapsDialog.h
+10
-0
SCHNApps/include/dialogs/mapsViewDialog.h
SCHNApps/include/dialogs/mapsViewDialog.h
+10
-0
SCHNApps/include/dialogs/pluginsDialog.h
SCHNApps/include/dialogs/pluginsDialog.h
+12
-0
SCHNApps/include/dialogs/pluginsViewDialog.h
SCHNApps/include/dialogs/pluginsViewDialog.h
+10
-0
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+17
-7
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+11
-1
SCHNApps/include/system.h
SCHNApps/include/system.h
+9
-3
SCHNApps/include/texture.h
SCHNApps/include/texture.h
+10
-0
SCHNApps/include/types.h
SCHNApps/include/types.h
+18
-18
SCHNApps/include/view.h
SCHNApps/include/view.h
+10
-0
SCHNApps/include/viewButtonArea.h
SCHNApps/include/viewButtonArea.h
+10
-0
SCHNApps/include/window.h
SCHNApps/include/window.h
+11
-1
SCHNApps/src/camera.cpp
SCHNApps/src/camera.cpp
+10
-0
SCHNApps/src/dialogs/cameraViewDialog.cpp
SCHNApps/src/dialogs/cameraViewDialog.cpp
+11
-1
SCHNApps/src/dialogs/camerasDialog.cpp
SCHNApps/src/dialogs/camerasDialog.cpp
+12
-1
SCHNApps/src/dialogs/mapsDialog.cpp
SCHNApps/src/dialogs/mapsDialog.cpp
+12
-1
SCHNApps/src/dialogs/mapsViewDialog.cpp
SCHNApps/src/dialogs/mapsViewDialog.cpp
+11
-1
SCHNApps/src/dialogs/pluginsDialog.cpp
SCHNApps/src/dialogs/pluginsDialog.cpp
+11
-1
SCHNApps/src/dialogs/pluginsViewDialog.cpp
SCHNApps/src/dialogs/pluginsViewDialog.cpp
+11
-1
SCHNApps/src/main.cpp
SCHNApps/src/main.cpp
+1
-3
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+16
-6
SCHNApps/src/plugin.cpp
SCHNApps/src/plugin.cpp
+10
-0
SCHNApps/src/system.cpp
SCHNApps/src/system.cpp
+10
-0
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+13
-3
SCHNApps/src/viewButtonArea.cpp
SCHNApps/src/viewButtonArea.cpp
+10
-0
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+13
-3
No files found.
SCHNApps/Debug/CMakeLists.txt
View file @
7a3c137f
...
...
@@ -29,24 +29,24 @@ file(
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/camerasDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
camerasDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
pluginsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
mapsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
mapsViewDialog.cpp
)
SET
(
SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/camerasDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
camerasDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
pluginsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
mapsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
mapsViewDialog.h
)
file
(
...
...
SCHNApps/Plugins/import/CMakeLists.txt
View file @
7a3c137f
...
...
@@ -24,9 +24,9 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Debug
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ENDIF
(
WIN32
)
QT4_WRAP_UI
(
PLUGIN_UI
${
PLUGIN_FORM
}
)
#
QT4_WRAP_UI( PLUGIN_UI ${PLUGIN_FORM} )
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
ImportPluginD SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
...
...
@@ -51,7 +51,7 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ENDIF
(
WIN32
)
QT4_WRAP_UI
(
PLUGIN_UI
${
PLUGIN_FORM
}
)
#
QT4_WRAP_UI( PLUGIN_UI ${PLUGIN_FORM} )
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
ImportPlugin SHARED
...
...
SCHNApps/Plugins/import/import.cpp
View file @
7a3c137f
#include "import.h"
#include <QFileDialog>
#include <QFileInfo>
#include "system.h"
#include "mapHandler.h"
#include "Algo/Import/import.h"
#include <QFileDialog>
#include <QFileInfo>
bool
ImportPlugin
::
enable
()
{
importAction
=
new
QAction
(
"import"
,
this
);
...
...
@@ -28,23 +29,36 @@ void ImportPlugin::cb_import()
MapHandler
<
PFP
>*
h
=
new
MapHandler
<
PFP
>
(
fi
.
baseName
(),
m_window
,
m
);
std
::
vector
<
std
::
string
>
attrNames
;
CGoGN
::
Algo
::
Import
::
importMesh
<
PFP
>
(
*
m
,
fileName
.
toUtf8
().
constData
(),
attrNames
);
Algo
::
Import
::
importMesh
<
PFP
>
(
*
m
,
fileName
.
toUtf8
().
constData
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
VEC3
>
position
=
m
->
getAttribute
<
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
CGoGN
::
VertexAttribute
<
VEC3
>
position
=
m
->
getAttribute
<
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
// create VBO for vertex position attribute
Utils
::
VBO
*
positionVBO
=
h
->
getVBO
(
position
.
name
());
positionVBO
->
updateData
(
position
);
// compute vertex normal attribute
VertexAttribute
<
VEC3
>
normal
=
m
->
getAttribute
<
VEC3
,
CGoGN
::
VERTEX
>
(
"normal"
);
if
(
!
normal
.
isValid
())
normal
=
m
->
addAttribute
<
VEC3
,
CGoGN
::
VERTEX
>
(
"normal"
);
Algo
::
Geometry
::
computeNormalVertices
<
PFP
>
(
*
m
,
position
,
normal
);
// create VBO for vertex normal attribute
CGoGN
::
Utils
::
VBO
*
normalVBO
=
h
->
getVBO
(
"normal"
);
normalVBO
->
updateData
(
normal
);
CGoGN
::
Geom
::
BoundingBox
<
VEC3
>
bb
=
CGoGN
::
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
*
m
,
position
)
;
// compute map bounding box
CGoGN
::
Geom
::
BoundingBox
<
VEC3
>
bb
=
CGoGN
::
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
*
m
,
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
]);
h
->
setBBmin
(
min
);
h
->
setBBmax
(
max
);
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
POINTS
,
CGoGN
::
allDarts
)
;
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
LINES
,
CGoGN
::
allDarts
)
;
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
,
CGoGN
::
allDarts
)
;
CGoGN
::
Utils
::
VBO
*
positionVBO
=
h
->
getVBO
(
position
.
name
());
positionVBO
->
updateData
(
position
);
// compute primitive connectivity VBOs
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
POINTS
,
CGoGN
::
allDarts
);
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
LINES
,
CGoGN
::
allDarts
);
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
,
CGoGN
::
allDarts
);
m_window
->
addMap
(
h
);
}
...
...
SCHNApps/Plugins/import/import.h
View file @
7a3c137f
...
...
@@ -2,25 +2,29 @@
#define _IMPORT_PLUGIN_H_
#include "plugin.h"
#include "view.h"
#include "Topology/generic/functor.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
struct
PFP
:
public
CGoGN
::
PFP_STANDARD
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
struct
PFP
:
public
PFP_STANDARD
{
typedef
CGoGN
::
EmbeddedMap2
MAP
;
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
class
ImportPlugin
:
public
Plugin
{
Q_OBJECT
Q_INTERFACES
(
Plugin
)
Q_INTERFACES
(
CGoGN
::
SCHNApps
::
Plugin
)
public:
ImportPlugin
()
...
...
SCHNApps/Plugins/render/render.cpp
View file @
7a3c137f
...
...
@@ -14,6 +14,12 @@ bool RenderPlugin::enable()
m_flatShader
->
setDiffuse
(
CGoGN
::
Geom
::
Vec4f
(
0.8
f
,
0.9
f
,
0.7
f
,
1.0
f
));
m_flatShader
->
setExplode
(
1.0
f
);
m_phongShader
=
new
CGoGN
::
Utils
::
ShaderPhong
()
;
m_phongShader
->
setAmbiant
(
CGoGN
::
Geom
::
Vec4f
(
0.2
f
,
0.2
f
,
0.2
f
,
0.1
f
))
;
m_phongShader
->
setDiffuse
(
CGoGN
::
Geom
::
Vec4f
(
0.8
f
,
0.9
f
,
0.7
f
,
1.0
f
))
;
m_phongShader
->
setSpecular
(
CGoGN
::
Geom
::
Vec4f
(
0.9
f
,
0.9
f
,
0.9
f
,
1.0
f
))
;
m_phongShader
->
setShininess
(
80.0
f
)
;
m_simpleColorShader
=
new
CGoGN
::
Utils
::
ShaderSimpleColor
();
CGoGN
::
Geom
::
Vec4f
c
(
0.1
f
,
0.1
f
,
0.1
f
,
1.0
f
);
m_simpleColorShader
->
setColor
(
c
);
...
...
@@ -24,6 +30,7 @@ bool RenderPlugin::enable()
connect
(
m_dockTab
->
slider_verticesScaleFactor
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
cb_verticesScaleFactorChanged
(
int
)));
connect
(
m_dockTab
->
check_renderEdges
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
cb_renderEdgesChanged
(
bool
)));
connect
(
m_dockTab
->
check_renderFaces
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
cb_renderFacesChanged
(
bool
)));
connect
(
m_dockTab
->
group_faceShading
,
SIGNAL
(
buttonClicked
(
QAbstractButton
*
)),
this
,
SLOT
(
cb_faceStyleChanged
(
QAbstractButton
*
)));
return
true
;
}
...
...
@@ -31,6 +38,7 @@ bool RenderPlugin::enable()
void
RenderPlugin
::
disable
()
{
delete
m_flatShader
;
delete
m_phongShader
;
delete
m_simpleColorShader
;
delete
m_pointSprite
;
}
...
...
@@ -43,6 +51,7 @@ void RenderPlugin::redraw(View* view)
foreach
(
MapHandlerGen
*
m
,
maps
)
{
CGoGN
::
Utils
::
VBO
*
positionVBO
=
m
->
getVBO
(
"position"
);
CGoGN
::
Utils
::
VBO
*
normalVBO
=
m
->
getVBO
(
"normal"
);
if
(
params
->
renderVertices
)
{
m_pointSprite
->
setSize
(
m
->
getBBdiagSize
()
/
200.0
f
*
params
->
verticesScaleFactor
);
...
...
@@ -63,8 +72,18 @@ void RenderPlugin::redraw(View* view)
glEnable
(
GL_LIGHTING
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
glPolygonOffset
(
1.0
f
,
1.0
f
);
m_flatShader
->
setAttributePosition
(
positionVBO
);
m
->
draw
(
m_flatShader
,
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
);
switch
(
params
->
faceStyle
)
{
case
FLAT
:
m_flatShader
->
setAttributePosition
(
positionVBO
);
m
->
draw
(
m_flatShader
,
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
);
break
;
case
PHONG
:
m_phongShader
->
setAttributePosition
(
positionVBO
)
;
m_phongShader
->
setAttributeNormal
(
normalVBO
)
;
m
->
draw
(
m_phongShader
,
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
);
break
;
}
glDisable
(
GL_POLYGON_OFFSET_FILL
);
}
}
...
...
@@ -73,9 +92,10 @@ void RenderPlugin::redraw(View* view)
void
RenderPlugin
::
viewLinked
(
View
*
view
)
{
assert
(
!
h_viewParams
.
contains
(
view
));
h_viewParams
.
insert
(
view
,
new
TabParams
(
1.0
,
false
,
false
,
true
));
h_viewParams
.
insert
(
view
,
new
TabParams
(
1.0
,
false
,
false
,
true
,
FLAT
));
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_flatShader
);
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_phongShader
);
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_simpleColorShader
);
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_pointSprite
);
}
...
...
@@ -86,6 +106,7 @@ void RenderPlugin::viewUnlinked(View* view)
h_viewParams
.
remove
(
view
);
CGoGN
::
Utils
::
GLSLShader
::
unregisterShader
(
view
,
m_flatShader
);
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_phongShader
);
CGoGN
::
Utils
::
GLSLShader
::
unregisterShader
(
view
,
m_simpleColorShader
);
CGoGN
::
Utils
::
GLSLShader
::
unregisterShader
(
view
,
m_pointSprite
);
}
...
...
@@ -97,6 +118,8 @@ void RenderPlugin::currentViewChanged(View* view)
m_dockTab
->
slider_verticesScaleFactor
->
setSliderPosition
(
params
->
verticesScaleFactor
*
50.0
);
m_dockTab
->
check_renderEdges
->
setChecked
(
params
->
renderEdges
);
m_dockTab
->
check_renderFaces
->
setChecked
(
params
->
renderFaces
);
m_dockTab
->
radio_flatShading
->
setChecked
(
params
->
faceStyle
==
FLAT
);
m_dockTab
->
radio_phongShading
->
setChecked
(
params
->
faceStyle
==
PHONG
);
}
void
RenderPlugin
::
cb_renderVerticesChanged
(
bool
b
)
...
...
@@ -139,6 +162,19 @@ void RenderPlugin::cb_renderFacesChanged(bool b)
current
->
updateGL
();
}
void
RenderPlugin
::
cb_faceStyleChanged
(
QAbstractButton
*
b
)
{
View
*
current
=
m_window
->
getCurrentView
();
assert
(
isLinkedToView
(
current
));
TabParams
*
params
=
h_viewParams
[
current
];
if
(
m_dockTab
->
radio_flatShading
->
isChecked
())
params
->
faceStyle
=
FLAT
;
else
if
(
m_dockTab
->
radio_phongShading
->
isChecked
())
params
->
faceStyle
=
PHONG
;
current
->
updateGL
();
}
/**
* If we want to compile this plugin in debug mode,
* we also define a DEBUG macro at the compilation
...
...
SCHNApps/Plugins/render/render.h
View file @
7a3c137f
...
...
@@ -9,10 +9,15 @@
#include "Topology/map/embeddedMap2.h"
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderPhong.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/pointSprite.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
class
RenderDockTab
:
public
QWidget
,
public
Ui
::
RenderWidget
{
public:
...
...
@@ -20,26 +25,34 @@ public:
};
enum
FaceShadingStyle
{
FLAT
=
0
,
PHONG
=
1
};
struct
TabParams
{
TabParams
(
float
vsf
,
bool
rv
,
bool
re
,
bool
rf
)
:
TabParams
(
float
vsf
,
bool
rv
,
bool
re
,
bool
rf
,
FaceShadingStyle
fstyle
)
:
verticesScaleFactor
(
vsf
),
renderVertices
(
rv
),
renderEdges
(
re
),
renderFaces
(
rf
)
renderFaces
(
rf
),
faceStyle
(
fstyle
)
{}
float
verticesScaleFactor
;
bool
renderVertices
;
bool
renderEdges
;
bool
renderFaces
;
FaceShadingStyle
faceStyle
;
};
class
RenderPlugin
:
public
Plugin
{
Q_OBJECT
Q_INTERFACES
(
Plugin
)
Q_INTERFACES
(
CGoGN
::
SCHNApps
::
Plugin
)
public:
RenderPlugin
()
...
...
@@ -71,14 +84,16 @@ protected:
QHash
<
View
*
,
TabParams
*>
h_viewParams
;
CGoGN
::
Utils
::
ShaderFlat
*
m_flatShader
;
CGoGN
::
Utils
::
ShaderSimpleColor
*
m_simpleColorShader
;
CGoGN
::
Utils
::
PointSprite
*
m_pointSprite
;
CGoGN
::
Utils
::
ShaderPhong
*
m_phongShader
;
CGoGN
::
Utils
::
ShaderSimpleColor
*
m_simpleColorShader
;
CGoGN
::
Utils
::
PointSprite
*
m_pointSprite
;
public
slots
:
void
cb_renderVerticesChanged
(
bool
b
);
void
cb_verticesScaleFactorChanged
(
int
i
);
void
cb_renderEdgesChanged
(
bool
b
);
void
cb_renderFacesChanged
(
bool
b
);
void
cb_faceStyleChanged
(
QAbstractButton
*
b
);
};
#endif
SCHNApps/Plugins/render/render.ui
View file @
7a3c137f
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
17
7
</width>
<height>
293
</height>
<width>
17
4
</width>
<height>
397
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -48,6 +48,33 @@
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QRadioButton"
name=
"radio_flatShading"
>
<property
name=
"text"
>
<string>
Flat
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
<attribute
name=
"buttonGroup"
>
<string
notr=
"true"
>
group_faceShading
</string>
</attribute>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"radio_phongShading"
>
<property
name=
"text"
>
<string>
Phong
</string>
</property>
<attribute
name=
"buttonGroup"
>
<string
notr=
"true"
>
group_faceShading
</string>
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
...
...
@@ -65,4 +92,7 @@
</widget>
<resources/>
<connections/>
<buttongroups>
<buttongroup
name=
"group_faceShading"
/>
</buttongroups>
</ui>
SCHNApps/Release/CMakeLists.txt
View file @
7a3c137f
...
...
@@ -29,24 +29,24 @@ file(
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/camerasDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
camerasDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
pluginsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
mapsDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
dialogs/
mapsViewDialog.cpp
)
SET
(
SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/camerasDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
camerasDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
pluginsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
mapsDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/
dialogs/
mapsViewDialog.h
)
file
(
...
...
SCHNApps/include/camera.h
View file @
7a3c137f
...
...
@@ -4,6 +4,12 @@
#include "view.h"
#include "QGLViewer/camera.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
Camera
:
public
qglviewer
::
Camera
...
...
@@ -82,4 +88,8 @@ protected:
int
m_snapCount
;
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/cameraViewDialog.h
→
SCHNApps/include/
dialogs/
cameraViewDialog.h
View file @
7a3c137f
...
...
@@ -3,6 +3,12 @@
#include "ui_cameraViewDialog.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
Camera
;
class
View
;
...
...
@@ -27,4 +33,8 @@ public slots:
void
cb_removeCameraFromList
(
Camera
*
c
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/camerasDialog.h
→
SCHNApps/include/
dialogs/
camerasDialog.h
View file @
7a3c137f
...
...
@@ -3,6 +3,12 @@
#include "ui_camerasDialog.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
Camera
;
...
...
@@ -24,4 +30,8 @@ public slots:
void
cb_removeCameraFromList
(
Camera
*
c
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/mapsDialog.h
→
SCHNApps/include/
dialogs/
mapsDialog.h
View file @
7a3c137f
...
...
@@ -3,6 +3,12 @@
#include "ui_mapsDialog.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
MapHandlerGen
;
...
...
@@ -24,4 +30,8 @@ public slots:
void
cb_removeMapFromList
(
MapHandlerGen
*
m
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/mapsViewDialog.h
→
SCHNApps/include/
dialogs/
mapsViewDialog.h
View file @
7a3c137f
...
...
@@ -3,6 +3,12 @@
#include "ui_mapsViewDialog.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
View
;
class
MapHandlerGen
;
...
...
@@ -25,4 +31,8 @@ public slots:
void
cb_removeMapFromList
(
MapHandlerGen
*
m
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/pluginsDialog.h
→
SCHNApps/include/
dialogs/
pluginsDialog.h
View file @
7a3c137f
...
...
@@ -5,6 +5,14 @@
#include "types.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
struct
PluginInfo
{
PluginInfo
(
const
QString
&
path
,
const
QString
&
name
)
:
...
...
@@ -56,4 +64,8 @@ protected slots:
// void showPluginInfo();
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/pluginsViewDialog.h
→
SCHNApps/include/
dialogs/
pluginsViewDialog.h
View file @
7a3c137f
...
...
@@ -3,6 +3,12 @@
#include "ui_pluginsViewDialog.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
View
;
class
Plugin
;
...
...
@@ -25,4 +31,8 @@ public slots:
void
cb_removePluginFromList
(
Plugin
*
p
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/include/mapHandler.h
View file @
7a3c137f
...
...
@@ -11,10 +11,16 @@
#include "Utils/vbo.h"
#include "Algo/Render/GL2/mapRender.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
MapHandlerGen
{
public:
MapHandlerGen
(
const
QString
&
name
,
Window
*
window
,
CGoGN
::
GenericMap
*
map
);
MapHandlerGen
(
const
QString
&
name
,
Window
*
window
,
GenericMap
*
map
);
virtual
~
MapHandlerGen
();
const
QString
&
getName
()
const
{
return
m_name
;
}
...
...
@@ -23,7 +29,7 @@ public:
Window
*
getWindow
()
const
{
return
m_window
;
}
void
setWindow
(
Window
*
w
)
{
m_window
=
w
;
}
CGoGN
::
GenericMap
*
getGenericMap
()
{
return
m_map
;
}
GenericMap
*
getGenericMap
()
{
return
m_map
;
}
const
qglviewer
::
Vec
&
getBBmin
()
const
{
return
m_bbMin
;
}
void
setBBmin
(
qglviewer
::
Vec
&
v
)
{
m_bbMin
=
v
;
}
...
...
@@ -35,13 +41,13 @@ public:
bool
isUsed
()
const
{
return
!
l_views
.
empty
();
}
void
draw
(
CGoGN
::
Utils
::
GLSLShader
*
shader
,
int
primitive
);
void
draw
(
Utils
::
GLSLShader
*
shader
,
int
primitive
);
/*********************************************************
* MANAGE VBOs
*********************************************************/