Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
CGoGN
Commits
e4ade02b
Commit
e4ade02b
authored
Mar 27, 2012
by
untereiner
Browse files
Merge cgogn:~thery/CGoGN
parents
299c8b13
66a2f45a
Changes
22
Hide whitespace changes
Inline
Side-by-side
Apps/Examples/Debug/CMakeLists.txt
View file @
e4ade02b
...
...
@@ -77,4 +77,11 @@ QT4_WRAP_UI( volumeExplorer_ui ../volumeExplorer.ui )
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
}
)
\ No newline at end of file
${
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
}
)
Apps/Examples/Release/CMakeLists.txt
View file @
e4ade02b
...
...
@@ -70,4 +70,12 @@ 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
}
)
\ No newline at end of file
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
}
)
Apps/Examples/mcmesh.cpp
0 → 100644
View file @
e4ade02b
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: https://iggservis.u-strasbg.fr/CGoGN/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include
"mcmesh.h"
MCMesh
::
MCMesh
()
:
m_drawEdges
(
true
),
m_drawFaces
(
true
),
m_render
(
NULL
),
m_flatShader
(
NULL
),
m_simpleColorShader
(
NULL
)
{
}
void
MCMesh
::
initGUI
()
{
setDock
(
&
dock
);
dock
.
check_drawEdges
->
setChecked
(
true
);
dock
.
check_drawFaces
->
setChecked
(
true
);
setCallBack
(
dock
.
check_drawEdges
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
slot_drawEdges
(
bool
))
);
setCallBack
(
dock
.
check_drawFaces
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
slot_drawFaces
(
bool
))
);
}
void
MCMesh
::
cb_initGL
()
{
Geom
::
Vec4f
colClear
(
0.2
f
,
0.2
f
,
0.2
f
,
0.1
f
);
Geom
::
Vec4f
colDif
(
0.8
f
,
0.9
f
,
0.7
f
,
1.0
f
);
Geom
::
Vec4f
colSpec
(
0.9
f
,
0.9
f
,
0.9
f
,
1.0
f
);
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
();
m_positionVBO
=
new
Utils
::
VBO
();
m_flatShader
=
new
Utils
::
ShaderFlat
();
m_flatShader
->
setAttributePosition
(
m_positionVBO
);
m_flatShader
->
setAmbiant
(
colClear
);
m_flatShader
->
setDiffuse
(
colDif
);
m_flatShader
->
setExplode
(
1.0
f
);
m_simpleColorShader
=
new
Utils
::
ShaderSimpleColor
();
m_simpleColorShader
->
setAttributePosition
(
m_positionVBO
);
registerShader
(
m_flatShader
);
registerShader
(
m_simpleColorShader
);
}
void
MCMesh
::
cb_redraw
()
{
if
(
m_drawEdges
)
{
glLineWidth
(
1.0
f
);
if
(
m_drawFaces
)
{
Geom
::
Vec4f
c
(
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
);
m_simpleColorShader
->
setColor
(
c
);
}
else
{
Geom
::
Vec4f
c
(
1.0
f
,
1.0
f
,
0.0
f
,
0.0
f
);
m_simpleColorShader
->
setColor
(
c
);
}
m_render
->
draw
(
m_simpleColorShader
,
Algo
::
Render
::
GL2
::
LINES
);
}
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
glEnable
(
GL_LIGHTING
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
glPolygonOffset
(
1.0
f
,
1.0
f
);
if
(
m_drawFaces
)
{
m_flatShader
->
setExplode
(
1.0
f
);
m_render
->
draw
(
m_flatShader
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
}
else
{
if
(
m_drawEdges
)
{
Geom
::
Vec4f
c
(
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
);
m_simpleColorShader
->
setColor
(
c
);
m_render
->
draw
(
m_simpleColorShader
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
}
}
glDisable
(
GL_POLYGON_OFFSET_FILL
);
}
void
MCMesh
::
cb_Open
()
{
// std::string filters("all (*.*);; trian (*.trian);; ctm (*.ctm);; off (*.off);; ply (*.ply)");
// std::string filename = selectFile("Open Mesh", "", filters);
// if (filename.empty())
// return;
//
// updateGL();
}
void
MCMesh
::
slot_drawEdges
(
bool
b
)
{
m_drawEdges
=
b
;
updateGL
();
}
void
MCMesh
::
slot_drawFaces
(
bool
b
)
{
m_drawFaces
=
b
;
updateGL
();
}
void
MCMesh
::
MC
()
{
myMap
.
clear
(
false
);
// elargir l'image pour le calcul de la courbure
Algo
::
MC
::
Image
<
DATATYPE
>*
myImgFr
=
myImg
->
addFrame
(
1
);
Algo
::
MC
::
WindowingGreater
<
DATATYPE
>
myWindFunc
;
myWindFunc
.
setIsoValue
(
DATATYPE
(
127
));
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
if
(
!
position
.
isValid
())
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
// instanciation du mc
Algo
::
MC
::
MarchingCube
<
DATATYPE
,
Algo
::
MC
::
WindowingGreater
,
PFP
>
mc
(
myImgFr
,
&
myMap
,
position
,
myWindFunc
,
false
);
mc
.
simpleMeshing
();
delete
myImgFr
;
updateRender
();
updateGL
();
}
void
MCMesh
::
updateRender
()
{
SelectorDartNoBoundary
<
PFP
::
MAP
>
nb
(
myMap
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
nb
,
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
nb
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_positionVBO
->
updateData
(
position
);
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
setParamObject
(
bb
.
maxSize
(),
bb
.
center
().
data
());
updateGLMatrices
();
}
void
MCMesh
::
fromFile
(
char
*
fname
)
{
myImg
=
new
Algo
::
MC
::
Image
<
DATATYPE
>
();
myImg
->
loadInrgz
(
fname
);
CGoGNout
<<
"Image chargee"
<<
CGoGNendl
;
CGoGNout
<<
myImg
->
getWidthX
()
<<
"x"
<<
myImg
->
getWidthY
()
<<
"x"
<<
myImg
->
getWidthZ
()
<<
"voxels"
<<
CGoGNendl
;
}
void
MCMesh
::
sphere
()
{
DATATYPE
*
img
=
new
DATATYPE
[
128
*
128
*
128
];
DATATYPE
*
ptr
=
img
;
for
(
int
x
=
0
;
x
<
128
;
++
x
)
for
(
int
y
=
0
;
y
<
128
;
++
y
)
for
(
int
z
=
0
;
z
<
128
;
++
z
)
{
Geom
::
Vec3f
V
(
x
-
64
,
y
-
64
,
z
-
64
);
if
(
V
.
norm
()
<
30
)
*
ptr
++
=
255
;
else
*
ptr
++
=
0
;
}
myImg
=
new
Algo
::
MC
::
Image
<
DATATYPE
>
(
img
,
128
,
128
,
128
,
1.0
f
,
1.0
f
,
1.0
f
,
false
);
}
/**********************************************************************************************
* MAIN FUNCTION *
**********************************************************************************************/
int
main
(
int
argc
,
char
**
argv
)
{
QApplication
app
(
argc
,
argv
);
MCMesh
sqt
;
sqt
.
setGeometry
(
0
,
0
,
1000
,
800
);
sqt
.
show
();
sqt
.
valLabel
=
DATATYPE
(
0
);
if
(
argc
==
2
)
{
sqt
.
fromFile
(
argv
[
1
]);
}
else
{
sqt
.
sphere
();
}
sqt
.
initGUI
();
sqt
.
show
();
sqt
.
MC
();
return
app
.
exec
();
}
Apps/Examples/mcmesh.h
0 → 100644
View file @
e4ade02b
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: https://iggservis.u-strasbg.fr/CGoGN/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include
<iostream>
#include
"Utils/Qt/qtSimple.h"
#include
"ui_mcmesh.h"
#include
"Utils/Qt/qtui.h"
#include
"Topology/generic/parameters.h"
#include
"Topology/map/map2.h"
#include
"Topology/map/embeddedMap2.h"
#include
"Geometry/vector_gen.h"
#include
"Geometry/matrix.h"
#include
"Algo/Render/GL2/mapRender.h"
#include
"Utils/Shaders/shaderFlat.h"
#include
"Utils/Shaders/shaderSimpleColor.h"
#include
"Algo/Geometry/boundingbox.h"
#include
"Algo/MC/marchingcube.h"
using
namespace
CGoGN
;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
unsigned
char
DATATYPE
;
class
MCMesh
:
public
Utils
::
QT
::
SimpleQT
{
Q_OBJECT
public:
MAP
myMap
;
SelectorTrue
allDarts
;
Utils
::
QT
::
uiDockInterface
dock
;
float
shininess
;
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
;
bool
m_drawEdges
;
bool
m_drawFaces
;
PFP
::
TVEC3
position
;
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Utils
::
VBO
*
m_positionVBO
;
Utils
::
ShaderFlat
*
m_flatShader
;
Utils
::
ShaderSimpleColor
*
m_simpleColorShader
;
DATATYPE
valLabel
;
Algo
::
MC
::
Image
<
DATATYPE
>*
myImg
;
MCMesh
()
;
void
initGUI
();
void
updateRender
();
void
MC
();
void
cb_initGL
()
;
void
cb_redraw
()
;
void
cb_Open
()
;
void
fromFile
(
char
*
fname
);
void
sphere
();
public
slots
:
void
slot_drawEdges
(
bool
b
)
;
void
slot_drawFaces
(
bool
b
)
;
};
Apps/Examples/mcmesh.ui
0 → 100644
View file @
e4ade02b
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
DockWidget
</class>
<widget
class=
"QDockWidget"
name=
"DockWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
134
</width>
<height>
513
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
DockWidget
</string>
</property>
<widget
class=
"QWidget"
name=
"dockWidgetContents"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"check_drawEdges"
>
<property
name=
"text"
>
<string>
draw edges
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"check_drawFaces"
>
<property
name=
"text"
>
<string>
draw faces
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
2
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>
Apps/Examples/volumeExplorer.cpp
View file @
e4ade02b
...
...
@@ -354,7 +354,7 @@ int main(int argc, char **argv)
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim
(
myMap
,
position
);
int
nb
=
32
;
int
nb
=
8
;
prim
.
hexaGrid_topo
(
nb
,
nb
,
nb
);
prim
.
embedHexaGrid
(
1.0
f
,
1.0
f
,
1.0
f
);
...
...
Apps/Tuto/CMakeLists.txt
View file @
e4ade02b
...
...
@@ -58,6 +58,13 @@ QT4_WRAP_CPP(tuto_oper2_moc tuto_oper2.h)
add_executable
(
tuto_oper2 tuto_oper2.cpp
${
tuto_oper2_ui
}
${
tuto_oper2_moc
}
)
target_link_libraries
(
tuto_oper2
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
tuto_oper3_ui tuto_oper3.ui
)
QT4_WRAP_CPP
(
tuto_oper3_moc tuto_oper3.h
)
add_executable
(
tuto_oper3 tuto_oper3.cpp
${
tuto_oper3_ui
}
${
tuto_oper3_moc
}
)
target_link_libraries
(
tuto_oper3
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
tuto_orbits_ui tuto_orbits.ui
)
QT4_WRAP_CPP
(
tuto_orbits_moc tuto_orbits.h
)
...
...
Apps/Tuto/show_traversors.cpp
View file @
e4ade02b
...
...
@@ -125,6 +125,7 @@ void MyQT::cb_initGL()
SelectorDartNoBoundary
<
PFP
::
MAP
>
nb
(
myMap
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
position
,
0.95
f
,
0.9
f
,
0.8
f
,
nb
);
m_dm_topo
=
new
DartMarker
(
myMap
);
}
...
...
@@ -135,8 +136,8 @@ void MyQT::cb_redraw()
m_render_topo
->
drawTopo
();
if
(
m_selected
!=
NIL
)
m_render_topo
->
overdrawDart
(
m_selected
,
6
,
1.0
f
,
0.0
f
,
1.0
f
);
m_render_topo
->
overdrawDart
(
m_selected
,
7
,
1.0
f
,
0.0
f
,
1.0
f
);
for
(
std
::
vector
<
Dart
>::
iterator
it
=
m_affDarts
.
begin
();
it
!=
m_affDarts
.
end
();
++
it
)
{
m_render_topo
->
overdrawDart
(
*
it
,
6
,
1.0
f
,
1.0
f
,
1.0
f
);
...
...
@@ -165,9 +166,33 @@ void MyQT::cb_mousePress(int button, int x, int y)
void
MyQT
::
cb_Save
()
{
// std::string filename = selectFileSave("Export SVG file ",".","(*.svg)");
// Utils::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix());
// m_drawer.toSVG(svg);
// m_render_topo->toSVG(svg);
Utils
::
SVG
::
SVGOut
svg1
(
modelViewMatrix
(),
projectionMatrix
());
m_drawer
.
toSVG
(
svg1
);
svg1
.
addOpacityAnimation
(
1.0
f
);
svg1
.
addOpacityAnimation
(
1.0
f
);
svg1
.
addOpacityAnimation
(
0.0
f
);
Utils
::
SVG
::
SVGOut
svg2
(
modelViewMatrix
(),
projectionMatrix
());
m_render_topo
->
toSVG
(
svg2
);
svg2
.
addOpacityAnimation
(
1.0
f
);
svg2
.
addOpacityAnimation
(
0.0
f
);
svg2
.
addOpacityAnimation
(
1.0
f
);
Utils
::
SVG
::
AnimatedSVGOut
anim
;
anim
.
add
(
&
svg1
);
anim
.
add
(
&
svg2
);
std
::
string
filename
=
selectFileSave
(
"Export SVG file "
,
"."
,
"(*.svg)"
);
Utils
::
SVG
::
SVGOut
svg
(
filename
,
modelViewMatrix
(),
projectionMatrix
());
m_drawer
.
toSVG
(
svg
);
anim
.
write
(
filename
,
2.0
f
);
}
void
MyQT
::
colorizeCell
(
Dart
d
,
unsigned
int
orbit
,
float
r
,
float
g
,
float
b
)
...
...
@@ -187,8 +212,8 @@ void MyQT::traverse2()
SelectorDartNoBoundary
<
PFP
::
MAP
>
nb
(
myMap
);
m_drawer
.
newList
(
GL_COMPILE
);
m_drawer
.
lineWidth
(
3
.0
f
);
m_drawer
.
pointSize
(
7
.0
f
);
m_drawer
.
lineWidth
(
7
.0
f
);
m_drawer
.
pointSize
(
9
.0
f
);
m_drawer
.
color3f
(
0.0
f
,
0.7
f
,
0.0
f
);
m_affDarts
.
clear
();
...
...
@@ -216,6 +241,10 @@ 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
,
sm
);
updateGL
();
}
...
...
@@ -232,30 +261,55 @@ void MyQT::traverse3()
m_affDarts
.
clear
();
m_drawer
.
newList
(
GL_COMPILE
);
m_drawer
.
lineWidth
(
3
.0
f
);
m_drawer
.
pointSize
(
7
.0
f
);
m_drawer
.
lineWidth
(
7
.0
f
);
m_drawer
.
pointSize
(
9
.0
f
);
m_drawer
.
color3f
(
0.0
f
,
0.7
f
,
0.0
f
);
m_dm_topo
->
unmarkAll
();
SelectorMarked
sm
(
*
m_dm_topo
);
if
(
m_ajd_or_inci3
==
0
)
// incident
{
Algo
::
Render
::
drawerCell
<
PFP
>
(
VERTEX
+
m_second3
,
m_drawer
,
myMap
,
m_selected
,
position
,
m_expl
);
m_dm_topo
->
markOrbit
(
VERTEX
+
m_second3
,
m_selected
);
m_drawer
.
color3f
(
1.0
f
,
0.0
f
,
0.0
f
);
Traversor3XY
<
PFP
::
MAP
>
tra
(
myMap
,
m_selected
,
VERTEX
+
m_second3
,
VERTEX
+
m_first3
);
for
(
Dart
d
=
tra
.
begin
();
d
!=
tra
.
end
();
d
=
tra
.
next
())
m_affDarts
.
push_back
(
d
);
{
m_affDarts
.
push_back
(
d
);
m_dm_topo
->
markOrbit
(
VERTEX
+
m_first3
,
d
);
}
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
);
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
);
}
else
// adjacent
{
Algo
::
Render
::
drawerCell
<
PFP
>
(
VERTEX
+
m_first3
,
m_drawer
,
myMap
,
m_selected
,
position
,
m_expl
);
m_dm_topo
->
markOrbit
(
VERTEX
+
m_first3
,
m_selected
);
m_drawer
.
color3f
(
1.0
f
,
0.0
f
,
0.0
f
);
Traversor3XXaY
<
PFP
::
MAP
>
tra
(
myMap
,
m_selected
,
VERTEX
+
m_first3
,
VERTEX
+
m_second3
);
for
(
Dart
d
=
tra
.
begin
();
d
!=
tra
.
end
();
d
=
tra
.
next
())
m_affDarts
.
push_back
(
d
);
{
m_affDarts
.
push_back
(
d
);
m_dm_topo
->
markOrbit
(
VERTEX
+
m_first3
,
d
);
}
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
);
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
);
}
m_drawer
.
endList
();
updateGL
();
}
...
...
Apps/Tuto/show_traversors.h
View file @
e4ade02b
...
...
@@ -110,7 +110,8 @@ public:
m_second2
(
1
),
m_expl
(
0.8
f
),
m_last
(
2
),
m_selected
(
NIL
)
m_selected
(
NIL
),
m_dm_topo
(
NULL
)
{}
...
...
@@ -119,6 +120,8 @@ public:
Utils
::
Drawer
m_drawer
;
DartMarker
*
m_dm_topo
;
protected:
void
storeVerticesInfo
();
...
...
Apps/Tuto/tuto_oper3.cpp
0 → 100644
View file @
e4ade02b
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *