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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
a4379092
Commit
a4379092
authored
Feb 15, 2013
by
untereiner
Browse files
Options
Browse Files
Download
Plain Diff
Merge cgogn:~kraemer/CGoGN
parents
dfec257e
7c2a9e25
Changes
38
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
607 additions
and
340 deletions
+607
-340
SCHNApps/Plugins/differentialProperties/forms/computeCurvatureDialog.ui
...ns/differentialProperties/forms/computeCurvatureDialog.ui
+31
-81
SCHNApps/Plugins/differentialProperties/forms/computeNormalDialog.ui
...ugins/differentialProperties/forms/computeNormalDialog.ui
+2
-12
SCHNApps/Plugins/differentialProperties/include/computeNormalDialog.h
...gins/differentialProperties/include/computeNormalDialog.h
+0
-2
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
...s/differentialProperties/include/differentialProperties.h
+34
-10
SCHNApps/Plugins/differentialProperties/src/computeNormalDialog.cpp
...lugins/differentialProperties/src/computeNormalDialog.cpp
+0
-9
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
...ins/differentialProperties/src/differentialProperties.cpp
+58
-35
SCHNApps/Plugins/importSurface/include/importSurface.h
SCHNApps/Plugins/importSurface/include/importSurface.h
+8
-2
SCHNApps/Plugins/importSurface/src/importSurface.cpp
SCHNApps/Plugins/importSurface/src/importSurface.cpp
+16
-3
SCHNApps/Plugins/importVolume/include/importVolume.h
SCHNApps/Plugins/importVolume/include/importVolume.h
+8
-2
SCHNApps/Plugins/importVolume/src/importVolume.cpp
SCHNApps/Plugins/importVolume/src/importVolume.cpp
+16
-3
SCHNApps/Plugins/render/include/render.h
SCHNApps/Plugins/render/include/render.h
+8
-8
SCHNApps/Plugins/render/include/renderDockTab.h
SCHNApps/Plugins/render/include/renderDockTab.h
+3
-1
SCHNApps/Plugins/render/src/render.cpp
SCHNApps/Plugins/render/src/render.cpp
+27
-17
SCHNApps/Plugins/render/src/renderDockTab.cpp
SCHNApps/Plugins/render/src/renderDockTab.cpp
+26
-9
SCHNApps/Plugins/renderExplod/include/renderExplod.h
SCHNApps/Plugins/renderExplod/include/renderExplod.h
+7
-7
SCHNApps/Plugins/renderExplod/include/renderExplodDockTab.h
SCHNApps/Plugins/renderExplod/include/renderExplodDockTab.h
+1
-1
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
+21
-14
SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp
SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp
+7
-7
SCHNApps/Plugins/renderVector/include/renderVector.h
SCHNApps/Plugins/renderVector/include/renderVector.h
+4
-4
SCHNApps/Plugins/renderVector/include/renderVectorDockTab.h
SCHNApps/Plugins/renderVector/include/renderVectorDockTab.h
+3
-1
SCHNApps/Plugins/renderVector/src/renderVector.cpp
SCHNApps/Plugins/renderVector/src/renderVector.cpp
+15
-9
SCHNApps/Plugins/renderVector/src/renderVectorDockTab.cpp
SCHNApps/Plugins/renderVector/src/renderVectorDockTab.cpp
+21
-4
SCHNApps/Plugins/subdivideSurface/include/subdivideSurface.h
SCHNApps/Plugins/subdivideSurface/include/subdivideSurface.h
+14
-5
SCHNApps/Plugins/subdivideSurface/src/subdivideSurface.cpp
SCHNApps/Plugins/subdivideSurface/src/subdivideSurface.cpp
+65
-25
SCHNApps/Plugins/surfaceDeformation/include/surfaceDeformationDockTab.h
...ns/surfaceDeformation/include/surfaceDeformationDockTab.h
+1
-1
SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformation.cpp
...pps/Plugins/surfaceDeformation/src/surfaceDeformation.cpp
+0
-2
SCHNApps/bin/init.py
SCHNApps/bin/init.py
+2
-2
SCHNApps/include/dialogs/mapsDialog.h
SCHNApps/include/dialogs/mapsDialog.h
+5
-4
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+15
-1
SCHNApps/include/mapHandler.hpp
SCHNApps/include/mapHandler.hpp
+92
-0
SCHNApps/src/dialogs/mapsDialog.cpp
SCHNApps/src/dialogs/mapsDialog.cpp
+51
-16
include/Algo/BooleanOperator/mergeVertices.hpp
include/Algo/BooleanOperator/mergeVertices.hpp
+8
-5
include/Algo/Import/importSvg.hpp
include/Algo/Import/importSvg.hpp
+4
-4
include/Algo/MovingObjects/particle_cell_2D.h
include/Algo/MovingObjects/particle_cell_2D.h
+3
-3
include/Algo/MovingObjects/particle_cell_2D.hpp
include/Algo/MovingObjects/particle_cell_2D.hpp
+14
-14
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
+15
-15
include/Utils/vbo_base.h
include/Utils/vbo_base.h
+1
-1
src/Utils/vbo.cpp
src/Utils/vbo.cpp
+1
-1
No files found.
SCHNApps/Plugins/differentialProperties/forms/computeCurvatureDialog.ui
View file @
a4379092
...
...
@@ -67,41 +67,6 @@
<string>
Computed attributes
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<italic>
true
</italic>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
Kmax :
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Existing attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"combo_KmaxAttribute"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"0"
column=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
...
...
@@ -116,16 +81,6 @@
</item>
</layout>
</item>
<item
row=
"0"
column=
"3"
>
<widget
class=
"QCheckBox"
name=
"check_KmaxCreateVBO"
>
<property
name=
"text"
>
<string>
create VBO
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_10"
>
<property
name=
"font"
>
...
...
@@ -175,16 +130,6 @@
</item>
</layout>
</item>
<item
row=
"1"
column=
"3"
>
<widget
class=
"QCheckBox"
name=
"check_kmaxCreateVBO"
>
<property
name=
"text"
>
<string>
create VBO
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_7"
>
<property
name=
"font"
>
...
...
@@ -234,16 +179,6 @@
</item>
</layout>
</item>
<item
row=
"2"
column=
"3"
>
<widget
class=
"QCheckBox"
name=
"check_KminCreateVBO"
>
<property
name=
"text"
>
<string>
create VBO
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_13"
>
<property
name=
"font"
>
...
...
@@ -293,16 +228,6 @@
</item>
</layout>
</item>
<item
row=
"3"
column=
"3"
>
<widget
class=
"QCheckBox"
name=
"check_kminCreateVBO"
>
<property
name=
"text"
>
<string>
create VBO
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_15"
>
<property
name=
"font"
>
...
...
@@ -352,16 +277,41 @@
</item>
</layout>
</item>
<item
row=
"4"
column=
"3"
>
<widget
class=
"QCheckBox"
name=
"check_KnormalCreateVBO"
>
<property
name=
"text"
>
<string>
create VBO
</string>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<italic>
true
</italic>
<bold>
true
</bold>
</font>
</property>
<property
name=
"
checked
"
>
<
bool>
true
</bool
>
<property
name=
"
text
"
>
<
string>
Kmax :
</string
>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Existing attribute :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"combo_KmaxAttribute"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
...
...
SCHNApps/Plugins/differentialProperties/forms/computeNormalDialog.ui
View file @
a4379092
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
4
47
</width>
<height>
311
</height>
<width>
4
72
</width>
<height>
276
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -75,16 +75,6 @@
</item>
</layout>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"check_createVBO"
>
<property
name=
"text"
>
<string>
create VBO
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
SCHNApps/Plugins/differentialProperties/include/computeNormalDialog.h
View file @
a4379092
...
...
@@ -28,8 +28,6 @@ public slots:
void
addMapToList
(
MapHandlerGen
*
m
);
void
removeMapFromList
(
MapHandlerGen
*
m
);
void
addAttributeToList
(
unsigned
int
orbit
,
const
QString
&
nameAttr
);
void
attributeModified
(
unsigned
int
orbit
,
QString
nameAttr
);
};
}
// namespace SCHNApps
...
...
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
View file @
a4379092
...
...
@@ -38,18 +38,21 @@ public:
virtual
void
wheelEvent
(
View
*
view
,
QWheelEvent
*
event
)
{}
public
slots
:
void
mapAdded
(
MapHandlerGen
*
map
);
void
mapRemoved
(
MapHandlerGen
*
map
);
void
attributeModified
(
unsigned
int
orbit
,
QString
nameAttr
);
void
openComputeNormalDialog
();
void
openComputeCurvatureDialog
();
void
computeNormalFromDialog
();
void
computeCurvatureFromDialog
();
void
computeNormal
(
const
QString
&
mapName
,
void
computeNormal
(
const
QString
&
mapName
,
const
QString
&
positionAttributeName
=
"position"
,
const
QString
&
normalAttributeName
=
"normal"
,
bool
createNormalVBO
=
true
);
bool
autoUpdate
=
true
);
void
computeCurvature
(
const
QString
&
mapName
,
const
QString
&
positionAttributeName
=
"position"
,
...
...
@@ -59,11 +62,7 @@ public slots:
const
QString
&
KminAttributeName
=
"Kmin"
,
const
QString
&
kminAttributeName
=
"kmin"
,
const
QString
&
KnormalAttributeName
=
"Knormal"
,
bool
createKmaxVBO
=
true
,
bool
createkmaxVBO
=
true
,
bool
createKminVBO
=
true
,
bool
createkminVBO
=
true
,
bool
createKnormalVBO
=
true
bool
autoUpdate
=
true
);
private:
...
...
@@ -76,11 +75,36 @@ private:
struct
ComputeNormalParameters
{
ComputeNormalParameters
()
{}
ComputeNormalParameters
(
QString
p
,
QString
n
)
:
positionName
(
p
),
normalName
(
n
)
{}
ComputeNormalParameters
(
const
QString
&
p
,
const
QString
&
n
,
bool
update
)
:
positionName
(
p
),
normalName
(
n
),
autoUpdate
(
update
)
{}
QString
positionName
;
QString
normalName
;
bool
autoUpdate
;
};
QHash
<
QString
,
ComputeNormalParameters
>
computeNormalLastParameters
;
struct
ComputeCurvatureParameters
{
ComputeCurvatureParameters
()
{}
ComputeCurvatureParameters
(
const
QString
&
p
,
const
QString
&
n
,
const
QString
&
Kmax
,
const
QString
&
kmax
,
const
QString
&
Kmin
,
const
QString
&
kmin
,
const
QString
&
Knormal
,
bool
update
)
:
positionName
(
p
),
normalName
(
n
),
KmaxName
(
Kmax
),
kmaxName
(
kmax
),
KminName
(
Kmin
),
kminName
(
kmin
),
KnormalName
(
Knormal
),
autoUpdate
(
update
)
{}
QString
positionName
;
QString
normalName
;
QString
KmaxName
;
QString
kmaxName
;
QString
KminName
;
QString
kminName
;
QString
KnormalName
;
bool
autoUpdate
;
};
QHash
<
QString
,
ComputeCurvatureParameters
>
computeCurvatureLastParameters
;
};
#endif
SCHNApps/Plugins/differentialProperties/src/computeNormalDialog.cpp
View file @
a4379092
...
...
@@ -105,15 +105,6 @@ void ComputeNormalDialog::addAttributeToList(unsigned int orbit, const QString&
}
}
void
ComputeNormalDialog
::
attributeModified
(
unsigned
int
orbit
,
QString
nameAttr
)
{
MapHandlerGen
*
map
=
static_cast
<
MapHandlerGen
*>
(
QObject
::
sender
());
// if(orbit == VERTEX && nameAttr == )
// {
// }
}
}
// namespace SCHNApps
}
// namespace CGoGN
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
View file @
a4379092
...
...
@@ -25,9 +25,36 @@ bool DifferentialPropertiesPlugin::enable()
connect
(
m_computeCurvatureDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeCurvatureFromDialog
()));
connect
(
m_computeCurvatureDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeCurvatureFromDialog
()));
connect
(
m_window
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_window
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
return
true
;
}
void
DifferentialPropertiesPlugin
::
mapAdded
(
MapHandlerGen
*
map
)
{
connect
(
map
,
SIGNAL
(
attributeModified
(
unsigned
int
,
QString
)),
this
,
SLOT
(
attributeModified
(
unsigned
int
,
QString
)));
}
void
DifferentialPropertiesPlugin
::
mapRemoved
(
MapHandlerGen
*
map
)
{
disconnect
(
map
,
SIGNAL
(
attributeModified
(
unsigned
int
,
QString
)),
this
,
SLOT
(
attributeModified
(
unsigned
int
,
QString
)));
}
void
DifferentialPropertiesPlugin
::
attributeModified
(
unsigned
int
orbit
,
QString
nameAttr
)
{
if
(
orbit
==
VERTEX
)
{
MapHandlerGen
*
map
=
static_cast
<
MapHandlerGen
*>
(
QObject
::
sender
());
if
(
computeNormalLastParameters
.
contains
(
map
->
getName
()))
{
ComputeNormalParameters
&
params
=
computeNormalLastParameters
[
map
->
getName
()];
if
(
params
.
positionName
==
nameAttr
&&
params
.
autoUpdate
)
computeNormal
(
map
->
getName
(),
params
.
positionName
,
params
.
normalName
);
}
}
}
void
DifferentialPropertiesPlugin
::
openComputeNormalDialog
()
{
m_computeNormalDialog
->
show
();
...
...
@@ -46,15 +73,16 @@ void DifferentialPropertiesPlugin::computeNormalFromDialog()
const
QString
&
mapName
=
currentItems
[
0
]
->
text
();
QString
positionName
=
m_computeNormalDialog
->
combo_positionAttribute
->
currentText
();
QString
normalName
;
if
(
m_computeNormalDialog
->
normalAttributeName
->
text
().
isEmpty
())
normalName
=
m_computeNormalDialog
->
combo_normalAttribute
->
currentText
();
else
normalName
=
m_computeNormalDialog
->
normalAttributeName
->
text
();
bool
createVBO
=
(
m_computeNormalDialog
->
check_createVBO
->
checkState
()
==
Qt
::
Checked
);
bool
autoUpdate
=
(
currentItems
[
0
]
->
checkState
()
==
Qt
::
Checked
);
computeNormal
(
mapName
,
positionName
,
normalName
,
createVBO
);
computeNormal
(
mapName
,
positionName
,
normalName
,
autoUpdate
);
}
}
...
...
@@ -98,19 +126,13 @@ void DifferentialPropertiesPlugin::computeCurvatureFromDialog()
else
KnormalName
=
m_computeCurvatureDialog
->
KnormalAttributeName
->
text
();
bool
KmaxVBO
=
(
m_computeCurvatureDialog
->
check_KmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
);
bool
kmaxVBO
=
(
m_computeCurvatureDialog
->
check_kmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
);
bool
KminVBO
=
(
m_computeCurvatureDialog
->
check_KminCreateVBO
->
checkState
()
==
Qt
::
Checked
);
bool
kminVBO
=
(
m_computeCurvatureDialog
->
check_kminCreateVBO
->
checkState
()
==
Qt
::
Checked
);
bool
KnormalVBO
=
(
m_computeCurvatureDialog
->
check_KnormalCreateVBO
->
checkState
()
==
Qt
::
Checked
);
bool
autoUpdate
=
(
currentItems
[
0
]
->
checkState
()
==
Qt
::
Checked
);
computeCurvature
(
mapName
,
positionName
,
normalName
,
KmaxName
,
kmaxName
,
KminName
,
kminName
,
KnormalName
,
KmaxVBO
,
kmaxVBO
,
KminVBO
,
kminVBO
,
KnormalVBO
mapName
,
positionName
,
normalName
,
KmaxName
,
kmaxName
,
KminName
,
kminName
,
KnormalName
,
autoUpdate
);
}
}
...
...
@@ -119,7 +141,7 @@ void DifferentialPropertiesPlugin::computeNormal(
const
QString
&
mapName
,
const
QString
&
positionAttributeName
,
const
QString
&
normalAttributeName
,
bool
createNormalVBO
)
bool
autoUpdate
)
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapName
));
if
(
mh
==
NULL
)
...
...
@@ -136,15 +158,12 @@ void DifferentialPropertiesPlugin::computeNormal(
PFP2
::
MAP
*
map
=
mh
->
getMap
();
Algo
::
Surface
::
Geometry
::
computeNormalVertices
<
PFP2
>
(
*
map
,
position
,
normal
);
if
(
createNormalVBO
)
mh
->
createVBO
(
normal
);
computeNormalLastParameters
[
mapName
]
=
ComputeNormalParameters
(
positionAttributeName
,
normalAttributeName
)
;
ComputeNormalParameters
(
positionAttributeName
,
normalAttributeName
,
autoUpdate
)
;
QList
<
View
*>
views
=
mh
->
getLinkedViews
(
);
foreach
(
View
*
view
,
views
)
view
->
updateGL
(
);
mh
->
createVBO
(
normal
);
mh
->
notifyAttributeModification
(
normal
);
}
void
DifferentialPropertiesPlugin
::
computeCurvature
(
...
...
@@ -156,11 +175,7 @@ void DifferentialPropertiesPlugin::computeCurvature(
const
QString
&
KminAttributeName
,
const
QString
&
kminAttributeName
,
const
QString
&
KnormalAttributeName
,
bool
createKmaxVBO
,
bool
createkmaxVBO
,
bool
createKminVBO
,
bool
createkminVBO
,
bool
createKnormalVBO
)
bool
autoUpdate
)
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapName
));
if
(
mh
==
NULL
)
...
...
@@ -202,15 +217,23 @@ void DifferentialPropertiesPlugin::computeCurvature(
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP2
>
(
*
map
,
position
,
edgeAngle
);
Algo
::
Surface
::
Geometry
::
computeCurvatureVertices_NormalCycles_Projected
<
PFP2
>
(
*
map
,
0.02
f
*
mh
->
getBBdiagSize
(),
position
,
normal
,
edgeAngle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
);
if
(
createKmaxVBO
)
mh
->
createVBO
(
Kmax
);
if
(
createkmaxVBO
)
mh
->
createVBO
(
kmax
);
if
(
createKminVBO
)
mh
->
createVBO
(
Kmin
);
if
(
createkminVBO
)
mh
->
createVBO
(
kmin
);
if
(
createKnormalVBO
)
mh
->
createVBO
(
Knormal
);
QList
<
View
*>
views
=
mh
->
getLinkedViews
();
foreach
(
View
*
view
,
views
)
view
->
updateGL
();
computeCurvatureLastParameters
[
mapName
]
=
ComputeCurvatureParameters
(
positionAttributeName
,
normalAttributeName
,
KmaxAttributeName
,
kmaxAttributeName
,
KminAttributeName
,
kminAttributeName
,
KnormalAttributeName
,
autoUpdate
);
mh
->
createVBO
(
Kmax
);
mh
->
createVBO
(
kmax
);
mh
->
createVBO
(
Kmin
);
mh
->
createVBO
(
kmin
);
mh
->
createVBO
(
Knormal
);
mh
->
notifyAttributeModification
(
Kmax
);
mh
->
notifyAttributeModification
(
kmax
);
mh
->
notifyAttributeModification
(
Kmin
);
mh
->
notifyAttributeModification
(
kmin
);
mh
->
notifyAttributeModification
(
Knormal
);
}
#ifndef DEBUG
...
...
SCHNApps/Plugins/importSurface/include/importSurface.h
View file @
a4379092
...
...
@@ -4,9 +4,11 @@
#include "plugin.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
namespace
CGoGN
{
namespace
SCHNApps
{
class
ImportSurfacePlugin
:
public
Plugin
{
...
...
@@ -42,4 +44,8 @@ private:
QAction
*
importAction
;
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/Plugins/importSurface/src/importSurface.cpp
View file @
a4379092
...
...
@@ -7,6 +7,12 @@
#include <QFileDialog>
#include <QFileInfo>
namespace
CGoGN
{
namespace
SCHNApps
{
bool
ImportSurfacePlugin
::
enable
()
{
importAction
=
new
QAction
(
"import"
,
this
);
...
...
@@ -30,12 +36,15 @@ MapHandlerGen* ImportSurfacePlugin::importFromFile(const QString& fileName)
Algo
::
Surface
::
Import
::
importMesh
<
PFP2
>
(
*
map
,
fileName
.
toStdString
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
mh
->
registerAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
position
);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
mh
->
registerAttribute
(
position
);
// create
VBO for vertex position attribute
// create
position VBO
mh
->
createVBO
(
position
);
// update corresponding VBO & emit attribute update signal
mh
->
notifyAttributeModification
(
position
);
// compute map bounding box
mh
->
updateBB
(
position
);
}
...
...
@@ -56,3 +65,7 @@ Q_EXPORT_PLUGIN2(ImportSurfacePlugin, ImportSurfacePlugin)
#else
Q_EXPORT_PLUGIN2
(
ImportSurfacePluginD
,
ImportSurfacePlugin
)
#endif
}
// namespace SCHNApps
}
// namespace CGoGN
SCHNApps/Plugins/importVolume/include/importVolume.h
View file @
a4379092
...
...
@@ -4,9 +4,11 @@
#include "plugin.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
namespace
CGoGN
{
namespace
SCHNApps
{
class
ImportVolumePlugin
:
public
Plugin
{
...
...
@@ -42,4 +44,8 @@ private:
QAction
*
importAction
;
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/Plugins/importVolume/src/importVolume.cpp
View file @
a4379092
...
...
@@ -7,6 +7,12 @@
#include <QFileDialog>
#include <QFileInfo>
namespace
CGoGN
{
namespace
SCHNApps
{
bool
ImportVolumePlugin
::
enable
()
{
importAction
=
new
QAction
(
"import"
,
this
);
...
...
@@ -30,12 +36,15 @@ MapHandlerGen* ImportVolumePlugin::importFromFile(const QString& fileName)
Algo
::
Volume
::
Import
::
importMesh
<
PFP3
>
(
*
map
,
fileName
.
toStdString
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
PFP3
::
VEC3
>
position
=
map
->
getAttribute
<
PFP3
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
mh
->
registerAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
position
);
VertexAttribute
<
PFP3
::
VEC3
>
position
=
map
->
getAttribute
<
PFP3
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
mh
->
registerAttribute
(
position
);
// create
VBO for vertex position attribute
// create
position VBO
mh
->
createVBO
(
position
);
// update corresponding VBO & emit attribute update signal
mh
->
notifyAttributeModification
(
position
);
// compute map bounding box
mh
->
updateBB
(
position
);
}
...
...
@@ -56,3 +65,7 @@ Q_EXPORT_PLUGIN2(ImportVolumePlugin, ImportVolumePlugin)
#else
Q_EXPORT_PLUGIN2
(
ImportVolumePluginD
,
ImportVolumePlugin
)
#endif
}
// namespace SCHNApps
}
// namespace CGoGN
SCHNApps/Plugins/render/include/render.h
View file @
a4379092
...
...
@@ -100,14 +100,14 @@ public slots:
void
vboAdded
(
Utils
::
VBO
*
vbo
);
void
vboRemoved
(
Utils
::
VBO
*
vbo
);
void
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
);
void
changePositionVBO
(
View
*
view
,
MapHandlerGen
*
map
,
Utils
::
VBO
*
vbo
);
void
changeNormalVBO
(
View
*
view
,
MapHandlerGen
*
map
,
Utils
::
VBO
*
vbo
);
void
changeRenderVertices
(
View
*
view
,
MapHandlerGen
*
map
,
bool
b
);
void
changeVerticesScaleFactor
(
View
*
view
,
MapHandlerGen
*
map
,
int
i
);
void
changeRenderEdges
(
View
*
view
,
MapHandlerGen
*
map
,
bool
b
);
void
changeRenderFaces
(
View
*
view
,
MapHandlerGen
*
map
,
bool
b
);
void
changeFacesStyle
(
View
*
view
,
MapHandlerGen
*
map
,
FaceShadingStyle
style
);
void
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
,
bool
fromUI
=
false
);
void
changePositionVBO
(
View
*
view
,
MapHandlerGen
*
map
,
Utils
::
VBO
*
vbo
,
bool
fromUI
=
false
);
void
changeNormalVBO
(
View
*
view
,
MapHandlerGen
*
map
,
Utils
::
VBO
*
vbo
,
bool
fromUI
=
false
);
void
changeRenderVertices
(
View
*
view
,
MapHandlerGen
*
map
,
bool
b
,
bool
fromUI
=
false
);
void
changeVerticesScaleFactor
(
View
*
view
,
MapHandlerGen
*
map
,
int
i
,
bool
fromUI
=
false
);
void
changeRenderEdges
(
View
*
view
,
MapHandlerGen
*
map
,
bool
b
,
bool
fromUI
=
false
);
void
changeRenderFaces
(
View
*
view
,
MapHandlerGen
*
map
,
bool
b
,
bool
fromUI
=
false
);
void
changeFacesStyle
(
View
*
view
,
MapHandlerGen
*
map
,
FaceShadingStyle
style
,
bool
fromUI
=
false
);
};
}
// namespace SCHNApps
...
...
SCHNApps/Plugins/render/include/renderDockTab.h
View file @
a4379092
...
...
@@ -11,7 +11,7 @@ namespace SCHNApps
class
Window
;
class
RenderPlugin
;
class
ParameterSet
;
struct
ParameterSet
;
class
RenderDockTab
:
public
QWidget
,
public
Ui
::
RenderDockWidget