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
c165b337
Commit
c165b337
authored
Mar 19, 2015
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import images & render colors
parent
efc630d4
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
449 additions
and
245 deletions
+449
-245
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+2
-0
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
...s/Plugins/surface_deformation/src/surface_deformation.cpp
+20
-20
SCHNApps/Plugins/surface_import/include/surface_import.h
SCHNApps/Plugins/surface_import/include/surface_import.h
+7
-4
SCHNApps/Plugins/surface_import/src/surface_import.cpp
SCHNApps/Plugins/surface_import/src/surface_import.cpp
+74
-8
SCHNApps/Plugins/surface_render/forms/surface_render.ui
SCHNApps/Plugins/surface_render/forms/surface_render.ui
+180
-119
SCHNApps/Plugins/surface_render/include/surface_render.h
SCHNApps/Plugins/surface_render/include/surface_render.h
+9
-2
SCHNApps/Plugins/surface_render/include/surface_render_dockTab.h
...s/Plugins/surface_render/include/surface_render_dockTab.h
+6
-3
SCHNApps/Plugins/surface_render/src/surface_render.cpp
SCHNApps/Plugins/surface_render/src/surface_render.cpp
+40
-10
SCHNApps/Plugins/surface_render/src/surface_render_dockTab.cpp
...pps/Plugins/surface_render/src/surface_render_dockTab.cpp
+110
-74
SCHNApps/Plugins/surface_renderVector/src/surface_renderVector.cpp
...Plugins/surface_renderVector/src/surface_renderVector.cpp
+1
-5
No files found.
SCHNApps/Plugins/CMakeLists.txt
View file @
c165b337
...
...
@@ -28,6 +28,8 @@ ADD_SUBDIRECTORY(surface_modelisation)
ADD_SUBDIRECTORY
(
surface_distance
)
ADD_SUBDIRECTORY
(
surface_radiance
)
ADD_SUBDIRECTORY
(
cage2D_deformation
)
ADD_SUBDIRECTORY
(
volume_import
)
#ADD_SUBDIRECTORY(volume_render)
...
...
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
View file @
c165b337
...
...
@@ -380,16 +380,16 @@ void Surface_Deformation_Plugin::toggleMapDeformation(MapHandlerGen* map)
if
(
map
)
{
MapParameters
&
p
=
h_parameterSet
[
map
];
if
(
!
p
.
initialized
)
if
(
!
p
.
initialized
)
{
p
.
start
(
map
);
if
(
p
.
initialized
&&
map
->
isSelectedMap
())
if
(
p
.
initialized
&&
map
->
isSelectedMap
())
m_dockTab
->
mapParametersInitialized
(
true
);
}
else
{
p
.
stop
(
map
);
if
(
!
p
.
initialized
&&
map
->
isSelectedMap
())
if
(
!
p
.
initialized
&&
map
->
isSelectedMap
())
m_dockTab
->
mapParametersInitialized
(
false
);
}
}
...
...
@@ -401,9 +401,9 @@ void Surface_Deformation_Plugin::matchDiffCoord(MapHandlerGen* mh)
MapParameters
&
p
=
h_parameterSet
[
mh
];
nlMakeCurrent
(
p
.
nlContext
);
if
(
nlGetCurrentState
()
==
NL_STATE_INITIAL
)
if
(
nlGetCurrentState
()
==
NL_STATE_INITIAL
)
nlBegin
(
NL_SYSTEM
)
;
for
(
int
coord
=
0
;
coord
<
3
;
++
coord
)
for
(
int
coord
=
0
;
coord
<
3
;
++
coord
)
{
LinearSolving
::
setupVariables
<
PFP2
>
(
*
map
,
p
.
vIndex
,
p
.
freeSelector
->
getMarker
(),
p
.
positionAttribute
,
coord
);
nlBegin
(
NL_MATRIX
);
...
...
@@ -421,13 +421,13 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
PFP2
::
MAP
*
map
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
getMap
();
MapParameters
&
p
=
h_parameterSet
[
mh
];
if
(
p
.
initialized
)
if
(
p
.
initialized
)
{
CellMarkerNoUnmark
<
PFP2
::
MAP
,
VERTEX
>
m
(
*
map
)
;
for
(
Dart
d
=
map
->
begin
();
d
!=
map
->
end
();
map
->
next
(
d
))
for
(
Dart
d
=
map
->
begin
();
d
!=
map
->
end
();
map
->
next
(
d
))
{
if
(
!
m
.
isMarked
(
d
))
if
(
!
m
.
isMarked
(
d
))
{
m
.
mark
(
d
)
;
...
...
@@ -441,11 +441,11 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
Dart
neigh
=
map
->
phi1
(
it
)
;
PFP2
::
VEC3
v
=
p
.
positionAttribute
[
neigh
]
-
pp
;
PFP2
::
VEC3
vv
=
p
.
positionInit
[
neigh
]
-
ppInit
;
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
for
(
unsigned
int
j
=
0
;
j
<
3
;
++
j
)
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
for
(
unsigned
int
j
=
0
;
j
<
3
;
++
j
)
cov
(
i
,
j
)
+=
v
[
i
]
*
vv
[
j
];
// * perMap->edgeWeight[it] / area ;
Dart
dboundary
=
map
->
phi_1
(
it
)
;
if
(
map
->
phi2
(
dboundary
)
==
dboundary
)
if
(
map
->
phi2
(
dboundary
)
==
dboundary
)
{
v
=
p
.
positionAttribute
[
dboundary
]
-
pp
;
vv
=
p
.
positionInit
[
dboundary
]
-
pp
;
...
...
@@ -454,15 +454,15 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
cov
(
i
,
j
)
+=
v
[
i
]
*
vv
[
j
];
// * perMap->edgeWeight[dboundary] / area ;
}
it
=
map
->
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
while
(
it
!=
d
)
;
Eigen
::
JacobiSVD
<
Eigen
::
Matrix3f
>
svd
(
cov
,
Eigen
::
ComputeFullU
|
Eigen
::
ComputeFullV
)
;
Eigen
::
Matrix3f
R
=
svd
.
matrixU
()
*
svd
.
matrixV
().
transpose
()
;
if
(
R
.
determinant
()
<
0
)
if
(
R
.
determinant
()
<
0
)
{
Eigen
::
Matrix3f
U
=
svd
.
matrixU
()
;
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
U
(
i
,
2
)
*=
-
1
;
R
=
U
*
svd
.
matrixV
().
transpose
()
;
}
...
...
@@ -471,9 +471,9 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
}
}
for
(
Dart
d
=
map
->
begin
();
d
!=
map
->
end
();
map
->
next
(
d
))
for
(
Dart
d
=
map
->
begin
();
d
!=
map
->
end
();
map
->
next
(
d
))
{
if
(
m
.
isMarked
(
d
))
if
(
m
.
isMarked
(
d
))
{
m
.
unmark
(
d
)
;
...
...
@@ -491,7 +491,7 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
++
degree
;
}
it
=
map
->
alpha1
(
it
)
;
}
while
(
it
!=
d
)
;
}
while
(
it
!=
d
)
;
r
+=
p
.
vertexRotationMatrix
[
d
]
;
r
/=
degree
+
1
;
PFP2
::
VEC3
&
dc
=
p
.
diffCoord
[
d
]
;
...
...
@@ -531,9 +531,9 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
}
nlMakeCurrent
(
p
.
nlContext
);
if
(
nlGetCurrentState
()
==
NL_STATE_INITIAL
)
if
(
nlGetCurrentState
()
==
NL_STATE_INITIAL
)
nlBegin
(
NL_SYSTEM
);
for
(
int
coord
=
0
;
coord
<
3
;
++
coord
)
for
(
int
coord
=
0
;
coord
<
3
;
++
coord
)
{
LinearSolving
::
setupVariables
<
PFP2
>
(
*
map
,
p
.
vIndex
,
p
.
freeSelector
->
getMarker
(),
p
.
positionAttribute
,
coord
);
nlBegin
(
NL_MATRIX
);
...
...
SCHNApps/Plugins/surface_import/include/surface_import.h
View file @
c165b337
...
...
@@ -29,11 +29,15 @@ private:
virtual
void
disable
()
{}
public
slots
:
MapHandlerGen
*
importFromFile
(
const
QString
&
fileName
);
void
importFromFileDialog
();
MapHandlerGen
*
importMeshFromFile
(
const
QString
&
fileName
);
void
importMeshFromFileDialog
();
MapHandlerGen
*
importImageFromFile
(
const
QString
&
fileName
);
void
importImageFromFileDialog
();
private:
QAction
*
importAction
;
QAction
*
importMeshAction
;
QAction
*
importImageAction
;
};
}
// namespace SCHNApps
...
...
@@ -41,4 +45,3 @@ private:
}
// namespace CGoGN
#endif
SCHNApps/Plugins/surface_import/src/surface_import.cpp
View file @
c165b337
...
...
@@ -4,6 +4,7 @@
#include "mapHandler.h"
#include "Algo/Import/import.h"
#include "Algo/Tiling/Surface/square.h"
#include <QFileDialog>
#include <QFileInfo>
...
...
@@ -19,13 +20,18 @@ bool Surface_Import_Plugin::enable()
// magic line that init static variables of GenericMap in the plugins
GenericMap
::
copyAllStatics
(
m_schnapps
->
getStaticPointers
());
importAction
=
new
QAction
(
"import"
,
this
);
m_schnapps
->
addMenuAction
(
this
,
"Surface;Import"
,
importAction
);
connect
(
importAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
importFromFileDialog
()));
importMeshAction
=
new
QAction
(
"import mesh"
,
this
);
m_schnapps
->
addMenuAction
(
this
,
"Surface;Import Mesh"
,
importMeshAction
);
connect
(
importMeshAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
importMeshFromFileDialog
()));
importImageAction
=
new
QAction
(
"import image"
,
this
);
m_schnapps
->
addMenuAction
(
this
,
"Surface;Import Image"
,
importImageAction
);
connect
(
importImageAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
importImageFromFileDialog
()));
return
true
;
}
MapHandlerGen
*
Surface_Import_Plugin
::
importFromFile
(
const
QString
&
fileName
)
MapHandlerGen
*
Surface_Import_Plugin
::
import
Mesh
FromFile
(
const
QString
&
fileName
)
{
QFileInfo
fi
(
fileName
);
if
(
fi
.
exists
())
...
...
@@ -58,12 +64,72 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
return
NULL
;
}
void
Surface_Import_Plugin
::
importFromFileDialog
()
void
Surface_Import_Plugin
::
importMeshFromFileDialog
()
{
QStringList
fileNames
=
QFileDialog
::
getOpenFileNames
(
m_schnapps
,
"Import surface meshes"
,
m_schnapps
->
getAppPath
(),
"Surface mesh Files (*.ply *.off *.trian)"
);
QStringList
::
Iterator
it
=
fileNames
.
begin
();
while
(
it
!=
fileNames
.
end
())
{
importMeshFromFile
(
*
it
);
++
it
;
}
}
MapHandlerGen
*
Surface_Import_Plugin
::
importImageFromFile
(
const
QString
&
fileName
)
{
QFileInfo
fi
(
fileName
);
if
(
fi
.
exists
())
{
MapHandlerGen
*
mhg
=
m_schnapps
->
addMap
(
fi
.
baseName
(),
2
);
if
(
mhg
)
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
PFP2
::
MAP
*
map
=
mh
->
getMap
();
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
position
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
,
PFP2
::
MAP
>
(
"position"
);
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>
color
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
,
PFP2
::
MAP
>
(
"color"
);
QImage
image
;
QString
extension
=
fi
.
suffix
();
extension
.
toUpper
();
if
(
!
image
.
load
(
fileName
,
extension
.
toUtf8
().
constData
()))
{
CGoGNout
<<
"Image ["
<<
fileName
.
toStdString
()
<<
"] has not been loaded correctly"
<<
CGoGNendl
;
return
NULL
;
}
int
imageX
=
image
.
width
();
int
imageY
=
image
.
height
();
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP2
>
grid
(
*
map
,
imageX
-
1
,
imageY
-
1
);
grid
.
embedIntoGrid
(
position
,
imageX
-
1
,
imageY
-
1
);
const
std
::
vector
<
Dart
>&
vDarts
=
grid
.
getVertexDarts
();
QRgb
pixel
;
for
(
int
i
=
0
;
i
<
imageX
;
++
i
)
{
for
(
int
j
=
0
;
j
<
imageY
;
++
j
)
{
pixel
=
image
.
pixel
(
i
,
(
imageY
-
j
)
-
1
);
color
[
vDarts
[
j
*
imageX
+
i
]]
=
PFP2
::
VEC3
(
qRed
(
pixel
)
/
255.
f
,
qGreen
(
pixel
)
/
255.
f
,
qBlue
(
pixel
)
/
255.
f
);
}
}
mh
->
registerAttribute
(
position
);
mh
->
registerAttribute
(
color
);
}
return
mhg
;
}
else
return
NULL
;
}
void
Surface_Import_Plugin
::
importImageFromFileDialog
()
{
QStringList
fileNames
=
QFileDialog
::
getOpenFileNames
(
m_schnapps
,
"Import
surfaces"
,
m_schnapps
->
getAppPath
(),
"Surface mesh Files (*.ply *.off *.trian
)"
);
QStringList
fileNames
=
QFileDialog
::
getOpenFileNames
(
m_schnapps
,
"Import
images"
,
m_schnapps
->
getAppPath
(),
"Surface mesh Files (*.png *.jpg *.jpeg
)"
);
QStringList
::
Iterator
it
=
fileNames
.
begin
();
while
(
it
!=
fileNames
.
end
())
{
importFromFile
(
*
it
);
while
(
it
!=
fileNames
.
end
())
{
importImageFromFile
(
*
it
);
++
it
;
}
}
...
...
SCHNApps/Plugins/surface_render/forms/surface_render.ui
View file @
c165b337
...
...
@@ -14,35 +14,34 @@
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"9"
column=
"0"
rowspan=
"2"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderEdges"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
render edges
</string>
<string>
Position :
</string>
</property>
</widget>
</item>
<item
>
<widget
class=
"QPushButton"
name=
"scolorButton
"
>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"combo_positionVBO
"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferr
ed"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fix
ed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
32
</height>
</size>
</property>
<item>
<property
name=
"text"
>
<string>
Color
</string>
<string>
- select VBO -
</string>
</property>
</item>
</widget>
</item>
</layout>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Normal :
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"combo_normalVBO"
>
...
...
@@ -59,44 +58,75 @@
</item>
</widget>
</item>
<item
row=
"20"
column=
"0"
colspan=
"2"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
156
</width>
<height>
161
</height>
</size>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
Color :
</string>
</property>
</
spacer
>
</
widget
>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_3"
>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"combo_colorVBO"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<item>
<property
name=
"text"
>
<string>
Normal :
</string>
<string>
- select VBO -
</string>
</property>
</item>
</widget>
</item>
<item
row=
"15"
column=
"1"
>
<widget
class=
"QRadioButton"
name=
"radio_phongShading"
>
<item
row=
"3"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line"
/>
</item>
<item
row=
"4"
column=
"0"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderVertices"
>
<property
name=
"text"
>
<string>
Phong
</string>
<string>
render vertices
</string>
</property>
<attribute
name=
"buttonGroup"
>
<string
notr=
"true"
>
group_faceShading
</string>
</attribute>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"vcolorButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
32
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Position :
</string>
<string>
Color
</string>
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
colspan=
"2"
>
</layout>
</item>
<item
row=
"5"
column=
"0"
colspan=
"2"
>
<widget
class=
"QSlider"
name=
"slider_verticesScaleFactor"
>
<property
name=
"value"
>
<number>
50
</number>
...
...
@@ -106,45 +136,50 @@
</property>
</widget>
</item>
<item
row=
"16"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"check_renderBoundary"
>
<item
row=
"6"
column=
"0"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderEdges"
>
<property
name=
"text"
>
<string>
render boundary
</string>
<string>
render edges
</string>
</property>
</widget>
</item>
<item
row=
"15"
column=
"0"
>
<widget
class=
"QRadioButton"
name=
"radio_flatShading
"
>
<property
name=
"text
"
>
<string>
Flat
</string
>
<item
>
<spacer
name=
"horizontalSpacer_3
"
>
<property
name=
"orientation
"
>
<enum>
Qt::Horizontal
</enum
>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
<attribute
name=
"buttonGroup"
>
<string
notr=
"true"
>
group_faceShading
</string>
</attribute>
</widget>
</spacer>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"combo_positionVBO
"
>
<item
>
<widget
class=
"QPushButton"
name=
"scolorButton
"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fix
ed"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferr
ed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<item>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
32
</height>
</size>
</property>
<property
name=
"text"
>
<string>
- select VBO -
</string>
<string>
Color
</string>
</property>
</item>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line"
/>
</layout>
</item>
<item
row=
"
12"
column=
"0"
rowspan=
"2
"
colspan=
"2"
>
<item
row=
"
7"
column=
"0
"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderFaces"
>
...
...
@@ -156,6 +191,19 @@
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"dcolorButton"
>
<property
name=
"sizePolicy"
>
...
...
@@ -295,35 +343,48 @@
</item>
</layout>
</item>
<item
row=
"3"
column=
"0"
rowspan=
"2"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QCheckBox"
name=
"check_renderVertices"
>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QRadioButton"
name=
"radio_flatShading"
>
<property
name=
"text"
>
<string>
render vertices
</string>
<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=
"QPushButton"
name=
"vcolorButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
32
</height>
</size>
<item
row=
"8"
column=
"1"
>
<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>
<item
row=
"9"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"check_renderBoundary"
>
<property
name=
"text"
>
<string>
Color
</string>
<string>
render boundary
</string>
</property>
</widget>
</item>
</layout>
<item
row=
"10"
column=
"0"
colspan=
"2"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
156
</width>
<height>
161
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
...
...
SCHNApps/Plugins/surface_render/include/surface_render.h
View file @
c165b337
...
...
@@ -6,6 +6,7 @@
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderPhong.h"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/pointSprite.h"
...
...
@@ -28,19 +29,21 @@ struct MapParameters
MapParameters
()
:
positionVBO
(
NULL
),
normalVBO
(
NULL
),
colorVBO
(
NULL
),
verticesScaleFactor
(
1.0
f
),
renderVertices
(
false
),
renderEdges
(
false
),
renderFaces
(
true
),
faceStyle
(
FLAT
),
diffuseColor
(
0.8
f
,
0.9
f
,
0.7
f
,
0.0
f
),
diffuseColor
(
0.8
5
f
,
0.25
f
,
0.19
f
,
0.0
f
),
simpleColor
(
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
),
vertexColor
(
0.0
f
,
0.0
f
,
1.0
f
,
0.0
f
)
{}
Utils
::
VBO
*
positionVBO
;
Utils
::
VBO
*
normalVBO
;
Utils
::
VBO
*
colorVBO
;