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
0cc54bd5
Commit
0cc54bd5
authored
Dec 07, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
everything seems OK for now..
parent
57a22f4b
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
623 additions
and
614 deletions
+623
-614
Apps/Tuto/tuto5.cpp
Apps/Tuto/tuto5.cpp
+193
-198
Apps/Tuto/tuto5.h
Apps/Tuto/tuto5.h
+27
-27
include/Topology/gmap/embeddedGMap3.h
include/Topology/gmap/embeddedGMap3.h
+28
-30
include/Topology/gmap/gmap1.h
include/Topology/gmap/gmap1.h
+5
-0
include/Topology/gmap/gmap1.hpp
include/Topology/gmap/gmap1.hpp
+25
-7
include/Topology/gmap/gmap3.h
include/Topology/gmap/gmap3.h
+2
-2
include/Topology/map/embeddedMap3.h
include/Topology/map/embeddedMap3.h
+0
-1
include/Topology/map/map1.h
include/Topology/map/map1.h
+5
-0
include/Topology/map/map1.hpp
include/Topology/map/map1.hpp
+7
-0
src/Topology/gmap/embeddedGMap2.cpp
src/Topology/gmap/embeddedGMap2.cpp
+11
-7
src/Topology/gmap/embeddedGMap3.cpp
src/Topology/gmap/embeddedGMap3.cpp
+247
-290
src/Topology/gmap/gmap2.cpp
src/Topology/gmap/gmap2.cpp
+22
-12
src/Topology/gmap/gmap3.cpp
src/Topology/gmap/gmap3.cpp
+20
-5
src/Topology/map/embeddedMap2.cpp
src/Topology/map/embeddedMap2.cpp
+1
-1
src/Topology/map/embeddedMap3.cpp
src/Topology/map/embeddedMap3.cpp
+27
-28
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+3
-6
No files found.
Apps/Tuto/tuto5.cpp
View file @
0cc54bd5
...
...
@@ -39,6 +39,8 @@
#include "Algo/Modelisation/polyhedron.h"
#include "Algo/Modelisation/subdivision.h"
#include "Algo/Render/GL1/map_glRender.h"
#include "Algo/Render/GL1/topo_render.h"
#include "Algo/Render/GL2/topo3Render.h"
#include "Topology/generic/cellmarker.h"
...
...
@@ -63,27 +65,26 @@ PFP::MAP myMap;
PFP
::
TVEC3
position
;
Dart
dglobal
;
void
MyQT
::
balls_onoff
(
bool
x
)
{
render_balls
=
!
render_balls
;
updateGL
();
CGoGNerr
<<
" balls_onoff "
<<
CGoGNendl
;
}
void
MyQT
::
vectors_onoff
(
bool
x
)
{
render_vectors
=
!
render_vectors
;
updateGL
();
CGoGNerr
<<
" vectors_onoff "
<<
CGoGNflush
;
}
void
MyQT
::
text_onoff
(
bool
x
)
{
render_text
=
!
render_text
;
updateGL
();
CGoGNerr
<<
" text_onoff "
<<
CGoGNflush
;
}
//void MyQT::balls_onoff(bool x)
//{
// render_balls = !render_balls;
// updateGL();
// CGoGNerr << " balls_onoff "<< CGoGNendl;
//}
//
//void MyQT::vectors_onoff(bool x)
//{
// render_vectors = !render_vectors;
// updateGL();
// CGoGNerr << " vectors_onoff "<< CGoGNflush;
//}
//
//void MyQT::text_onoff(bool x)
//{
// render_text = !render_text;
// updateGL();
// CGoGNerr << " text_onoff " << CGoGNflush;
//}
void
MyQT
::
topo_onoff
(
bool
x
)
{
...
...
@@ -92,25 +93,23 @@ void MyQT::topo_onoff(bool x)
CGoGNerr
<<
" topo_onoff "
<<
CGoGNflush
;
}
void
MyQT
::
slider_balls
(
int
x
)
{
m_sprite
->
setSize
(
0.05
f
*
x
);
updateGL
();
}
void
MyQT
::
slider_vectors
(
int
x
)
{
m_lines
->
setScale
(
0.02
*
x
);
updateGL
();
}
void
MyQT
::
slider_text
(
int
x
)
{
m_strings
->
setScale
(
0.02
f
*
x
);
updateGL
();
}
//void MyQT::slider_balls(int x)
//{
// m_sprite->setSize(0.05f*x);
// updateGL();
//}
//
//void MyQT::slider_vectors(int x)
//{
// m_lines->setScale(0.02*x);
// updateGL();
//}
//
//void MyQT::slider_text(int x)
//{
// m_strings->setScale(0.02f*x);
// updateGL();
//}
void
MyQT
::
animate
()
{
...
...
@@ -119,77 +118,76 @@ void MyQT::animate()
updateGLMatrices
();
}
void
MyQT
::
storeVerticesInfo
()
{
CellMarker
mv
(
myMap
,
VERTEX
);
for
(
Dart
d
=
myMap
.
begin
();
d
!=
myMap
.
end
();
myMap
.
next
(
d
))
{
if
(
!
mv
.
isMarked
(
d
))
{
mv
.
mark
(
d
);
std
::
stringstream
ss
;
ss
<<
d
<<
" : "
<<
position
[
d
];
m_strings
->
addString
(
ss
.
str
(),
position
[
d
]);
}
}
}
//void MyQT::storeVerticesInfo()
//{
//
// CellMarker mv(myMap,VERTEX);
// for (Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
// {
// if (!mv.isMarked(d))
// {
// mv.mark(d);
// std::stringstream ss;
// ss << d << " : "<< position[d];
// m_strings->addString(ss.str(),position[d]);
// }
// }
//}
void
MyQT
::
cb_initGL
()
{
// choose to use GL version 2
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
// create the render
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
();
m_render_topo
=
new
Algo
::
Render
::
GL2
::
Topo3RenderMapD
();
// create VBO for position
m_positionVBO
=
new
Utils
::
VBO
();
m_positionVBO
->
updateData
(
position
);
// using simple shader with color
m_shader
=
new
Utils
::
ShaderSimpleColor
();
m_shader
->
setAttributePosition
(
m_positionVBO
);
m_shader
->
setColor
(
Geom
::
Vec4f
(
0.
,
1.
,
0.
,
0.
));
m_sprite
=
new
Utils
::
PointSprite
();
m_sprite
->
setAttributePosition
(
m_positionVBO
);
m_strings
=
new
Utils
::
Strings3D
(
true
,
Geom
::
Vec3f
(
0.1
f
,
0.0
f
,
0.3
f
));
storeVerticesInfo
();
m_strings
->
sendToVBO
();
// copy de contenu de VBO a la creation
m_dataVBO
=
new
Utils
::
VBO
(
*
m_positionVBO
);
m_lines
=
new
Utils
::
ShaderVectorPerVertex
();
m_lines
->
setAttributePosition
(
m_positionVBO
);
m_lines
->
setAttributeVector
(
m_dataVBO
);
m_lines
->
setScale
(
0.2
f
);
m_lines
->
setColor
(
Geom
::
Vec4f
(
0.0
f
,
1.0
f
,
0.2
f
,
0.0
f
));
// accede au buffer du VBO pour modification
PFP
::
VEC3
*
data
=
static_cast
<
PFP
::
VEC3
*>
(
m_dataVBO
->
lockPtr
());
for
(
unsigned
int
i
=
0
;
i
<
m_dataVBO
->
nbElts
();
++
i
)
{
data
[
i
].
normalize
();
}
m_dataVBO
->
releasePtr
();
registerShader
(
m_shader
);
registerShader
(
m_strings
);
registerShader
(
m_sprite
);
registerShader
(
m_lines
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
POINTS
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
allDarts
,
position
,
0.9
f
,
0.9
f
,
0.9
f
);
// Utils::GLSLShader::setCurrentOGLVersion(2);
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
1
)
;
// // create the render
// m_render = new Algo::Render::GL2::MapRender();
//
// m_render_topo = new Algo::Render::GL2::Topo3RenderMapD();
//
// // create VBO for position
// m_positionVBO = new Utils::VBO();
// m_positionVBO->updateData(position);
//
// // using simple shader with color
// m_shader = new Utils::ShaderSimpleColor();
// m_shader->setAttributePosition(m_positionVBO);
// m_shader->setColor(Geom::Vec4f(0.,1.,0.,0.));
//
// m_sprite = new Utils::PointSprite();
// m_sprite->setAttributePosition(m_positionVBO);
//
// m_strings = new Utils::Strings3D(true, Geom::Vec3f(0.1f,0.0f,0.3f));
// storeVerticesInfo();
// m_strings->sendToVBO();
//
// // copy de contenu de VBO a la creation
// m_dataVBO = new Utils::VBO(*m_positionVBO);
//
// m_lines = new Utils::ShaderVectorPerVertex();
// m_lines->setAttributePosition(m_positionVBO);
// m_lines->setAttributeVector(m_dataVBO);
// m_lines->setScale(0.2f);
// m_lines->setColor(Geom::Vec4f(0.0f, 1.0f, 0.2f, 0.0f));
//
// // accede au buffer du VBO pour modification
// PFP::VEC3* data = static_cast<PFP::VEC3*>(m_dataVBO->lockPtr());
// for (unsigned int i=0; i< m_dataVBO->nbElts(); ++i)
// {
// data[i].normalize();
// }
// m_dataVBO->releasePtr();
//
// registerShader(m_shader);
// registerShader(m_strings);
// registerShader(m_sprite);
// registerShader(m_lines);
//
// m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
// m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES);
// m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS);
//
// m_render_topo->updateData<PFP>(myMap, allDarts, position, 0.9f, 0.9f, 0.9f);
// timer example for animation
m_timer
=
new
QTimer
(
this
);
...
...
@@ -198,73 +196,79 @@ void MyQT::cb_initGL()
void
MyQT
::
cb_redraw
()
{
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
glEnable
(
GL_LIGHTING
);
m_render
->
draw
(
m_shader
,
Algo
::
Render
::
GL2
::
POINTS
);
glLineWidth
(
2.0
f
);
m_shader
->
setColor
(
Geom
::
Vec4f
(
1.
,
1.
,
0.
,
0.
));
m_render
->
draw
(
m_shader
,
Algo
::
Render
::
GL2
::
LINES
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
glPolygonOffset
(
1.0
f
,
1.0
f
);
//
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
//
glEnable(GL_LIGHTING);
//
//
m_render->draw(m_shader, Algo::Render::GL2::POINTS);
//
//
glLineWidth(2.0f);
//
m_shader->setColor(Geom::Vec4f(1.,1.,0.,0.));
//
m_render->draw(m_shader, Algo::Render::GL2::LINES);
//
//
glEnable(GL_POLYGON_OFFSET_FILL);
//
glPolygonOffset(1.0f, 1.0f);
if
(
render_topo
)
m_render_topo
->
drawTopo
();
Dart
d
=
myMap
.
phi2
(
myMap
.
begin
());
m_render_topo
->
overdrawDart
(
d
,
5
,
1.0
f
,
0.0
f
,
1.0
f
);
d
=
myMap
.
phi1
(
myMap
.
begin
());
m_render_topo
->
overdrawDart
(
d
,
5
,
1.0
f
,
0.0
f
,
1.0
f
);
glDisable
(
GL_POLYGON_OFFSET_FILL
);
if
(
render_text
)
m_strings
->
drawAll
(
Geom
::
Vec3f
(
0.0
f
,
1.0
f
,
1.0
f
));
if
(
render_balls
)
{
m_sprite
->
predraw
(
Geom
::
Vec3f
(
1.0
f
,
0.0
f
,
0.0
f
));
m_render
->
draw
(
m_sprite
,
Algo
::
Render
::
GL2
::
POINTS
);
m_sprite
->
postdraw
();
}
if
(
render_vectors
)
{
glDisable
(
GL_LIGHTING
);
glLineWidth
(
1.0
f
);
m_render
->
draw
(
m_lines
,
Algo
::
Render
::
GL2
::
POINTS
);
// Algo::Render::GL1::renderTopoGMD3<PFP>(myMap, position, true, true, true, true, 0.9f, 0.9f, 0.9f, 0.9f);
Algo
::
Render
::
GL1
::
renderTopoMD3
<
PFP
>
(
myMap
,
position
,
true
,
true
,
true
,
0.9
f
,
0.9
f
,
0.9
f
);
// m_render_topo->drawTopo();
}
// Dart d = myMap.phi2(myMap.begin());
// m_render_topo->overdrawDart(d, 5, 1.0f, 0.0f, 1.0f);
// d = myMap.phi1(myMap.begin());
// m_render_topo->overdrawDart(d, 5, 1.0f, 0.0f, 1.0f);
//
// glDisable(GL_POLYGON_OFFSET_FILL);
//
// if (render_text)
// m_strings->drawAll(Geom::Vec3f(0.0f, 1.0f, 1.0f));
//
// if (render_balls)
// {
// m_sprite->predraw(Geom::Vec3f(1.0f, 0.0f ,0.0f));
// m_render->draw(m_sprite, Algo::Render::GL2::POINTS);
// m_sprite->postdraw();
// }
//
// if (render_vectors)
// {
// glLineWidth(1.0f);
// m_render->draw(m_lines, Algo::Render::GL2::POINTS);
// }
}
void
MyQT
::
cb_mousePress
(
int
button
,
int
x
,
int
y
)
{
if
(
Shift
())
{
Dart
d
=
m_render_topo
->
picking
<
PFP
>
(
myMap
,
allDarts
,
x
,
y
);
if
(
d
!=
Dart
::
nil
())
{
CGoGNout
<<
"Dart "
<<
d
<<
" clicked"
<<
CGoGNendl
;
}
else
{
statusMsg
(
""
);
}
}
//
if (Shift())
//
{
//
Dart d = m_render_topo->picking<PFP>(myMap, allDarts, x,y);
//
if (d != Dart::nil())
//
{
//
CGoGNout << "Dart "<< d << " clicked" << CGoGNendl;
//
}
//
else
//
{
//
statusMsg("");
//
}
//
}
}
void
MyQT
::
cb_keyPress
(
int
code
)
{
if
(
code
==
's'
)
{
std
::
string
filename
=
selectFileSave
(
"Export SVG file "
);
CGoGNout
<<
"Exporting "
<<
filename
<<
CGoGNendl
;
Algo
::
Render
::
SVG
::
SVGOut
svg
(
filename
,
modelViewMatrix
(),
projectionMatrix
());
// svg.renderLinesToSVG<PFP>(myMap,position);
svg
.
setColor
(
Geom
::
Vec3f
(
1.
,
0.
,
0.
));
svg
.
renderFacesToSVG
<
PFP
>
(
myMap
,
position
,
0.8
f
);
//svg destruction close the file
}
// if (code
== 's')
//
{
//
std::string filename = selectFileSave("Export SVG file ");
// CGoGNout << "Exporting "<< filename <<
CGoGNendl;
// Algo::Render::SVG::SVGOut svg(filename, modelViewMatrix(),
projectionMatrix());
//
//
svg.renderLinesToSVG<PFP>(myMap,position);
//
svg.setColor(Geom::Vec3f(1.,0.,0.));
//
svg.renderFacesToSVG<PFP>(myMap,position,0.8f);
//
//svg destruction close the file
//
}
if
(
code
==
't'
)
{
if
(
m_timer
->
isActive
())
...
...
@@ -274,7 +278,7 @@ void MyQT::cb_keyPress(int code)
}
}
Dart
embedCube
()
Dart
embedCube
1
()
{
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createPolyhedron
(
myMap
,
6
);
...
...
@@ -317,7 +321,7 @@ Dart embedCube2()
int
main
(
int
argc
,
char
**
argv
)
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
Dart
d1
=
embedCube
()
;
Dart
d1
=
embedCube
1
()
;
Dart
d2
=
embedCube2
()
;
Dart
dd
=
myMap
.
phi2
(
d1
)
;
...
...
@@ -365,6 +369,7 @@ int main(int argc, char **argv)
myMap
.
check
()
;
std
::
cout
<<
"nb darts -> "
<<
myMap
.
getNbDarts
()
<<
std
::
endl
;
std
::
cout
<<
"nb darts -> "
<<
myMap
.
getNbDarts
()
<<
std
::
endl
;
PFP
::
VEC3
p
=
position
[
f
]
+
position
[
myMap
.
phi_1
(
f
)]
;
p
/=
2.0
;
...
...
@@ -385,14 +390,6 @@ int main(int argc, char **argv)
std
::
cout
<<
"nb darts -> "
<<
myMap
.
getNbDarts
()
<<
std
::
endl
;
// Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
//
// int nb=3;
// if (argc>1)
// nb = atoi(argv[1]);
// dglobal = prim.hexaGrid_topo(nb,nb,nb);
// prim.embedHexaGrid(1.0f,1.0f,1.0f);
//
// myMap.closeMap();
// un peu d'interface
QApplication
app
(
argc
,
argv
);
...
...
@@ -402,17 +399,17 @@ int main(int argc, char **argv)
Utils
::
QT
::
uiDockInterface
dock
;
sqt
.
setDock
(
&
dock
);
// message d'aide
sqt
.
setHelpMsg
(
"Enter pour dock on/off
\n
Shift Enter pour console on/off
\n
Shift Click gauche pour selectionner un brin"
);
CGoGNout
.
toStatusBar
(
&
sqt
);
CGoGNout
<<
"CGoGNOut StatusBar"
<<
Geom
::
Vec3f
(
2.5
f
,
2.2
f
,
4.3
f
)
<<
CGoGNendl
;
CGoGNout
.
toConsole
(
&
sqt
);
CGoGNout
<<
"CGoGNOut dans la console"
<<
Geom
::
Vec3f
(
2.5
f
,
2.2
f
,
4.3
f
)
<<
CGoGNendl
;
CGoGNout
.
toStatusBar
(
NULL
);
//
// message d'aide
//
sqt.setHelpMsg("Enter pour dock on/off\nShift Enter pour console on/off\nShift Click gauche pour selectionner un brin");
//
//
CGoGNout.toStatusBar(&sqt);
//
CGoGNout << "CGoGNOut StatusBar" << Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
//
//
CGoGNout.toConsole(&sqt);
//
//
CGoGNout << "CGoGNOut dans la console" << Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
//
//
CGoGNout.toStatusBar(NULL);
// bounding box
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
...
...
@@ -422,29 +419,27 @@ int main(int argc, char **argv)
// envoit info BB a l'interface
sqt
.
setParamObject
(
lWidthObj
,
lPosObj
.
data
());
sqt
.
setCallBack
(
dock
.
checkBox_balls
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
balls_onoff
(
bool
))
);
sqt
.
setCallBack
(
dock
.
checkBox_vectors
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
vectors_onoff
(
bool
))
);
sqt
.
setCallBack
(
dock
.
checkBox_text
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
text_onoff
(
bool
))
);
//
sqt.setCallBack( dock.checkBox_balls, SIGNAL(toggled(bool)), SLOT(balls_onoff(bool)) );
//
sqt.setCallBack( dock.checkBox_vectors, SIGNAL(toggled(bool)), SLOT(vectors_onoff(bool)) );
//
sqt.setCallBack( dock.checkBox_text, SIGNAL(toggled(bool)), SLOT(text_onoff(bool)) );
sqt
.
setCallBack
(
dock
.
checkBox_topo
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
topo_onoff
(
bool
))
);
sqt
.
setCallBack
(
dock
.
slider_balls
,
SIGNAL
(
valueChanged
(
int
)),
SLOT
(
slider_balls
(
int
))
);
sqt
.
setCallBack
(
dock
.
slider_vectors
,
SIGNAL
(
valueChanged
(
int
)),
SLOT
(
slider_vectors
(
int
))
);
sqt
.
setCallBack
(
dock
.
slider_text
,
SIGNAL
(
valueChanged
(
int
)),
SLOT
(
slider_text
(
int
))
);
//
sqt.setCallBack( dock.slider_balls, SIGNAL(valueChanged(int)), SLOT(slider_balls(int)) );
//
sqt.setCallBack( dock.slider_vectors, SIGNAL(valueChanged(int)), SLOT(slider_vectors(int)) );
//
sqt.setCallBack( dock.slider_text, SIGNAL(valueChanged(int)), SLOT(slider_text(int)) );
sqt
.
show
();
sqt
.
slider_balls
(
50
);
sqt
.
slider_vectors
(
50
);
sqt
.
slider_text
(
50
);
GLint
texSize
;
glGetIntegerv
(
GL_MAX_TEXTURE_SIZE
,
&
texSize
);
CGoGNdbg
.
toConsole
(
&
sqt
);
CGoGNerr
.
toConsole
(
&
sqt
);
CGoGNdbg
<<
" TextureSize "
<<
texSize
<<
CGoGNendl
;
CGoGNerr
<<
" test ERROR "
<<
5
*
7
<<
CGoGNflush
;
// sqt.slider_balls(50);
// sqt.slider_vectors(50);
// sqt.slider_text(50);
// GLint texSize;
// glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize);
// CGoGNdbg.toConsole(&sqt);
// CGoGNerr.toConsole(&sqt);
// CGoGNdbg << " TextureSize " << texSize << CGoGNendl;
// CGoGNerr << " test ERROR " << 5*7 << CGoGNflush;
// et on attend la fin.
return
app
.
exec
();
...
...
Apps/Tuto/tuto5.h
View file @
0cc54bd5
...
...
@@ -61,38 +61,38 @@ class MyQT: public Utils::QT::SimpleQT
bool
render_vectors
;
bool
render_topo
;
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Algo
::
Render
::
GL2
::
Topo3RenderMapD
*
m_render_topo
;
// Algo::Render::GL2::MapRender* m_render;
// Algo::Render::GL2::Topo3RenderMapD* m_render_topo;
//
// Utils::VBO* m_positionVBO;
// Utils::VBO* m_dataVBO;
Utils
::
VBO
*
m_positionVBO
;
Utils
::
VBO
*
m_dataVBO
;
Utils
::
ShaderSimpleColor
*
m_shader
;
Utils
::
ShaderVectorPerVertex
*
m_lines
;
Utils
::
Strings3D
*
m_strings
;
Utils
::
PointSprite
*
m_sprite
;
// Utils::ShaderSimpleColor* m_shader;
// Utils::ShaderVectorPerVertex* m_lines;
// Utils::Strings3D* m_strings;
// Utils::PointSprite* m_sprite;
QTimer
*
m_timer
;
public:
MyQT
()
:
render_text
(
tru
e
),
render_balls
(
tru
e
),
render_vectors
(
tru
e
),
render_text
(
fals
e
),
render_balls
(
fals
e
),
render_vectors
(
fals
e
),
render_topo
(
true
),
m_render
(
NULL
),
m_render_topo
(
NULL
),
m_positionVBO
(
NULL
),
m_dataVBO
(
NULL
),
m_shader
(
NULL
),
m_lines
(
NULL
),
m_strings
(
NULL
),
m_sprite
(
NULL
),
//
m_render(NULL),
//
m_render_topo(NULL),
//
m_positionVBO(NULL),
//
m_dataVBO(NULL),
//
m_shader(NULL),
//
m_lines(NULL),
//
m_strings(NULL),
//
m_sprite(NULL),
m_timer
(
NULL
)
{}
protected:
void
storeVerticesInfo
();
//
void storeVerticesInfo();
void
cb_redraw
();
...
...
@@ -104,14 +104,14 @@ protected:
// slots locaux
public
slots
:
void
balls_onoff
(
bool
x
);
void
vectors_onoff
(
bool
x
);
void
text_onoff
(
bool
x
);
//
void balls_onoff(bool x);
//
void vectors_onoff(bool x);
//
void text_onoff(bool x);
void
topo_onoff
(
bool
x
);
void
slider_balls
(
int
x
);
void
slider_vectors
(
int
x
);
void
slider_text
(
int
x
);
//
void slider_balls(int x);
//
void slider_vectors(int x);
//
void slider_text(int x);
void
animate
();
};
...
...
include/Topology/gmap/embeddedGMap3.h
View file @
0cc54bd5
...
...
@@ -39,56 +39,54 @@ class EmbeddedGMap3 : public GMap3
public:
typedef
GMap3
TOPO_MAP
;
/*!
*
*/
virtual
Dart
deleteVertex
(
Dart
d
);
//! Cut the edge of d
/*! @param d a dart of the edge to cut
*/
virtual
void
cutEdge
(
Dart
d
);
/**
* The attributes attached to the vertices of the edge of d are kept on the vertices of the resulting edge
* The attributes attached to the edge of d are kept on the resulting edge
* The attributes attached to the volume of d are kept on the resulting volume
/*! The attributes attached to the edge of d are kept on the resulting edge
* @param d a dart of the edge to cut
*/
v
oid
sewFaces
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
);
v
irtual
bool
uncutEdge
(
Dart
d
);
/**
* The attributes attached to the vertices of the old edge of d are duplicated on the vertices of both resulting edges
* The attributes attached to the old edge are duplicated on both resulting edges
* The attributes attached to the old volume are duplicated on both volume if a new one is created
*/
virtual
void
unsewFaces
(
Dart
d
);
//! Split a face inserting an edge between two vertices
/*! \pre Dart d and e should belong to the same face and be distinct
* @param d dart of first vertex
* @param e dart of second vertex
* @return the dart of the new edge lying in the vertex of d after the cut
/*!
*
*/
virtual
void
splitFace
(
Dart
d
,
Dart
e
);
/**
* The attributes attached to the vertices of the vertices of the face of d are kept on the vertices of the resulting face
* The attributes attached to the edges of the face of d are kept on the resulting face
* The attributes attached to the face of d are kept on the resulting face
/*!
*
*/
virtual
void
sewVolumes
(
Dart
d
,
Dart
e
);
virtual
void
sewVolumes
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
);
/**
* The attributes attached to the vertices of the old face of d are duplicated on the vertices of both resulting faces
* The attributes attached to the old edges of the old face of d are duplicated on the edges of both resulting faces
* The attributes attached to the old face d are duplicated on both resulting faces
/*!
*
*/
virtual
void
unsewVolumes
(
Dart
d
);
/*
*
*
The attributes attached to the volume of the old volume of d are kept on the resulting volume
/*
!
*
*/
virtual
bool
mergeVolumes
(
Dart
d
);
virtual
unsigned
int
closeHole
(
Dart
d
);
/*!
*
*/
virtual
void
splitVolume
(
std
::
vector
<
Dart
>&
vd
);
// virtual void closeMap(DartMarker &marker);
/**
* No attribute is attached to the new volume
*/
virtual
unsigned
int
closeHole
(
Dart
d
,
bool
forboundary
=
true
);
/*!
*
*/
virtual
bool
check
();