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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
b72caf85
Commit
b72caf85
authored
Feb 19, 2013
by
Thery Sylvain
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn:~untereiner/CGoGN
Conflicts: include/Algo/Export/exportPov.h
parents
344bd87b
bc80b422
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
1554 additions
and
573 deletions
+1554
-573
CMakeLists.txt
CMakeLists.txt
+3
-0
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+2
-1
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/forms/renderExplod.ui
SCHNApps/Plugins/renderExplod/forms/renderExplod.ui
+2
-2
SCHNApps/Plugins/renderExplod/include/renderExplod.h
SCHNApps/Plugins/renderExplod/include/renderExplod.h
+28
-21
SCHNApps/Plugins/renderExplod/include/renderExplodDockTab.h
SCHNApps/Plugins/renderExplod/include/renderExplodDockTab.h
+5
-5
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
+183
-102
SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp
SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp
+36
-31
SCHNApps/Plugins/renderTopoSurface/CMakeLists.txt
SCHNApps/Plugins/renderTopoSurface/CMakeLists.txt
+32
-0
SCHNApps/Plugins/renderTopoSurface/forms/renderTopoSurface.ui
...Apps/Plugins/renderTopoSurface/forms/renderTopoSurface.ui
+102
-0
SCHNApps/Plugins/renderTopoSurface/include/renderTopoSurface.h
...pps/Plugins/renderTopoSurface/include/renderTopoSurface.h
+94
-0
SCHNApps/Plugins/renderTopoSurface/include/renderTopoSurfaceDockTab.h
...gins/renderTopoSurface/include/renderTopoSurfaceDockTab.h
+42
-0
SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurface.cpp
SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurface.cpp
+262
-0
SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp
...lugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp
+117
-0
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
+4
-4
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
apps_cmake.txt
apps_cmake.txt
+3
-0
include/Algo/Modelisation/subdivision3.hpp
include/Algo/Modelisation/subdivision3.hpp
+88
-120
include/Algo/Multiresolution/Map2MR/Filters/sqrt3.h
include/Algo/Multiresolution/Map2MR/Filters/sqrt3.h
+20
-16
include/Algo/Render/GL2/topoRender.h
include/Algo/Render/GL2/topoRender.h
+6
-3
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.
CMakeLists.txt
View file @
b72caf85
...
...
@@ -33,6 +33,7 @@ find_package(Boost COMPONENTS regex thread system REQUIRED)
find_package
(
ZLIB REQUIRED
)
find_package
(
LibXml2 REQUIRED
)
find_package
(
GLEW REQUIRED
)
find_package
(
SuiteSparse REQUIRED
)
IF
(
DEFINED ASSERTON
)
add_definitions
(
-DCGOGN_ASSERT_BOOL=
${
ASSERTON
}
)
...
...
@@ -77,6 +78,7 @@ SET (CGoGN_EXT_INCLUDES
# define libs for external libs
SET
(
CGoGN_EXT_LIBS
nl
${
OPENGL_LIBRARY
}
${
GLEW_LIBRARIES
}
${
ZLIB_LIBRARIES
}
...
...
@@ -84,6 +86,7 @@ SET (CGoGN_EXT_LIBS
${
Boost_SYSTEM_LIBRARY
}
${
Boost_REGEX_LIBRARY
}
${
Boost_THREAD_LIBRARY
}
${
SUITESPARSE_LIBRARIES
}
)
#optionnal libs
...
...
SCHNApps/Plugins/CMakeLists.txt
View file @
b72caf85
...
...
@@ -6,6 +6,7 @@ ADD_SUBDIRECTORY(differentialProperties)
ADD_SUBDIRECTORY
(
render
)
ADD_SUBDIRECTORY
(
renderVector
)
ADD_SUBDIRECTORY
(
renderExplod
)
ADD_SUBDIRECTORY
(
renderTopoSurface
)
ADD_SUBDIRECTORY
(
subdivideSurface
)
ADD_SUBDIRECTORY
(
surfaceDeformation
)
#ADD_SUBDIRECTORY(renderTopoSurface)
SCHNApps/Plugins/differentialProperties/forms/computeCurvatureDialog.ui
View file @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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 @
b72caf85
...
...
@@ -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
);