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
27d50543
Commit
27d50543
authored
Dec 06, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: la ca commence a etre pas mal..
parent
05d5b401
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
581 additions
and
396 deletions
+581
-396
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+1
-1
SCHNApps/Plugins/demo/demo.cpp
SCHNApps/Plugins/demo/demo.cpp
+0
-52
SCHNApps/Plugins/import/import.cpp
SCHNApps/Plugins/import/import.cpp
+11
-4
SCHNApps/Plugins/import/import.h
SCHNApps/Plugins/import/import.h
+4
-33
SCHNApps/Plugins/render/CMakeLists.txt
SCHNApps/Plugins/render/CMakeLists.txt
+11
-11
SCHNApps/Plugins/render/render.cpp
SCHNApps/Plugins/render/render.cpp
+154
-0
SCHNApps/Plugins/render/render.h
SCHNApps/Plugins/render/render.h
+84
-0
SCHNApps/Plugins/render/render.ui
SCHNApps/Plugins/render/render.ui
+24
-4
SCHNApps/forms/window.ui
SCHNApps/forms/window.ui
+13
-10
SCHNApps/include/camera.h
SCHNApps/include/camera.h
+15
-14
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+11
-20
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+7
-6
SCHNApps/include/system.h
SCHNApps/include/system.h
+2
-2
SCHNApps/include/view.h
SCHNApps/include/view.h
+14
-15
SCHNApps/include/window.h
SCHNApps/include/window.h
+40
-33
SCHNApps/src/camera.cpp
SCHNApps/src/camera.cpp
+1
-6
SCHNApps/src/cameraViewDialog.cpp
SCHNApps/src/cameraViewDialog.cpp
+1
-1
SCHNApps/src/main.cpp
SCHNApps/src/main.cpp
+7
-12
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+8
-57
SCHNApps/src/pluginDialog.cpp
SCHNApps/src/pluginDialog.cpp
+3
-2
SCHNApps/src/system.cpp
SCHNApps/src/system.cpp
+0
-2
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+38
-19
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+126
-91
src/Utils/GLSLShader.cpp
src/Utils/GLSLShader.cpp
+6
-1
No files found.
SCHNApps/Plugins/CMakeLists.txt
View file @
27d50543
cmake_minimum_required
(
VERSION 2.8
)
ADD_SUBDIRECTORY
(
import
)
ADD_SUBDIRECTORY
(
demo
)
ADD_SUBDIRECTORY
(
render
)
SCHNApps/Plugins/demo/demo.cpp
deleted
100644 → 0
View file @
05d5b401
#include "demo.h"
#include "mapHandler.h"
#include "Algo/Import/import.h"
bool
DemoPlugin
::
enable
()
{
addTabInDock
(
new
DemoDockTab
(),
"demoTab"
);
m_flatShader
=
new
CGoGN
::
Utils
::
ShaderFlat
()
;
m_flatShader
->
setAmbiant
(
CGoGN
::
Geom
::
Vec4f
(
0.2
f
,
0.2
f
,
0.2
f
,
0.1
f
))
;
m_flatShader
->
setDiffuse
(
CGoGN
::
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
)
;
return
true
;
}
void
DemoPlugin
::
disable
()
{
delete
m_flatShader
;
}
void
DemoPlugin
::
redraw
(
View
*
view
)
{
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
)
;
glEnable
(
GL_LIGHTING
)
;
QList
<
MapHandlerGen
*>
maps
=
view
->
getLinkedMaps
();
foreach
(
MapHandlerGen
*
m
,
maps
)
{
CGoGN
::
Utils
::
VBO
*
positionVBO
=
m
->
getVBO
(
"position"
);
m_flatShader
->
setAttributePosition
(
positionVBO
);
m
->
draw
(
m_flatShader
,
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
)
;
}
}
/**
* 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
// - the compiled name of the plugin
// - the main class of our plugin
Q_EXPORT_PLUGIN2
(
DemoPlugin
,
DemoPlugin
)
#else
Q_EXPORT_PLUGIN2
(
DemoPluginD
,
DemoPlugin
)
#endif
SCHNApps/Plugins/import/import.cpp
View file @
27d50543
#include "import.h"
#include <QFileDialog>
#include <QFileInfo>
#include "system.h"
#include "mapHandler.h"
#include "Algo/Import/import.h"
bool
ImportPlugin
::
enable
()
...
...
@@ -17,11 +21,14 @@ void ImportPlugin::disable()
void
ImportPlugin
::
cb_import
()
{
QString
fileName
=
QFileDialog
::
getOpenFileName
(
m_window
,
"Import file"
,
m_window
->
getAppPath
(),
"Mesh Files (*.ply *.off)"
);
QFileInfo
fi
(
fileName
);
MAP
*
m
=
new
MAP
();
MapHandler
<
PFP
>*
h
=
new
MapHandler
<
PFP
>
(
"duck"
,
m_window
,
m
);
MapHandler
<
PFP
>*
h
=
new
MapHandler
<
PFP
>
(
fi
.
baseName
()
,
m_window
,
m
);
std
::
vector
<
std
::
string
>
attrNames
;
CGoGN
::
Algo
::
Import
::
importMesh
<
PFP
>
(
*
m
,
"/home/kraemer/Media/Data/surface/lowRes/duck_163.ply"
,
attrNames
);
CGoGN
::
Algo
::
Import
::
importMesh
<
PFP
>
(
*
m
,
fileName
.
toUtf8
().
constData
()
,
attrNames
);
CGoGN
::
VertexAttribute
<
PFP
::
VEC3
>
position
=
m
->
getAttribute
<
PFP
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
...
...
@@ -36,10 +43,10 @@ void ImportPlugin::cb_import()
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
LINES
,
CGoGN
::
allDarts
)
;
h
->
updatePrimitives
(
CGoGN
::
Algo
::
Render
::
GL2
::
TRIANGLES
,
CGoGN
::
allDarts
)
;
m_window
->
addMap
(
h
);
CGoGN
::
Utils
::
VBO
*
positionVBO
=
h
->
getVBO
(
position
.
name
());
positionVBO
->
updateData
(
position
);
m_window
->
addMap
(
h
);
}
/**
...
...
SCHNApps/Plugins/import/import.h
View file @
27d50543
...
...
@@ -18,23 +18,8 @@ typedef PFP::MAP MAP;
typedef
PFP
::
VEC3
VEC3
;
/**
* This class is a basic minimal plugin.
* All the methods in this class are overloaded methods.
* In order to create a valid plugin, all the method in this
* needs to be declared (they are actually overloaded methods
* from VisualPlugin), even if your plugin doesn't make any
* drawing.
*/
/**
* Our plugin must inherit from Plugin
*/
class
ImportPlugin
:
public
Plugin
{
/**
* Essential Qt macros.
*/
Q_OBJECT
Q_INTERFACES
(
Plugin
)
...
...
@@ -47,22 +32,8 @@ public:
~
ImportPlugin
()
{}
/**
* 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
enable
();
/**
* The plugin's disable method
* Each time the main application will unload the plugin
* it will call this method.
*/
void
disable
();
virtual
bool
enable
();
virtual
void
disable
();
virtual
void
redraw
(
View
*
view
)
{}
...
...
@@ -70,12 +41,12 @@ public:
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
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
currentViewChanged
(
View
*
view
)
{}
public
slots
:
void
cb_import
();
...
...
@@ -84,4 +55,4 @@ private:
QAction
*
importAction
;
};
#endif
// _FIRSTPLUGIN_H_
#endif
SCHNApps/Plugins/
demo
/CMakeLists.txt
→
SCHNApps/Plugins/
render
/CMakeLists.txt
View file @
27d50543
...
...
@@ -2,20 +2,20 @@ cmake_minimum_required(VERSION 2.8)
INCLUDE_DIRECTORIES
(
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/Plugins/
demo
${
SCHNApps_ROOT_DIR
}
/Plugins/
render
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
PLUGIN_SRC
${
SCHNApps_ROOT_DIR
}
/Plugins/
demo/demo
.cpp
${
SCHNApps_ROOT_DIR
}
/Plugins/
render/render
.cpp
)
SET
(
PLUGIN_H
${
SCHNApps_ROOT_DIR
}
/Plugins/
demo/demo
.h
${
SCHNApps_ROOT_DIR
}
/Plugins/
render/render
.h
)
SET
(
PLUGIN_FORM
${
SCHNApps_ROOT_DIR
}
/Plugins/
demo/demo
.ui
${
SCHNApps_ROOT_DIR
}
/Plugins/
render/render
.ui
)
IF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
...
...
@@ -31,21 +31,21 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
QT4_WRAP_UI
(
PLUGIN_UI
${
PLUGIN_FORM
}
)
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
Demo
PluginD SHARED
ADD_LIBRARY
(
Render
PluginD SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
Demo
PluginD
TARGET_LINK_LIBRARIES
(
Render
PluginD
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
)
ADD_DEPENDENCIES
(
Demo
PluginD SCHNAppsD
)
ADD_DEPENDENCIES
(
Render
PluginD SCHNAppsD
)
SET_TARGET_PROPERTIES
(
Demo
PluginD PROPERTIES COMPILE_DEFINITIONS
"DEBUG"
)
SET_TARGET_PROPERTIES
(
Render
PluginD PROPERTIES COMPILE_DEFINITIONS
"DEBUG"
)
ELSE
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
...
...
@@ -58,18 +58,18 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
QT4_WRAP_UI
(
PLUGIN_UI
${
PLUGIN_FORM
}
)
QT4_WRAP_CPP
(
PLUGIN_MOC
${
PLUGIN_H
}
)
ADD_LIBRARY
(
Demo
Plugin SHARED
ADD_LIBRARY
(
Render
Plugin SHARED
${
PLUGIN_SRC
}
${
PLUGIN_UI
}
${
PLUGIN_MOC
}
)
TARGET_LINK_LIBRARIES
(
Demo
Plugin
TARGET_LINK_LIBRARIES
(
Render
Plugin
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
)
ADD_DEPENDENCIES
(
Demo
Plugin SCHNApps
)
ADD_DEPENDENCIES
(
Render
Plugin SCHNApps
)
ENDIF
(
${
CMAKE_BUILD_TYPE
}
STREQUAL Debug
)
SCHNApps/Plugins/render/render.cpp
0 → 100644
View file @
27d50543
#include "render.h"
#include "mapHandler.h"
#include "Algo/Import/import.h"
bool
RenderPlugin
::
enable
()
{
m_dockTab
=
new
RenderDockTab
();
addTabInDock
(
m_dockTab
,
"Render"
);
m_flatShader
=
new
CGoGN
::
Utils
::
ShaderFlat
();
m_flatShader
->
setAmbiant
(
CGoGN
::
Geom
::
Vec4f
(
0.2
f
,
0.2
f
,
0.2
f
,
0.1
f
));
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_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
);
m_pointSprite
=
new
CGoGN
::
Utils
::
PointSprite
();
connect
(
m_dockTab
->
check_renderVertices
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
cb_renderVerticesChanged
(
bool
)));
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
)));
return
true
;
}
void
RenderPlugin
::
disable
()
{
delete
m_flatShader
;
delete
m_simpleColorShader
;
delete
m_pointSprite
;
}
void
RenderPlugin
::
redraw
(
View
*
view
)
{
TabParams
*
params
=
h_viewParams
[
view
];
const
QList
<
MapHandlerGen
*>&
maps
=
view
->
getLinkedMaps
();
foreach
(
MapHandlerGen
*
m
,
maps
)
{
CGoGN
::
Utils
::
VBO
*
positionVBO
=
m
->
getVBO
(
"position"
);
if
(
params
->
renderVertices
)
{
m_pointSprite
->
setSize
(
m
->
getBBdiagSize
()
/
100.0
f
*
params
->
verticesScaleFactor
);
m_pointSprite
->
setAttributePosition
(
positionVBO
);
m_pointSprite
->
predraw
(
CGoGN
::
Geom
::
Vec3f
(
0.0
f
,
0.0
f
,
1.0
f
));
m
->
draw
(
m_pointSprite
,
CGoGN
::
Algo
::
Render
::
GL2
::
POINTS
);
m_pointSprite
->
postdraw
();
}
if
(
params
->
renderEdges
)
{
glLineWidth
(
1.0
f
);
m_simpleColorShader
->
setAttributePosition
(
positionVBO
);
m
->
draw
(
m_simpleColorShader
,
CGoGN
::
Algo
::
Render
::
GL2
::
LINES
);
}
if
(
params
->
renderFaces
)
{
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
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
);
glDisable
(
GL_POLYGON_OFFSET_FILL
);
}
}
}
void
RenderPlugin
::
viewLinked
(
View
*
view
)
{
assert
(
!
h_viewParams
.
contains
(
view
));
h_viewParams
.
insert
(
view
,
new
TabParams
(
1.0
,
false
,
false
,
true
));
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_flatShader
);
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_simpleColorShader
);
CGoGN
::
Utils
::
GLSLShader
::
registerShader
(
view
,
m_pointSprite
);
}
void
RenderPlugin
::
viewUnlinked
(
View
*
view
)
{
assert
(
h_viewParams
.
contains
(
view
));
h_viewParams
.
remove
(
view
);
CGoGN
::
Utils
::
GLSLShader
::
unregisterShader
(
view
,
m_flatShader
);
CGoGN
::
Utils
::
GLSLShader
::
unregisterShader
(
view
,
m_simpleColorShader
);
CGoGN
::
Utils
::
GLSLShader
::
unregisterShader
(
view
,
m_pointSprite
);
}
void
RenderPlugin
::
currentViewChanged
(
View
*
view
)
{
TabParams
*
params
=
h_viewParams
[
view
];
m_dockTab
->
check_renderVertices
->
setChecked
(
params
->
renderVertices
);
m_dockTab
->
slider_verticesScaleFactor
->
setSliderPosition
(
params
->
verticesScaleFactor
*
50.0
);
m_dockTab
->
check_renderEdges
->
setChecked
(
params
->
renderEdges
);
m_dockTab
->
check_renderFaces
->
setChecked
(
params
->
renderFaces
);
}
void
RenderPlugin
::
cb_renderVerticesChanged
(
bool
b
)
{
View
*
current
=
m_window
->
getCurrentView
();
assert
(
isLinkedToView
(
current
));
TabParams
*
params
=
h_viewParams
[
current
];
params
->
renderVertices
=
b
;
current
->
updateGL
();
}
void
RenderPlugin
::
cb_verticesScaleFactorChanged
(
int
i
)
{
View
*
current
=
m_window
->
getCurrentView
();
assert
(
isLinkedToView
(
current
));
TabParams
*
params
=
h_viewParams
[
current
];
params
->
verticesScaleFactor
=
i
/
50.0
;
current
->
updateGL
();
}
void
RenderPlugin
::
cb_renderEdgesChanged
(
bool
b
)
{
View
*
current
=
m_window
->
getCurrentView
();
assert
(
isLinkedToView
(
current
));
TabParams
*
params
=
h_viewParams
[
current
];
params
->
renderEdges
=
b
;
current
->
updateGL
();
}
void
RenderPlugin
::
cb_renderFacesChanged
(
bool
b
)
{
View
*
current
=
m_window
->
getCurrentView
();
assert
(
isLinkedToView
(
current
));
TabParams
*
params
=
h_viewParams
[
current
];
params
->
renderFaces
=
b
;
current
->
updateGL
();
}
/**
* 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
// - the compiled name of the plugin
// - the main class of our plugin
Q_EXPORT_PLUGIN2
(
RenderPlugin
,
RenderPlugin
)
#else
Q_EXPORT_PLUGIN2
(
RenderPluginD
,
RenderPlugin
)
#endif
SCHNApps/Plugins/
demo/demo
.h
→
SCHNApps/Plugins/
render/render
.h
View file @
27d50543
#ifndef _
DEMO
_PLUGIN_H_
#define _
DEMO
_PLUGIN_H_
#ifndef _
RENDER
_PLUGIN_H_
#define _
RENDER
_PLUGIN_H_
#include "plugin.h"
#include "ui_
demo
.h"
#include "ui_
render
.h"
#include "Topology/generic/functor.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/pointSprite.h"
struct
PFP
:
public
CGoGN
::
PFP_STANDARD
{
// definition of the map
typedef
CGoGN
::
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
class
DemoDockTab
:
public
QWidget
,
public
Ui
::
DemoWidget
class
RenderDockTab
:
public
QWidget
,
public
Ui
::
RenderWidget
{
public:
Demo
DockTab
()
{
setupUi
(
this
);
}
Render
DockTab
()
{
setupUi
(
this
);
}
};
struct
TabParams
{
bool
b_showVertices
;
bool
b_showEdges
;
};
TabParams
(
float
vsf
,
bool
rv
,
bool
re
,
bool
rf
)
:
verticesScaleFactor
(
vsf
),
renderVertices
(
rv
),
renderEdges
(
re
),
renderFaces
(
rf
)
{}
float
verticesScaleFactor
;
bool
renderVertices
;
bool
renderEdges
;
bool
renderFaces
;
};
/**
* This class is a basic minimal plugin.
* All the methods in this class are overloaded methods.
* In order to create a valid plugin, all the method in this
* needs to be declared (they are actually overloaded methods
* from VisualPlugin), even if your plugin doesn't make any
* drawing.
*/
/**
* Our plugin must inherit from Plugin
*/
class
DemoPlugin
:
public
Plugin
class
RenderPlugin
:
public
Plugin
{
/**
* Essential Qt macros.
*/
Q_OBJECT
Q_INTERFACES
(
Plugin
)
public:
Demo
Plugin
()
Render
Plugin
()
{
setProvidesRendering
(
true
);
}
~
Demo
Plugin
()
~
Render
Plugin
()
{}
/**
* 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
enable
();
/**
* The plugin's disable method
* Each time the main application will unload the plugin
* it will call this method.
*/
void
disable
();
virtual
bool
enable
();
virtual
void
disable
();
virtual
void
redraw
(
View
*
view
);
...
...
@@ -87,15 +59,26 @@ public:
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
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
viewLinked
(
View
*
view
);
virtual
void
viewUnlinked
(
View
*
view
);
virtual
void
currentViewChanged
(
View
*
view
);
protected:
CGoGN
::
Utils
::
ShaderFlat
*
m_flatShader
;
RenderDockTab
*
m_dockTab
;
QHash
<
View
*
,
TabParams
*>
h_viewParams
;
CGoGN
::
Utils
::
ShaderFlat
*
m_flatShader
;
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
);
};
#endif
// _FIRSTPLUGIN_H_
#endif
SCHNApps/Plugins/
demo/demo
.ui
→
SCHNApps/Plugins/
render/render
.ui
View file @
27d50543
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
Demo
Widget
</class>
<widget
class=
"QWidget"
name=
"
Demo
Widget"
>
<class>
Render
Widget
</class>
<widget
class=
"QWidget"
name=
"
Render
Widget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
177
</width>
<height>
2
11
</height>
<height>
2
93
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -21,6 +21,16 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"slider_verticesScaleFactor"
>
<property
name=
"value"
>
<number>
50
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderEdges"
>
<property
name=
"text"
>
...
...
@@ -28,6 +38,16 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderFaces"
>
<property
name=
"text"
>
<string>
render faces
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
...
...
@@ -36,7 +56,7 @@
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
156
</width>
<height>
1
3
6
</height>
<height>
16
1
</height>
</size>
</property>
</spacer>
...
...
SCHNApps/forms/window.ui
View file @
27d50543
...
...
@@ -56,9 +56,9 @@
<attribute
name=
"toolBarBreak"
>
<bool>
false
</bool>
</attribute>
<addaction
name=
"actionManageViews"
/>
<addaction
name=
"actionManageCameras"
/>
<addaction
name=
"actionManagePlugins"
/>
<addaction
name=
"actionManageMaps"
/>
</widget>
<action
name=
"actionAboutCGoGN"
>
<property
name=
"text"
>
...
...
@@ -84,15 +84,6 @@
<string>
Manage plugins
</string>
</property>
</action>
<action
name=
"actionManageViews"
>
<property
name=
"icon"
>
<iconset
resource=
"../resources/resources.qrc"
>
<normaloff>
:/icons/icons/add_view.png
</normaloff>
:/icons/icons/add_view.png
</iconset>
</property>
<property
name=
"text"
>
<string>
Add view