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
13c0da82
Commit
13c0da82
authored
Mar 05, 2014
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples & tutos compiling !
parent
bdb3cd9c
Changes
103
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
103 changed files
with
2190 additions
and
2008 deletions
+2190
-2008
Apps/Examples/Debug/CMakeLists.txt
Apps/Examples/Debug/CMakeLists.txt
+4
-4
Apps/Examples/Release/CMakeLists.txt
Apps/Examples/Release/CMakeLists.txt
+8
-4
Apps/Examples/simpleMap3.cpp
Apps/Examples/simpleMap3.cpp
+6
-6
Apps/Examples/simpleMap3.h
Apps/Examples/simpleMap3.h
+5
-5
Apps/Examples/viewer.cpp
Apps/Examples/viewer.cpp
+3
-3
Apps/Examples/viewer.h
Apps/Examples/viewer.h
+4
-3
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+2
-3
Apps/Examples/volumeExplorer.h
Apps/Examples/volumeExplorer.h
+0
-1
Apps/SandBox/tilings.cpp
Apps/SandBox/tilings.cpp
+7
-8
Apps/SandBox/tilings.h
Apps/SandBox/tilings.h
+0
-7
Apps/Tuto/show_traversors.cpp
Apps/Tuto/show_traversors.cpp
+9
-18
Apps/Tuto/show_traversors.h
Apps/Tuto/show_traversors.h
+4
-16
Apps/Tuto/tuto1.cpp
Apps/Tuto/tuto1.cpp
+2
-2
Apps/Tuto/tuto1.h
Apps/Tuto/tuto1.h
+5
-13
Apps/Tuto/tuto2.cpp
Apps/Tuto/tuto2.cpp
+4
-5
Apps/Tuto/tuto2.h
Apps/Tuto/tuto2.h
+1
-2
Apps/Tuto/tuto3.cpp
Apps/Tuto/tuto3.cpp
+9
-13
Apps/Tuto/tuto3.h
Apps/Tuto/tuto3.h
+6
-17
Apps/Tuto/tuto4.cpp
Apps/Tuto/tuto4.cpp
+3
-4
Apps/Tuto/tuto4.h
Apps/Tuto/tuto4.h
+4
-4
Apps/Tuto/tuto5.cpp
Apps/Tuto/tuto5.cpp
+7
-7
Apps/Tuto/tuto5.h
Apps/Tuto/tuto5.h
+3
-17
Apps/Tuto/tuto_dual2.cpp
Apps/Tuto/tuto_dual2.cpp
+8
-5
Apps/Tuto/tuto_dual3.cpp
Apps/Tuto/tuto_dual3.cpp
+19
-16
Apps/Tuto/tuto_histo.cpp
Apps/Tuto/tuto_histo.cpp
+12
-16
Apps/Tuto/tuto_histo.h
Apps/Tuto/tuto_histo.h
+17
-16
Apps/Tuto/tuto_mt.cpp
Apps/Tuto/tuto_mt.cpp
+50
-43
Apps/Tuto/tuto_oper2.cpp
Apps/Tuto/tuto_oper2.cpp
+15
-21
Apps/Tuto/tuto_oper2.h
Apps/Tuto/tuto_oper2.h
+19
-23
Apps/Tuto/tuto_oper3.cpp
Apps/Tuto/tuto_oper3.cpp
+21
-23
Apps/Tuto/tuto_oper3.h
Apps/Tuto/tuto_oper3.h
+25
-28
Apps/Tuto/tuto_orbits.cpp
Apps/Tuto/tuto_orbits.cpp
+44
-55
Apps/Tuto/tuto_orbits.h
Apps/Tuto/tuto_orbits.h
+5
-17
Apps/Tuto/tuto_subdivision.cpp
Apps/Tuto/tuto_subdivision.cpp
+6
-2
include/Algo/Decimation/approximator.h
include/Algo/Decimation/approximator.h
+7
-9
include/Algo/Decimation/approximator.hpp
include/Algo/Decimation/approximator.hpp
+7
-7
include/Algo/Decimation/colorPerVertexApproximator.h
include/Algo/Decimation/colorPerVertexApproximator.h
+18
-15
include/Algo/Decimation/decimation.h
include/Algo/Decimation/decimation.h
+9
-9
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+8
-7
include/Algo/Decimation/edgeSelector.h
include/Algo/Decimation/edgeSelector.h
+70
-58
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+132
-113
include/Algo/Decimation/geometryApproximator.h
include/Algo/Decimation/geometryApproximator.h
+18
-13
include/Algo/Decimation/geometryPredictor.h
include/Algo/Decimation/geometryPredictor.h
+12
-8
include/Algo/Decimation/geometryPredictor.hpp
include/Algo/Decimation/geometryPredictor.hpp
+4
-4
include/Algo/Decimation/halfEdgeSelector.h
include/Algo/Decimation/halfEdgeSelector.h
+30
-29
include/Algo/Decimation/halfEdgeSelector.hpp
include/Algo/Decimation/halfEdgeSelector.hpp
+9
-8
include/Algo/Decimation/predictor.h
include/Algo/Decimation/predictor.h
+8
-6
include/Algo/Decimation/selector.h
include/Algo/Decimation/selector.h
+4
-3
include/Algo/Export/exportVol.h
include/Algo/Export/exportVol.h
+9
-9
include/Algo/Export/exportVol.hpp
include/Algo/Export/exportVol.hpp
+24
-38
include/Algo/Geometry/convexity.h
include/Algo/Geometry/convexity.h
+1
-1
include/Algo/Geometry/convexity.hpp
include/Algo/Geometry/convexity.hpp
+1
-1
include/Algo/Geometry/curvature.h
include/Algo/Geometry/curvature.h
+111
-99
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+148
-137
include/Algo/Geometry/feature.h
include/Algo/Geometry/feature.h
+48
-42
include/Algo/Geometry/feature.hpp
include/Algo/Geometry/feature.hpp
+50
-45
include/Algo/Geometry/intersection.h
include/Algo/Geometry/intersection.h
+4
-4
include/Algo/Geometry/intersection.hpp
include/Algo/Geometry/intersection.hpp
+11
-9
include/Algo/Geometry/localFrame.h
include/Algo/Geometry/localFrame.h
+4
-4
include/Algo/Geometry/volume.h
include/Algo/Geometry/volume.h
+6
-6
include/Algo/Geometry/volume.hpp
include/Algo/Geometry/volume.hpp
+24
-20
include/Algo/Import/import.hpp
include/Algo/Import/import.hpp
+1
-5
include/Algo/Modelisation/subdivision.h
include/Algo/Modelisation/subdivision.h
+2
-2
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+19
-19
include/Algo/Modelisation/subdivision3.hpp
include/Algo/Modelisation/subdivision3.hpp
+1
-1
include/Algo/ProgressiveMesh/pmesh.h
include/Algo/ProgressiveMesh/pmesh.h
+8
-5
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+27
-20
include/Algo/Remeshing/pliant.h
include/Algo/Remeshing/pliant.h
+5
-2
include/Algo/Remeshing/pliant.hpp
include/Algo/Remeshing/pliant.hpp
+24
-19
include/Algo/Render/GL2/drawerCells.h
include/Algo/Render/GL2/drawerCells.h
+14
-14
include/Algo/Render/GL2/drawerCells.hpp
include/Algo/Render/GL2/drawerCells.hpp
+14
-14
include/Algo/Render/GL2/topo3PrimalRender.hpp
include/Algo/Render/GL2/topo3PrimalRender.hpp
+3
-3
include/Algo/Render/GL2/topo3Render.h
include/Algo/Render/GL2/topo3Render.h
+2
-0
include/Algo/Render/GL2/topo3Render.hpp
include/Algo/Render/GL2/topo3Render.hpp
+1
-1
include/Algo/Render/GL2/topoRender.h
include/Algo/Render/GL2/topoRender.h
+28
-6
include/Algo/Render/GL2/topoRender.hpp
include/Algo/Render/GL2/topoRender.hpp
+93
-88
include/Algo/Selection/collector.h
include/Algo/Selection/collector.h
+143
-97
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+83
-131
include/Algo/Selection/raySelectFunctor.hpp
include/Algo/Selection/raySelectFunctor.hpp
+56
-49
include/Algo/Selection/raySelector.h
include/Algo/Selection/raySelector.h
+71
-37
include/Algo/Selection/raySelector.hpp
include/Algo/Selection/raySelector.hpp
+18
-18
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+12
-73
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+2
-187
include/Topology/generic/mapCommon.h
include/Topology/generic/mapCommon.h
+65
-4
include/Topology/generic/mapCommon.hpp
include/Topology/generic/mapCommon.hpp
+205
-1
include/Topology/generic/mapMono.h
include/Topology/generic/mapMono.h
+17
-6
include/Topology/generic/mapMono.hpp
include/Topology/generic/mapMono.hpp
+45
-0
include/Topology/generic/mapMulti.h
include/Topology/generic/mapMulti.h
+17
-11
include/Topology/generic/mapMulti.hpp
include/Topology/generic/mapMulti.hpp
+46
-0
include/Topology/generic/traversor2.hpp
include/Topology/generic/traversor2.hpp
+5
-5
include/Topology/generic/traversor2Virt.hpp
include/Topology/generic/traversor2Virt.hpp
+10
-10
include/Topology/generic/traversor3Virt.hpp
include/Topology/generic/traversor3Virt.hpp
+11
-11
include/Topology/generic/traversorCell.hpp
include/Topology/generic/traversorCell.hpp
+1
-1
include/Topology/gmap/embeddedGMap2.h
include/Topology/gmap/embeddedGMap2.h
+1
-0
include/Topology/gmap/embeddedGMap3.h
include/Topology/gmap/embeddedGMap3.h
+1
-0
include/Topology/map/embeddedMap2.h
include/Topology/map/embeddedMap2.h
+1
-0
include/Topology/map/embeddedMap3.h
include/Topology/map/embeddedMap3.h
+1
-0
include/Topology/map/map1.h
include/Topology/map/map1.h
+1
-0
include/Topology/map/map1.hpp
include/Topology/map/map1.hpp
+1
-3
include/Topology/map/map2.hpp
include/Topology/map/map2.hpp
+12
-10
include/Topology/map/map3.hpp
include/Topology/map/map3.hpp
+6
-6
include/Utils/pointSprite.h
include/Utils/pointSprite.h
+0
-1
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+3
-17
No files found.
Apps/Examples/Debug/CMakeLists.txt
View file @
13c0da82
...
...
@@ -65,10 +65,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable
(
volumeExplorerD ../volumeExplorer.cpp
${
volumeExplorer_ui
}
${
volumeExplorer_moc
}
)
target_link_libraries
(
volumeExplorerD
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
mcmesh_ui ../mcmesh.ui
)
QT4_WRAP_CPP
(
mcmesh_moc ../mcmesh.h
)
add_executable
(
mcmeshD ../mcmesh.cpp
${
mcmesh_moc
}
${
mcmesh_ui
}
)
target_link_libraries
(
mcmeshD
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
#
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
#
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
#
add_executable( mcmeshD ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
#
target_link_libraries( mcmeshD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
QT4_WRAP_CPP
(
concave_rendering_moc ../concave_rendering.h
)
add_executable
(
concave_renderingD ../concave_rendering.cpp
${
concave_rendering_moc
}
${
concave_rendering_ui
}
)
...
...
Apps/Examples/Release/CMakeLists.txt
View file @
13c0da82
...
...
@@ -31,6 +31,10 @@ QT4_WRAP_CPP( texturesExample_moc ../texturesExample.h )
add_executable
(
texturesExample ../texturesExample.cpp
${
texturesExample_moc
}
)
target_link_libraries
(
texturesExample
${
CGoGN_LIBS_R
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_CPP
(
simpleMap3_moc ../simpleMap3.h
)
add_executable
(
simpleMap3 ../simpleMap3.cpp
${
simpleMap3_moc
}
)
target_link_libraries
(
simpleMap3
${
CGoGN_LIBS_R
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_CPP
(
simpleGMap2_moc ../simpleGMap2.h
)
add_executable
(
simpleGMap2 ../simpleGMap2.cpp
${
simpleGMap2_moc
}
)
target_link_libraries
(
simpleGMap2
${
CGoGN_LIBS_R
}
${
CGoGN_EXT_LIBS
}
)
...
...
@@ -58,10 +62,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable
(
volumeExplorer ../volumeExplorer.cpp
${
volumeExplorer_ui
}
${
volumeExplorer_moc
}
)
target_link_libraries
(
volumeExplorer
${
CGoGN_LIBS_R
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
mcmesh_ui ../mcmesh.ui
)
QT4_WRAP_CPP
(
mcmesh_moc ../mcmesh.h
)
add_executable
(
mcmesh ../mcmesh.cpp
${
mcmesh_moc
}
${
mcmesh_ui
}
)
target_link_libraries
(
mcmesh
${
CGoGN_LIBS_R
}
${
CGoGN_EXT_LIBS
}
)
#
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
#
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
#
add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
#
target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP
(
concave_rendering_moc ../concave_rendering.h
)
add_executable
(
concave_rendering ../concave_rendering.cpp
${
concave_rendering_moc
}
${
concave_rendering_ui
}
)
...
...
Apps/Examples/simpleMap3.cpp
View file @
13c0da82
...
...
@@ -106,20 +106,20 @@ void SimpleMap3::cb_initGL()
float
gWidthObj
=
std
::
max
<
float
>
(
std
::
max
<
float
>
(
tailleX
,
tailleY
),
tailleZ
)
;
setParamObject
(
gWidthObj
,
gPosObj
.
data
());
m_render_topo
=
new
Algo
::
Render
::
GL2
::
Topo3Render
();
m_render_topo
=
new
Algo
::
Render
::
GL2
::
Topo3Render
Map
<
PFP
>
();
m_render_topo
->
setDartWidth
(
2.0
f
);
m_render_topo
->
setInitialDartsColor
(
1.0
f
,
1.0
f
,
1.0
f
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
,
0.8
f
);
m_render_topo
->
updateData
(
myMap
,
position
,
0.9
f
,
0.9
f
,
0.8
f
);
m_render_topo_boundary
=
new
Algo
::
Render
::
GL2
::
TopoRender
();
m_render_topo_boundary
=
new
Algo
::
Render
::
GL2
::
TopoRender
Map
<
PFP
>
();
m_render_topo_boundary
->
setDartWidth
(
2.0
f
);
m_render_topo_boundary
->
setInitialDartsColor
(
0.4
f
,
0.8
f
,
0.4
f
);
m_render_topo_boundary
->
updateDataBoundary
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
,
bb
.
maxSize
()
/
50.0
f
);
m_render_topo_boundary
->
updateDataBoundary
(
myMap
,
position
,
0.9
f
,
0.9
f
,
bb
.
maxSize
()
/
50.0
f
);
m_render_topo_primal
=
new
Algo
::
Render
::
GL2
::
Topo3PrimalRender
();
m_render_topo_primal
=
new
Algo
::
Render
::
GL2
::
Topo3PrimalRender
<
PFP
>
();
m_render_topo_primal
->
setDartWidth
(
2.0
f
);
m_render_topo_primal
->
setInitialDartsColor
(
1.0
f
,
1.0
f
,
1.0
f
);
m_render_topo_primal
->
updateData
<
PFP
>
(
myMap
,
position
,
0.95
f
,
0.85
f
);
m_render_topo_primal
->
updateData
(
myMap
,
position
,
0.95
f
,
0.85
f
);
}
void
SimpleMap3
::
cb_keyPress
(
int
code
)
...
...
Apps/Examples/simpleMap3.h
View file @
13c0da82
...
...
@@ -45,6 +45,7 @@ struct PFP: public PFP_STANDARD
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
PFP
::
VEC3
VEC3
;
class
SimpleMap3
:
public
Utils
::
QT
::
SimpleQT
...
...
@@ -55,11 +56,11 @@ public:
MAP
myMap
;
SelectorTrue
allDarts
;
VertexAttribute
<
VEC3
>
position
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position
;
Algo
::
Render
::
GL2
::
Topo3Render
*
m_render_topo
;
Algo
::
Render
::
GL2
::
TopoRender
*
m_render_topo_boundary
;
Algo
::
Render
::
GL2
::
Topo3PrimalRender
*
m_render_topo_primal
;
Algo
::
Render
::
GL2
::
Topo3Render
Map
<
PFP
>
*
m_render_topo
;
Algo
::
Render
::
GL2
::
TopoRender
Map
<
PFP
>
*
m_render_topo_boundary
;
Algo
::
Render
::
GL2
::
Topo3PrimalRender
<
PFP
>
*
m_render_topo_primal
;
SimpleMap3
()
;
...
...
@@ -69,4 +70,3 @@ public:
void
cb_redraw
()
;
void
cb_keyPress
(
int
code
);
};
Apps/Examples/viewer.cpp
View file @
13c0da82
...
...
@@ -80,7 +80,7 @@ void Viewer::cb_initGL()
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
)
;
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
()
;
m_topoRender
=
new
Algo
::
Render
::
GL2
::
TopoRender
()
;
m_topoRender
=
new
Algo
::
Render
::
GL2
::
TopoRender
Map
<
PFP
>
()
;
m_topoRender
->
setInitialDartsColor
(
0.25
f
,
0.25
f
,
0.25
f
)
;
...
...
@@ -230,7 +230,7 @@ void Viewer::importMesh(std::string& filename)
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
Algo
::
Render
::
GL2
::
LINES
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
Algo
::
Render
::
GL2
::
TRIANGLES
)
;
m_topoRender
->
updateData
<
PFP
>
(
myMap
,
position
,
0.85
f
,
0.85
f
,
m_drawBoundaryTopo
)
;
m_topoRender
->
updateData
(
myMap
,
position
,
0.85
f
,
0.85
f
,
m_drawBoundaryTopo
)
;
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
)
;
normalBaseSize
=
bb
.
diagSize
()
/
100.0
f
;
...
...
@@ -262,7 +262,7 @@ void Viewer::exportMesh(std::string& filename, bool askExportMode)
if
(
askExportMode
)
Utils
::
QT
::
inputValues
(
Utils
::
QT
::
VarCombo
(
"binary mode;ascii mode"
,
ascii
,
"Save in"
))
;
std
::
vector
<
VertexAttribute
<
VEC3
>*>
attributes
;
std
::
vector
<
VertexAttribute
<
VEC3
,
MAP_IMPL
>*>
attributes
;
attributes
.
push_back
(
&
position
)
;
Algo
::
Surface
::
Export
::
exportPLYnew
<
PFP
>
(
myMap
,
attributes
,
filename
.
c_str
(),
!
ascii
)
;
}
...
...
Apps/Examples/viewer.h
View file @
13c0da82
...
...
@@ -64,6 +64,7 @@ struct PFP: public PFP_STANDARD
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
PFP
::
VEC3
VEC3
;
//class Viewer : public Utils::QT::SimpleQT
...
...
@@ -100,11 +101,11 @@ public:
bool
m_drawTopo
;
bool
m_drawBoundaryTopo
;
VertexAttribute
<
VEC3
>
position
;
VertexAttribute
<
VEC3
>
normal
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
normal
;
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Algo
::
Render
::
GL2
::
TopoRender
*
m_topoRender
;
Algo
::
Render
::
GL2
::
TopoRender
Map
<
PFP
>
*
m_topoRender
;
Utils
::
VBO
*
m_positionVBO
;
Utils
::
VBO
*
m_normalVBO
;
...
...
Apps/Examples/volumeExplorer.cpp
View file @
13c0da82
...
...
@@ -122,12 +122,11 @@ void MyQT::slider_released()
{
// SelectorDartNoBoundary<PFP::MAP> nb(myMap);
//TODO MapBrowser
m_topo_render
->
updateData
<
PFP
>
(
myMap
,
position
,
0.8
f
,
m_explode_factorf
-
0.05
f
,
m_explode_factor
);
m_topo_render
->
updateData
(
myMap
,
position
,
0.8
f
,
m_explode_factorf
-
0.05
f
,
m_explode_factor
);
}
updateGL
();
}
void
MyQT
::
cb_Open
()
{
std
::
string
filters
(
"all (*.*)"
)
;
...
...
@@ -210,7 +209,7 @@ void MyQT::cb_initGL()
m_explode_render
=
new
Algo
::
Render
::
GL2
::
ExplodeVolumeRender
(
true
,
true
,
true
);
// SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render
->
updateData
<
PFP
>
(
myMap
,
position
,
0.8
f
,
0.8
f
,
0.8
f
);
m_topo_render
->
updateData
(
myMap
,
position
,
0.8
f
,
0.8
f
,
0.8
f
);
m_explode_render
->
updateData
<
PFP
>
(
myMap
,
position
,
color
);
m_explode_render
->
setExplodeVolumes
(
0.8
f
);
m_explode_render
->
setExplodeFaces
(
0.9
f
);
...
...
Apps/Examples/volumeExplorer.h
View file @
13c0da82
...
...
@@ -95,7 +95,6 @@ class MyQT: public Utils::QT::SimpleQT
Utils
::
ClippingShader
*
m_sh1
;
Utils
::
ClippingShader
*
m_sh2
;
public:
float
m_WidthObj
;
Geom
::
Vec3f
m_PosObj
;
...
...
Apps/SandBox/tilings.cpp
View file @
13c0da82
...
...
@@ -48,11 +48,15 @@ struct PFP: public PFP_STANDARD
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
PFP
::
VEC3
VEC3
;
PFP
::
MAP
myMap
;
VertexAttribute
<
PFP
::
VEC3
>
position
;
VertexAttribute
<
PFP
::
VEC3
>
position2
;
VertexAttribute
<
PFP
::
VEC3
>
normal
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position2
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
normal
;
void
MyQT
::
cb_initGL
()
{
...
...
@@ -71,7 +75,6 @@ void MyQT::cb_initGL()
m_shader
->
setAttributePosition
(
m_positionVBO
);
m_shader
->
setColor
(
Geom
::
Vec4f
(
1.
,
1.
,
0.
,
0.
));
m_lines
=
new
Utils
::
ShaderVectorPerVertex
();
m_lines
->
setAttributePosition
(
m_positionVBO
);
m_lines
->
setAttributeVector
(
m_normalVBO
);
...
...
@@ -87,7 +90,6 @@ void MyQT::cb_initGL()
registerShader
(
m_lines
);
m_normalVBO
->
updateData
(
normal
);
}
void
MyQT
::
cb_redraw
()
...
...
@@ -313,7 +315,6 @@ int main(int argc, char **argv)
sqt
.
triangularTiling
(
atoi
(
argv
[
2
]));
}
// bounding box
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
float
lWidthObj
=
std
::
max
<
PFP
::
REAL
>
(
std
::
max
<
PFP
::
REAL
>
(
bb
.
size
(
0
),
bb
.
size
(
1
)),
bb
.
size
(
2
));
...
...
@@ -327,7 +328,5 @@ int main(int argc, char **argv)
sqt
.
show
();
return
app
.
exec
();
}
Apps/SandBox/tilings.h
View file @
13c0da82
...
...
@@ -44,7 +44,6 @@
#include "Algo/Tiling/Surface/square.h"
#include "Algo/Tiling/Surface/triangular.h"
// forward definitions (minimize includes)
namespace
CGoGN
{
namespace
Algo
{
namespace
Render
{
namespace
GL1
{
class
MapRender
;
}
}
}
}
namespace
CGoGN
{
namespace
Utils
{
class
VBO
;
}
}
...
...
@@ -68,8 +67,6 @@ public:
Utils
::
ShaderSimpleColor
*
m_shader
;
Utils
::
ShaderVectorPerVertex
*
m_lines
;
MyQT
()
:
m_render
(
NULL
),
m_positionVBO
(
NULL
),
...
...
@@ -93,10 +90,6 @@ protected:
void
threadAttrib
();
void
threadStorage
();
};
#endif // TUTO_TILINGS_H
Apps/Tuto/show_traversors.cpp
View file @
13c0da82
...
...
@@ -38,9 +38,9 @@
#include "Algo/Render/GL2/drawerCells.h"
MAP
myMap
;
VertexAttribute
<
VEC3
>
position
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position
;
Dart
dglobal
;
void
MyQT
::
cb_checkTopo
(
bool
b
)
...
...
@@ -112,16 +112,15 @@ void MyQT::cb_explode(int x)
traverse3
();
}
void
MyQT
::
cb_initGL
()
{
// choose to use GL version 2
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
m_render_topo
=
new
Algo
::
Render
::
GL2
::
Topo3Render
();
m_render_topo
=
new
Algo
::
Render
::
GL2
::
Topo3RenderMap
<
PFP
>
();
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
m_dm_topo
=
new
DartMarker
(
myMap
);
m_render_topo
->
updateData
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
m_dm_topo
=
new
DartMarker
<
MAP
>
(
myMap
);
}
void
MyQT
::
cb_redraw
()
...
...
@@ -146,7 +145,7 @@ void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if
(
Shift
())
{
Dart
d
=
m_render_topo
->
picking
<
PFP
>
(
myMap
,
x
,
y
);
Dart
d
=
m_render_topo
->
picking
(
myMap
,
x
,
y
);
if
(
d
!=
Dart
::
nil
())
{
CGoGNout
<<
"Dart "
<<
d
<<
" clicked"
<<
CGoGNendl
;
...
...
@@ -163,7 +162,6 @@ void MyQT::cb_Save()
std
::
string
filename1
=
filename
+
std
::
string
(
"Drawer"
)
+
std
::
string
(
".svg"
);
std
::
string
filename2
=
filename
+
std
::
string
(
"Topo"
)
+
std
::
string
(
".svg"
);
// std::string filename = selectFileSave("Export SVG file ",".","(*.svg)");
// Utils::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix());
// m_drawer.toSVG(svg);
...
...
@@ -188,12 +186,7 @@ void MyQT::cb_Save()
// anim.add(&svg1);
// anim.add(&svg2);
// anim.write(filename, 2.0f);
}
template
<
unsigned
int
ORBIT
>
...
...
@@ -240,13 +233,11 @@ void MyQT::traverse2()
m_drawer
.
endList
();
// SelectorMarked sm(*m_dm_topo);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
m_render_topo
->
updateData
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
updateGL
();
}
void
MyQT
::
dynamicMarkOrbit
(
unsigned
int
orb
)
{
switch
(
orb
)
...
...
@@ -300,7 +291,7 @@ void MyQT::traverse3()
Algo
::
Render
::
drawerCells
<
PFP
>
(
VERTEX
+
m_first3
,
m_drawer
,
myMap
,
m_affDarts
,
position
,
m_expl
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
//sm
m_render_topo
->
updateData
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
//sm
for
(
std
::
vector
<
Dart
>::
iterator
id
=
m_affDarts
.
begin
();
id
!=
m_affDarts
.
end
();
++
id
)
m_render_topo
->
setDartColor
(
*
id
,
0.7
f
,
0.0
f
,
0.0
f
);
...
...
@@ -321,7 +312,7 @@ void MyQT::traverse3()
Algo
::
Render
::
drawerCells
<
PFP
>
(
VERTEX
+
m_first3
,
m_drawer
,
myMap
,
m_affDarts
,
position
,
m_expl
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
//sm
m_render_topo
->
updateData
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
);
//sm
for
(
std
::
vector
<
Dart
>::
iterator
id
=
m_affDarts
.
begin
();
id
!=
m_affDarts
.
end
();
++
id
)
m_render_topo
->
setDartColor
(
*
id
,
0.7
f
,
0.0
f
,
0.0
f
);
m_render_topo
->
setDartColor
(
m_selected
,
0.0
f
,
0.7
f
,
0.0
f
);
...
...
Apps/Tuto/show_traversors.h
View file @
13c0da82
...
...
@@ -24,17 +24,10 @@
#ifndef __SHOW_TRAVERSORS_
#define __SHOW_TRAVERSORS_
#include <iostream>
//#define WITH_GMAP 1
#include "Topology/generic/parameters.h"
#ifdef WITH_GMAP
#include "Topology/gmap/embeddedGMap3.h"
#else
#include "Topology/map/embeddedMap3.h"
#endif
#include "Topology/map/embeddedMap3.h"
#include "Geometry/vector_gen.h"
#include "Algo/Geometry/boundingbox.h"
...
...
@@ -51,7 +44,6 @@
#include "Utils/cgognStream.h"
#include "Utils/drawer.h"
#include "Utils/Qt/qtSimple.h"
#include "ui_show_traversors.h"
...
...
@@ -64,17 +56,13 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition de la carte
#ifdef WITH_GMAP
typedef
EmbeddedGMap3
MAP
;
#else
typedef
EmbeddedMap3
MAP
;
#endif
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
PFP
::
VEC3
VEC3
;
/**
* Utilisation de designer-qt4:
* Faire un DockWiget (laisser le nom par defaut
...
...
@@ -86,7 +74,7 @@ class MyQT: public Utils::QT::SimpleQT
{
Q_OBJECT
Algo
::
Render
::
GL2
::
Topo3Render
*
m_render_topo
;
Algo
::
Render
::
GL2
::
Topo3Render
Map
<
PFP
>
*
m_render_topo
;
bool
m_showTopo
;
unsigned
int
m_first3
;
...
...
@@ -118,7 +106,7 @@ public:
Utils
::
Drawer
m_drawer
;
DartMarker
*
m_dm_topo
;
DartMarker
<
MAP
>
*
m_dm_topo
;
protected:
void
storeVerticesInfo
();
...
...
Apps/Tuto/tuto1.cpp
View file @
13c0da82
...
...
@@ -93,13 +93,13 @@ void MyQT::createMap()
// render the topo of the map without boundary darts
m_render_topo
->
setInitialBoundaryDartsColor
(
0
,
1
,
0
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
,
true
);
m_render_topo
->
updateData
(
myMap
,
position
,
0.9
f
,
0.9
f
,
true
);
}
// initialization GL callback
void
MyQT
::
cb_initGL
()
{
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRender
()
;
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRender
Map
<
PFP
>
()
;
}
// redraw GL callback (clear and swap already done)
...
...
Apps/Tuto/tuto1.h
View file @
13c0da82
...
...
@@ -32,12 +32,7 @@
#include "Utils/cgognStream.h"
#include "Topology/generic/parameters.h"
#ifdef USE_GMAP
#include "Topology/gmap/embeddedGMap2.h"
#else
#include "Topology/map/embeddedMap2.h"
#endif
#include "Topology/map/embeddedMap2.h"
#include "Algo/Render/GL2/topoRender.h"
...
...
@@ -50,21 +45,18 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the type of the map
#ifdef USE_GMAP
typedef
EmbeddedGMap2
MAP
;
#else
typedef
EmbeddedMap2
MAP
;
#endif
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
PFP
::
VEC3
VEC3
;
class
MyQT
:
public
Utils
::
QT
::
SimpleQGLV
{
Q_OBJECT
public:
MyQT
()
:
m_render_topo
(
NULL
)
{}
MyQT
()
:
m_render_topo
(
NULL
)
{}
void
cb_redraw
();
void
cb_initGL
();
...
...
@@ -75,10 +67,10 @@ protected:
MAP
myMap
;
// attribute for vertices positions
VertexAttribute
<
VEC3
>
position
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position
;
// render (for the topo)
Algo
::
Render
::
GL2
::
TopoRender
*
m_render_topo
;
Algo
::
Render
::
GL2
::
TopoRender
Map
<
PFP
>
*
m_render_topo
;
// just for more compact writing
inline
Dart
PHI1
(
Dart
d
)
{
return
myMap
.
phi1
(
d
);
}
...
...
Apps/Tuto/tuto2.cpp
View file @
13c0da82
...
...
@@ -27,7 +27,6 @@
using
namespace
CGoGN
;
int
main
(
int
argc
,
char
**
argv
)
{
// // interface
...
...
@@ -53,7 +52,7 @@ void MyQT::createMap()
Dart
d1
=
myMap
.
newFace
(
3
);
Dart
d2
=
myMap
.
newFace
(
4
);
myMap
.
sewFaces
(
d1
,
d2
);
VertexAttribute
<
VEC3
>
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"position"
);
VertexAttribute
<
VEC3
,
MAP_IMPL
>
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"position"
);
position
[
d1
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
position
[
PHI1
(
d1
)]
=
PFP
::
VEC3
(
2
,
0
,
0
);
position
[
PHI_1
(
d1
)]
=
PFP
::
VEC3
(
1
,
2
,
0
);
...
...
@@ -61,7 +60,7 @@ void MyQT::createMap()
position
[
PHI_1
(
d2
)]
=
PFP
::
VEC3
(
2
,
-
2
,
0
);
// create another attribute on vertices (for faces drawing)
VertexAttribute
<
VEC3
>
colorF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"colorF"
);
VertexAttribute
<
VEC3
,
MAP_IMPL
>
colorF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"colorF"
);
colorF
[
d1
]
=
Geom
::
Vec3f
(
1.0
f
,
0.0
f
,
0.0
f
);
colorF
[
PHI1
(
d1
)]
=
Geom
::
Vec3f
(
0.0
f
,
1.0
f
,
0.0
f
);
...
...
@@ -70,7 +69,7 @@ void MyQT::createMap()
colorF
[
PHI_1
(
d2
)]
=
Geom
::
Vec3f
(
0.0
f
,
1.0
f
,
1.0
f
);
// create another attribute on vertices (for edges drawing)
VertexAttribute
<
VEC3
>
colorE
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"colorE"
);
VertexAttribute
<
VEC3
,
MAP_IMPL
>
colorE
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"colorE"
);
colorE
[
d1
]
=
Geom
::
Vec3f
(
0.0
f
,
0.5
f
,
0.5
f
);
colorE
[
PHI1
(
d1
)]
=
Geom
::
Vec3f
(
0.5
f
,
0.0
f
,
0.5
f
);
...
...
@@ -80,7 +79,7 @@ void MyQT::createMap()
// example of attribute on face
// here for example we store the number of edges of faces at construction
FaceAttribute
<
int
>
side
=
myMap
.
addAttribute
<
int
,
FACE
>
(
"nb_sides"
);
FaceAttribute
<
int
,
MAP_IMPL
>
side
=
myMap
.
addAttribute
<
int
,
FACE
>
(
"nb_sides"
);
side
[
d1
]
=
3
;
side
[
d2
]
=
4
;
...
...
Apps/Tuto/tuto2.h
View file @
13c0da82
...
...
@@ -27,7 +27,6 @@
//#define USE_GMAP
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
#include "Topology/generic/parameters.h"
...
...
@@ -61,9 +60,9 @@ struct PFP: public PFP_STANDARD
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
MAP
::
IMPL
MAP_IMPL
;
typedef
PFP
::
VEC3
VEC3
;
class
MyQT
:
public
Utils
::
QT
::
SimpleQT
{
Q_OBJECT
...
...
Apps/Tuto/tuto3.cpp
View file @
13c0da82
...
...
@@ -29,7 +29,6 @@
using
namespace
CGoGN
;
int
main
(
int
argc
,
char
**
argv
)
{
// // interface
...
...
@@ -48,8 +47,7 @@ int main(int argc, char **argv)
// final show for redraw
sqt
.
show
();
CGoGNout
<<
"You can pick darts dans see it's id with left mouse button"
<<
CGoGNendl
;
CGoGNout
<<
"You can pick darts and see its id with left mouse button"
<<
CGoGNendl
;
// and wait for the end
return
app
.
exec
();
...
...
@@ -57,12 +55,11 @@ int main(int argc, char **argv)
Dart
xd1
;
void
MyQT
::
traverseMap
()
{
DartMarker
m1
(
myMap
);
DartMarker
m2
(
myMap
);
myMap
.
rdfi
(
myMap
.
begin
(),
m1
,
m2
);
DartMarker
<
MAP
>
m1
(
myMap
);
DartMarker
<
MAP
>
m2
(
myMap
);
//
myMap.rdfi(myMap.begin(),m1,m2);
m1
.
unmarkAll
();
...
...
@@ -70,7 +67,7 @@ void MyQT::traverseMap()
// render the topo of the map without boundary darts
// SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
);
// nb
m_render_topo
->
updateData
(
myMap
,
position
,
0.9
f
,
0.9
f
);
// nb
for
(
Dart
d
=
myMap
.
begin
();
d
!=
myMap
.
end
();
myMap
.
next
(
d
))
{
...
...
@@ -201,13 +198,13 @@ void MyQT::createMap()
// render the topo of the map without boundary darts
// SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
);
// nb
m_render_topo
->
updateData
(
myMap
,
position
,
0.9
f
,
0.9
f
);
// nb
}
// initialization GL callback
void
MyQT
::
cb_initGL
()
{
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRender
();
m_render_topo
=
new
Algo
::
Render
::
GL2
::
TopoRenderMap
<
PFP
>
();
}
// redraw GL callback (clear and swap already done)
...
...
@@ -223,11 +220,10 @@ void MyQT::cb_mouseClick(int button, int x, int y)
{
if
(
button
==
Qt
::
LeftButton
)