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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
2a524b67
Commit
2a524b67
authored
Jun 03, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug Dart/CellMarker + suppr '_ORBIT' et '_CELL'
parent
218a41b3
Changes
114
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
114 changed files
with
1354 additions
and
1283 deletions
+1354
-1283
Apps/Examples/Tests/Algo_Geom_inclusion.cpp
Apps/Examples/Tests/Algo_Geom_inclusion.cpp
+1
-1
Apps/Examples/Viewer.cpp
Apps/Examples/Viewer.cpp
+14
-14
Apps/Examples/decimationVolumique.cpp
Apps/Examples/decimationVolumique.cpp
+9
-9
Apps/Examples/extrusionView.cpp
Apps/Examples/extrusionView.cpp
+1
-1
Apps/Examples/miniTest.cpp
Apps/Examples/miniTest.cpp
+20
-20
Apps/Examples/polyhedronsView.cpp
Apps/Examples/polyhedronsView.cpp
+1
-1
Apps/Examples/scene.cpp
Apps/Examples/scene.cpp
+5
-5
Apps/Examples/simpleEMap3.cpp
Apps/Examples/simpleEMap3.cpp
+2
-2
Apps/Examples/simpleGMap2.cpp
Apps/Examples/simpleGMap2.cpp
+3
-3
Apps/Examples/squelette3carte.cpp
Apps/Examples/squelette3carte.cpp
+1
-1
Apps/Examples/ter_meshes.cpp
Apps/Examples/ter_meshes.cpp
+3
-3
Apps/Examples/triangulation.cpp
Apps/Examples/triangulation.cpp
+2
-2
Apps/Examples/viewer.cpp
Apps/Examples/viewer.cpp
+2
-2
Apps/Tuto/tp_master.cpp
Apps/Tuto/tp_master.cpp
+4
-4
Apps/Tuto/tuto1.cpp
Apps/Tuto/tuto1.cpp
+1
-1
Apps/Tuto/tuto2.cpp
Apps/Tuto/tuto2.cpp
+3
-3
Apps/Tuto/tuto3.cpp
Apps/Tuto/tuto3.cpp
+7
-7
Apps/Tuto/tuto4.cpp
Apps/Tuto/tuto4.cpp
+5
-5
Apps/Tuto/tuto5.cpp
Apps/Tuto/tuto5.cpp
+2
-2
Apps/Tuto/tuto_mt.cpp
Apps/Tuto/tuto_mt.cpp
+7
-7
Apps/Tuto/tuto_ogl3.cpp
Apps/Tuto/tuto_ogl3.cpp
+2
-2
Apps/Tuto/tuto_subdivision.cpp
Apps/Tuto/tuto_subdivision.cpp
+1
-1
include/Algo/Decimation/basic.h
include/Algo/Decimation/basic.h
+4
-4
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+14
-14
include/Algo/Decimation/edgeSelector.h
include/Algo/Decimation/edgeSelector.h
+17
-17
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+14
-14
include/Algo/Decimation/geometryApproximator.h
include/Algo/Decimation/geometryApproximator.h
+5
-5
include/Algo/Decimation/geometryApproximator.hpp
include/Algo/Decimation/geometryApproximator.hpp
+8
-8
include/Algo/Decimation/halfEdgeSelector.h
include/Algo/Decimation/halfEdgeSelector.h
+10
-10
include/Algo/Decimation/halfEdgeSelector.hpp
include/Algo/Decimation/halfEdgeSelector.hpp
+7
-7
include/Algo/Decimation/lightfieldApproximator.h
include/Algo/Decimation/lightfieldApproximator.h
+4
-4
include/Algo/Decimation/lightfieldApproximator.hpp
include/Algo/Decimation/lightfieldApproximator.hpp
+10
-10
include/Algo/Decimation/simplifMesh.hpp
include/Algo/Decimation/simplifMesh.hpp
+10
-10
include/Algo/DecimationVolumique/decimator.hpp
include/Algo/DecimationVolumique/decimator.hpp
+1
-1
include/Algo/DecimationVolumique/selector.h
include/Algo/DecimationVolumique/selector.h
+1
-1
include/Algo/DecimationVolumique/selector.hpp
include/Algo/DecimationVolumique/selector.hpp
+1
-1
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+17
-17
include/Algo/Export/exportPov.h
include/Algo/Export/exportPov.h
+2
-2
include/Algo/Filters2D/average.hpp
include/Algo/Filters2D/average.hpp
+1
-1
include/Algo/Filters2D/average_normals.hpp
include/Algo/Filters2D/average_normals.hpp
+24
-24
include/Algo/Filters2D/bilateral.hpp
include/Algo/Filters2D/bilateral.hpp
+3
-3
include/Algo/Filters2D/taubin.hpp
include/Algo/Filters2D/taubin.hpp
+1
-1
include/Algo/Filters2D/tools.hpp
include/Algo/Filters2D/tools.hpp
+2
-2
include/Algo/Geometry/area.hpp
include/Algo/Geometry/area.hpp
+2
-2
include/Algo/Geometry/boundingbox.h
include/Algo/Geometry/boundingbox.h
+1
-1
include/Algo/Geometry/centroid.hpp
include/Algo/Geometry/centroid.hpp
+6
-6
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+1
-1
include/Algo/Geometry/feature.hpp
include/Algo/Geometry/feature.hpp
+3
-3
include/Algo/Geometry/inclusion.hpp
include/Algo/Geometry/inclusion.hpp
+1
-1
include/Algo/Geometry/laplacian.hpp
include/Algo/Geometry/laplacian.hpp
+1
-1
include/Algo/Geometry/normal.hpp
include/Algo/Geometry/normal.hpp
+2
-2
include/Algo/Geometry/stats.h
include/Algo/Geometry/stats.h
+1
-1
include/Algo/Geometry/volume.hpp
include/Algo/Geometry/volume.hpp
+3
-3
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
include/Algo/ImplicitHierarchicalMesh/ihm.hpp
+3
-3
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+5
-5
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+67
-67
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+52
-52
include/Algo/Import/import2tablesVolume.hpp
include/Algo/Import/import2tablesVolume.hpp
+4
-4
include/Algo/Import/importInESS.hpp
include/Algo/Import/importInESS.hpp
+5
-5
include/Algo/Import/importMesh.hpp
include/Algo/Import/importMesh.hpp
+43
-43
include/Algo/Import/importObjEle.hpp
include/Algo/Import/importObjEle.hpp
+7
-7
include/Algo/Import/importTet.hpp
include/Algo/Import/importTet.hpp
+7
-7
include/Algo/Import/importTs.hpp
include/Algo/Import/importTs.hpp
+8
-8
include/Algo/LinearSolving/Laplacian/matrixSetup.h
include/Algo/LinearSolving/Laplacian/matrixSetup.h
+2
-2
include/Algo/LinearSolving/basic.h
include/Algo/LinearSolving/basic.h
+4
-4
include/Algo/LinearSolving/matrixSetup.h
include/Algo/LinearSolving/matrixSetup.h
+2
-2
include/Algo/MC/marchingcube.hpp
include/Algo/MC/marchingcube.hpp
+12
-12
include/Algo/MC/marchingcubeGen.hpp
include/Algo/MC/marchingcubeGen.hpp
+12
-12
include/Algo/Modelisation/extrusion.hpp
include/Algo/Modelisation/extrusion.hpp
+2
-2
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+22
-22
include/Algo/Modelisation/primitives3d.hpp
include/Algo/Modelisation/primitives3d.hpp
+1
-1
include/Algo/Modelisation/subdivision.h
include/Algo/Modelisation/subdivision.h
+1
-1
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+33
-33
include/Algo/Modelisation/tetrahedron.hpp
include/Algo/Modelisation/tetrahedron.hpp
+42
-42
include/Algo/MovingObjects/particle_cell_2D.h
include/Algo/MovingObjects/particle_cell_2D.h
+4
-4
include/Algo/MovingObjects/particle_cell_2D.hpp
include/Algo/MovingObjects/particle_cell_2D.hpp
+7
-7
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
include/Algo/MovingObjects/particle_cell_2D_memo.hpp
+13
-13
include/Algo/MovingObjects/particle_cell_3D.h
include/Algo/MovingObjects/particle_cell_3D.h
+4
-4
include/Algo/MovingObjects/particle_cell_3D.hpp
include/Algo/MovingObjects/particle_cell_3D.hpp
+15
-15
include/Algo/Parallel/parallel_foreach.h
include/Algo/Parallel/parallel_foreach.h
+5
-5
include/Algo/Parallel/parallel_foreach.hpp
include/Algo/Parallel/parallel_foreach.hpp
+1
-1
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+24
-24
include/Algo/ProgressiveMesh/vsplit.h
include/Algo/ProgressiveMesh/vsplit.h
+4
-4
include/Algo/Remeshing/pliant.hpp
include/Algo/Remeshing/pliant.hpp
+13
-13
include/Algo/Render/Deprecated/gl3mapRender.hpp
include/Algo/Render/Deprecated/gl3mapRender.hpp
+21
-21
include/Algo/Render/Deprecated/vbo_MapRender.hpp
include/Algo/Render/Deprecated/vbo_MapRender.hpp
+21
-21
include/Algo/Render/GL1/map_glRender.hpp
include/Algo/Render/GL1/map_glRender.hpp
+4
-4
include/Algo/Render/GL1/topo_render.hpp
include/Algo/Render/GL1/topo_render.hpp
+6
-6
include/Algo/Render/GL2/explodeVolumeRender.hpp
include/Algo/Render/GL2/explodeVolumeRender.hpp
+1
-1
include/Algo/Render/GL2/mapRender.hpp
include/Algo/Render/GL2/mapRender.hpp
+14
-14
include/Algo/Render/GL2/topo3Render.hpp
include/Algo/Render/GL2/topo3Render.hpp
+23
-23
include/Algo/Render/GL2/topoRender.hpp
include/Algo/Render/GL2/topoRender.hpp
+11
-11
include/Algo/Render/SVG/mapSVGRender.hpp
include/Algo/Render/SVG/mapSVGRender.hpp
+2
-2
include/Algo/Selection/raySelector.h
include/Algo/Selection/raySelector.h
+5
-5
include/Topology/generic/attribmap.h
include/Topology/generic/attribmap.h
+1
-3
include/Topology/generic/attribmap.hpp
include/Topology/generic/attribmap.hpp
+1
-1
include/Topology/generic/cellmarker.h
include/Topology/generic/cellmarker.h
+81
-73
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+170
-103
include/Topology/generic/embeddedMap2.hpp
include/Topology/generic/embeddedMap2.hpp
+81
-81
include/Topology/generic/embeddedMap3.hpp
include/Topology/generic/embeddedMap3.hpp
+50
-50
include/Topology/generic/genericFunc.h
include/Topology/generic/genericFunc.h
+5
-5
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+24
-26
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+12
-12
include/Topology/generic/mapBrowser.h
include/Topology/generic/mapBrowser.h
+1
-1
include/Topology/generic/marker.h
include/Topology/generic/marker.h
+3
-3
include/Topology/map/emap3.h
include/Topology/map/emap3.h
+1
-1
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
+3
-3
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+9
-9
src/Topology/generic/attribmap.cpp
src/Topology/generic/attribmap.cpp
+3
-3
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+9
-9
src/Topology/gmap/gmap2.cpp
src/Topology/gmap/gmap2.cpp
+1
-1
src/Topology/map/emap3.cpp
src/Topology/map/emap3.cpp
+54
-54
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+6
-6
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+34
-34
No files found.
Apps/Examples/Tests/Algo_Geom_inclusion.cpp
View file @
2a524b67
...
...
@@ -43,7 +43,7 @@ int main()
std
::
cout
<<
"Check Status : PARTIAL"
<<
std
::
endl
;
PFP
::
MAP
map
;
AttributeHandler
<
PFP
::
VEC3
>
position
=
map
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
AttributeHandler
<
PFP
::
VEC3
>
position
=
map
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
map
.
newFace
(
3
);
PFP
::
VEC3
ta
(
0
,
0
,
0
);
...
...
Apps/Examples/Viewer.cpp
View file @
2a524b67
...
...
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
if
(
argc
==
1
)
{
position
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
_ORBIT
,
"position"
);
position
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
,
"position"
);
CGoGNout
<<
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
<<
CGoGNendl
;
// typedef uint8 DATATYPE;
...
...
@@ -422,10 +422,10 @@ int main(int argc, char **argv)
//
// GLint t1 = glutGet(GLUT_ELAPSED_TIME);
//
// myMap.getAttributeContainer(VERTEX
_ORBIT
).toggleProcess(position);
//// myMap.getAttributeContainer(VERTEX
_ORBIT
).toggleProcess(idPipo);
// myMap.getAttributeContainer(VERTEX).toggleProcess(position);
//// myMap.getAttributeContainer(VERTEX).toggleProcess(idPipo);
//
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX
_ORBIT
));
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0);
//
...
...
@@ -433,7 +433,7 @@ int main(int argc, char **argv)
// GLfloat seconds = (t2 - t1) / 1000.0f;
// CGoGNout << "triangulation: "<< seconds << "sec" << CGoGNendl;
//
// Marker m = myMap.getNewMarker(VERTEX
_ORBIT
);
// Marker m = myMap.getNewMarker(VERTEX);
// myMap.markEmbVertex(myMap.begin(),m);
//
// Dart xd = myMap.alpha1(myMap.begin());
...
...
@@ -447,8 +447,8 @@ int main(int argc, char **argv)
// CGoGNout << "Marke aussi"<< CGoGNendl;
// }
//
// myMap.clearEmbMarkers(m,VERTEX
_ORBIT
);
// myMap.releaseEmbMarker(m,VERTEX
_ORBIT
);
// myMap.clearEmbMarkers(m,VERTEX);
// myMap.releaseEmbMarker(m,VERTEX);
//
// }
else
...
...
@@ -462,7 +462,7 @@ int main(int argc, char **argv)
CGoGNerr
<<
"could not import "
<<
std
::
string
(
argv
[
1
])
<<
CGoGNendl
;
exit
(
1
);
}
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
);
...
...
@@ -474,10 +474,10 @@ int main(int argc, char **argv)
// Algo::Modelisation::CatmullClark<PFP, PFP::TVEC3, PFP::VEC3>(myMap,position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX
_ORBIT
));
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0);
// myMap.getAttributeContainer(VERTEX
_ORBIT
).toggleProcess(position);
// myMap.getAttributeContainer(VERTEX).toggleProcess(position);
//
// Algo::Modelisation::LoopSubdivision<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::LoopSubdivision<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
...
...
@@ -490,15 +490,15 @@ int main(int argc, char **argv)
CGoGNout
<<
"subdiv: "
<<
seconds
<<
"sec"
<<
CGoGNendl
;
// myMap.getAttributeContainer(VERTEX
_ORBIT
).toggleProcess(position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX
_ORBIT
));
// myMap.getAttributeContainer(VERTEX).toggleProcess(position);
// PFP::MAP::EVertex::setContainer(myMap.getAttributeContainer(VERTEX));
// PFP::MAP::EVertex::setMap(myMap);
// PFP::MAP::EVertex ec(0);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
CGoGNout
<<
"Nombre de sommets plonges "
<<
myMap
.
getNbCells
(
VERTEX
_ORBIT
)
<<
CGoGNendl
;
CGoGNout
<<
"Nombre de sommets plonges "
<<
myMap
.
getNbCells
(
VERTEX
)
<<
CGoGNendl
;
CGoGNout
<<
"Nombre de sommets topo: "
<<
myMap
.
getNbOrbits
(
0
)
<<
CGoGNendl
;
CGoGNout
<<
"Nombre de faces topo: "
<<
myMap
.
getNbOrbits
(
2
)
<<
CGoGNendl
;
...
...
@@ -515,7 +515,7 @@ int main(int argc, char **argv)
bool
inter
=
Algo
::
Geometry
::
areTrianglesInIntersection
<
PFP
>
(
myMap
,
0
,
10
,
position
)
;
CGoGNout
<<
"intersection = "
<<
inter
<<
CGoGNendl
;
normal
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
_ORBIT
,
"normals"
);
normal
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
,
"normals"
);
// PFP::NORMAL normal(normal,myMap);
...
...
Apps/Examples/decimationVolumique.cpp
View file @
2a524b67
...
...
@@ -235,9 +235,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
/** affichage **/
case
'd'
:
{
int
nbVertices
=
myMap
.
getNbOrbits
(
VERTEX
_ORBIT
)
;
int
nbVertices
=
myMap
.
getNbOrbits
(
VERTEX
)
;
CGoGNout
<<
"nb darts = "
<<
myMap
.
getNbOrbits
(
DART
_ORBIT
)
<<
CGoGNendl
;
CGoGNout
<<
"nb darts = "
<<
myMap
.
getNbOrbits
(
DART
)
<<
CGoGNendl
;
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
);
Algo
::
DecimationVolumique
::
decimate
<
PFP
>
(
myMap
,
Algo
::
DecimationVolumique
::
S_Random
,
Algo
::
DecimationVolumique
::
A_Centroid
,
position
,
nbVertices
*
0.75
);
...
...
@@ -370,7 +370,7 @@ int main(int argc, char **argv)
}
Algo
::
Import
::
importOFFWithELERegions
<
PFP
>
(
myMap
,
argv
[
2
],
argv
[
3
],
attrNames
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
}
else
if
(
std
::
string
(
argv
[
1
])
==
"-tet"
)
{
...
...
@@ -380,7 +380,7 @@ int main(int argc, char **argv)
}
Algo
::
Import
::
importTet
<
PFP
>
(
myMap
,
argv
[
2
],
attrNames
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
}
else
if
(
std
::
string
(
argv
[
1
])
==
"-ts"
)
{
...
...
@@ -390,18 +390,18 @@ int main(int argc, char **argv)
}
Algo
::
Import
::
importTs
<
PFP
>
(
myMap
,
argv
[
2
],
attrNames
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
//scalar = myMap.getAttribute<PFP::REAL>(VERTEX
_ORBIT
, "scalar");
//scalar = myMap.getAttribute<PFP::REAL>(VERTEX, "scalar");
}
else
{
maillageTest
();
}
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME
_ORBIT
) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits(EDGE
_ORBIT
) <<
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX
_ORBIT
) << CGoGNendl;
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits(EDGE) <<
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX) << CGoGNendl;
// un peu d'interface
MyGlutWin
*
mgw
=
new
MyGlutWin
(
&
argc
,
argv
,
1200
,
800
);
...
...
Apps/Examples/extrusionView.cpp
View file @
2a524b67
...
...
@@ -109,7 +109,7 @@ int main(int argc, char **argv)
QApplication
app
(
argc
,
argv
);
MyQT
sqt
;
PFP
::
TVEC3
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
)
;
PFP
::
TVEC3
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
)
;
// define the face extruded (here a cross)
std
::
vector
<
PFP
::
VEC3
>
objV
;
...
...
Apps/Examples/miniTest.cpp
View file @
2a524b67
...
...
@@ -311,8 +311,8 @@ MyGlutWin::MyGlutWin(int* argc, char **argv, int winX, int winY) :
void
MyGlutWin
::
init
()
{
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
laplacian
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"laplacian"
)
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
laplacian
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"laplacian"
)
;
vbo_render
=
new
Algo
::
Render
::
GL2
::
MapRender_VBO
()
;
updateVBOdata
(
Algo
::
Render
::
GL2
::
POSITIONS
|
Algo
::
Render
::
GL2
::
NORMALS
)
;
...
...
@@ -489,12 +489,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLfloat
seconds
=
(
t2
-
t1
)
/
1000.0
f
;
CGoGNout
<<
"sqrt3: "
<<
seconds
<<
"sec"
<<
CGoGNendl
;
normal
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
normal
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
if
(
!
normal
.
isValid
())
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
laplacian
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"laplacian"
)
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
laplacian
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"laplacian"
)
;
if
(
!
laplacian
.
isValid
())
laplacian
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"laplacian"
)
;
laplacian
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"laplacian"
)
;
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
...
...
@@ -560,7 +560,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case
's'
:
{
unsigned
int
nbVertices
=
myMap
.
getNbOrbits
(
VERTEX
_ORBIT
)
;
unsigned
int
nbVertices
=
myMap
.
getNbOrbits
(
VERTEX
)
;
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
...
...
@@ -586,9 +586,9 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case
'd'
:
{
AttributeHandler
<
PFP
::
VEC3
>
positionF
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
FACE
_ORBIT
,
"position"
)
;
AttributeHandler
<
PFP
::
VEC3
>
positionF
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
FACE
,
"position"
)
;
if
(
!
positionF
.
isValid
())
positionF
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
FACE
_ORBIT
,
"position"
)
;
positionF
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
FACE
,
"position"
)
;
Algo
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
myMap
,
position
,
positionF
)
;
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
...
...
@@ -601,12 +601,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
position
=
positionF
;
normal
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
normal
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
if
(
!
normal
.
isValid
())
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
laplacian
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"laplacian"
)
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
laplacian
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"laplacian"
)
;
if
(
!
laplacian
.
isValid
())
laplacian
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"laplacian"
)
;
laplacian
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"laplacian"
)
;
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
...
...
@@ -649,12 +649,12 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
case
'9'
:
{
CellMarker
markVisit
(
myMap
,
VERTEX
_CELL
)
;
CellMarker
markVisit
(
myMap
,
VERTEX
)
;
CellMarker
markNoDelete
(
myMap
,
VERTEX
_CELL
)
;
CellMarker
markNoDelete
(
myMap
,
VERTEX
)
;
std
::
vector
<
Dart
>
visited
;
visited
.
reserve
(
myMap
.
getNbCells
(
VERTEX
_CELL
))
;
visited
.
reserve
(
myMap
.
getNbCells
(
VERTEX
))
;
visited
.
push_back
(
myMap
.
begin
())
;
markVisit
.
mark
(
myMap
.
begin
())
;
...
...
@@ -811,7 +811,7 @@ int main(int argc, char** argv)
return
1
;
}
mgw
->
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
mgw
->
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
GLint
t2
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
GLfloat
seconds
=
(
t2
-
t1
)
/
1000.0
f
;
CGoGNout
<<
"import: "
<<
seconds
<<
" sec"
<<
CGoGNendl
;
...
...
@@ -820,9 +820,9 @@ int main(int argc, char** argv)
// myMap.closeMap(m) ;
}
CGoGNout
<<
myMap
.
getNbOrbits
(
VERTEX
_ORBIT
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
EDGE
_ORBIT
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
FACE
_ORBIT
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
VERTEX
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
EDGE
)
<<
CGoGNendl
;
CGoGNout
<<
myMap
.
getNbOrbits
(
FACE
)
<<
CGoGNendl
;
// compute width and position of object for centering
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
mgw
->
position
)
;
...
...
Apps/Examples/polyhedronsView.cpp
View file @
2a524b67
...
...
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
QApplication
app
(
argc
,
argv
);
MyQT
sqt
;
PFP
::
TVEC3
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
)
;
PFP
::
TVEC3
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
)
;
// create a cylinder
Algo
::
Modelisation
::
Polyhedron
<
PFP
>
prim1
(
myMap
,
position
);
...
...
Apps/Examples/scene.cpp
View file @
2a524b67
...
...
@@ -211,8 +211,8 @@ int main(int argc, char **argv)
myGlutWin
mgw
(
&
argc
,
argv
,
800
,
800
);
mgw
.
init
();
mgw
.
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
)
;
mgw
.
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
mgw
.
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
)
;
mgw
.
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
glewInit
();
if
(
!
Utils
::
GLSLShader
::
areShadersSupported
())
...
...
@@ -229,7 +229,7 @@ int main(int argc, char **argv)
prim1
.
cylinder_topo
(
16
,
15
,
true
,
true
);
prim1
.
embedCylinder
(
30.0
f
,
20.0
f
,
50.0
f
);
CellMarker
mark1
(
myMap
,
VERTEX
_CELL
);
CellMarker
mark1
(
myMap
,
VERTEX
);
prim1
.
mark
(
mark1
);
// create a sphere
...
...
@@ -237,7 +237,7 @@ int main(int argc, char **argv)
prim2
.
cylinder_topo
(
16
,
16
,
true
,
true
);
prim2
.
embedSphere
(
40.0
f
);
CellMarker
mark2
(
myMap
,
VERTEX
_CELL
);
CellMarker
mark2
(
myMap
,
VERTEX
);
prim2
.
mark
(
mark2
);
// create a sphere
...
...
@@ -245,7 +245,7 @@ int main(int argc, char **argv)
prim3
.
tore_topo
(
12
,
48
);
prim3
.
embedTore
(
50.0
f
,
10.0
f
);
CellMarker
mark3
(
myMap
,
VERTEX
_CELL
);
CellMarker
mark3
(
myMap
,
VERTEX
);
prim3
.
mark
(
mark3
);
...
...
Apps/Examples/simpleEMap3.cpp
View file @
2a524b67
...
...
@@ -390,8 +390,8 @@ int main(int argc, char **argv)
{
myGlutWin
mgw
(
&
argc
,
argv
,
800
,
800
);
mgw
.
idAttr_Position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
,
"Geom::Vec3f"
)
;
mgw
.
idAttr_Normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
,
"Geom::Vec3f"
)
;
mgw
.
idAttr_Position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
,
"Geom::Vec3f"
)
;
mgw
.
idAttr_Normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
,
"Geom::Vec3f"
)
;
AttributeHandler
<
PFP
::
VEC3
>
tablePositions
(
myMap
,
mgw
.
idAttr_Position
)
;
PFP
::
VEC3
gMax
;
...
...
Apps/Examples/simpleGMap2.cpp
View file @
2a524b67
...
...
@@ -384,7 +384,7 @@ int main(int argc, char **argv)
if
(
argc
<
2
)
{
mgw
.
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
)
;
mgw
.
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
)
;
Dart
d
=
myMap
.
newFace
(
4
);
Dart
e
=
myMap
.
newFace
(
3
);
...
...
@@ -415,10 +415,10 @@ int main(int argc, char **argv)
CGoGNerr
<<
"Import fail"
<<
CGoGNendl
;
exit
(
1
);
}
mgw
.
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
mgw
.
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
}
mgw
.
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
mgw
.
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
// pour le rendu
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
mgw
.
position
)
;
...
...
Apps/Examples/squelette3carte.cpp
View file @
2a524b67
...
...
@@ -297,7 +297,7 @@ void maillageTest()
int
main
(
int
argc
,
char
**
argv
)
{
//Initilisation du plongement geometrique
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
/*
* Chargement de maillages
...
...
Apps/Examples/ter_meshes.cpp
View file @
2a524b67
...
...
@@ -131,9 +131,9 @@ int main(int argc, char **argv)
return
1
;
}
// cree un handler d'attribut pour la position des points (créé lors de l'import)
AttributeHandler
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
AttributeHandler
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
// cree un handler pour les normales aux sommets
AttributeHandler
<
PFP
::
VEC3
>
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
);
AttributeHandler
<
PFP
::
VEC3
>
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
);
// // parcours de tous les brins de la carte:
...
...
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
{
fonction_exemple
<
PFP
>
(
myMap
,
position
,
d
);
// marque tous les brins de la face de d
mf
.
markOrbit
(
FACE
_ORBIT
,
d
);
mf
.
markOrbit
(
FACE
,
d
);
}
}
...
...
Apps/Examples/triangulation.cpp
View file @
2a524b67
...
...
@@ -127,7 +127,7 @@ void TriangulateFromDart(typename PFP::MAP& map, const AttributeHandler<typename
Dart
e
=
d
;
do
{
indices
.
push_back
(
map
.
getEmbedding
(
e
,
VERTEX
_ORBIT
)
);
// recupere l'indice du point dans le handler
indices
.
push_back
(
map
.
getEmbedding
(
e
,
VERTEX
)
);
// recupere l'indice du point dans le handler
e
=
map
.
phi1
(
e
);
// brin suivant dans la face
}
while
(
e
!=
d
);
// tq par revenu au debut
...
...
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
// creation of a new attribute on vertices of type 3D vector
// a handler to this attribute is returned
AttributeHandler
<
PFP
::
VEC3
>
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
AttributeHandler
<
PFP
::
VEC3
>
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
// creation face 1 (convexe)
Dart
d1
=
myMap
.
newFace
(
5
);
...
...
Apps/Examples/viewer.cpp
View file @
2a524b67
...
...
@@ -179,7 +179,7 @@ void Viewer::importMesh(std::string& filename)
CGoGNerr
<<
"could not import "
<<
filename
<<
CGoGNendl
;
return
;
}
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
POINTS
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
LINES
)
;
...
...
@@ -195,7 +195,7 @@ void Viewer::importMesh(std::string& filename)
vertexBaseSize
=
normalBaseSize
*
2.0
f
;
if
(
!
normal
.
isValid
())
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
)
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
Algo
::
Geometry
::
computeNormalVertices
<
PFP
>
(
myMap
,
position
,
normal
)
;
...
...
Apps/Tuto/tp_master.cpp
View file @
2a524b67
...
...
@@ -586,14 +586,14 @@ int main(int argc, char **argv)
{
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
)
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
);
Algo
::
Geometry
::
computeNormalVertices
<
PFP
>
(
myMap
,
position
,
normal
)
;
}
else
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
);
createMap
();
}
...
...
Apps/Tuto/tuto1.cpp
View file @
2a524b67
...
...
@@ -130,7 +130,7 @@ int main(int argc, char **argv)
// creation of a new attribute on vertices of type 3D vector
// a handler to this attribute is returned
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
// affect a position to the vertices of the mesh
position
[
d1
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
...
...
Apps/Tuto/tuto2.cpp
View file @
2a524b67
...
...
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
Dart
d3
=
myMap
.
newOrientedFace
(
4
);
myMap
.
sewFaces
(
d2
,
d3
);
position
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
_ORBIT
,
"position"
);
position
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
,
"position"
);
position
[
d2
]
=
PFP
::
VEC3
(
0.0
f
,
0.0
f
,
0.0
f
);
d2
=
myMap
.
phi1
(
d2
);
...
...
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
MapBrowserLinkedAuto
<
PFP
::
MAP
>
mbl
(
myMap
);
// on ajoute un brin par sommet dans le browser
myMap
.
foreach_orbit
(
VERTEX
_ORBIT
,
mbl
);
myMap
.
foreach_orbit
(
VERTEX
,
mbl
);
// et on parcours la sous-carte avec ce browser
TestDeParcoursAFF
<
PFP
>
(
myMap
,
mbl
,
position
);
...
...
@@ -186,7 +186,7 @@ int main(int argc, char **argv)
CGoGNout
<<
"Parcours avec le browser (le triangle)"
<<
CGoGNendl
;
// on cree un attribut Dart pour la liste
AutoAttributeHandler
<
Dart
>
tableLink
(
myMap
,
DART
_ORBIT
);
AutoAttributeHandler
<
Dart
>
tableLink
(
myMap
,
DART
);
// le browser
MapBrowserLinkedAttr
<
PFP
::
MAP
>
mbl2
(
tableLink
);
// que l'on remplit a la main
...
...
Apps/Tuto/tuto3.cpp
View file @
2a524b67
...
...
@@ -112,8 +112,8 @@ int main(int argc, char **argv)
Dart
d3
=
myMap
.
newOrientedFace
(
4
);
myMap
.
sewFaces
(
d2
,
d3
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
color
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"couleur"
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
color
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"couleur"
);
position
[
d2
]
=
PFP
::
VEC3
(
0.0
f
,
0.0
f
,
0.0
f
);
color
[
d2
]
=
PFP
::
VEC3
(
1.0
f
,
0.0
f
,
0.0
f
);
...
...
@@ -139,11 +139,11 @@ int main(int argc, char **argv)
DartMarkerStore
me
(
myMap
);
// avec lesquels on peut marquer des orbits
mf
.
markOrbit
(
FACE
_ORBIT
,
d2
);
me
.
markOrbit
(
EDGE
_ORBIT
,
d2
);
mf
.
markOrbit
(
FACE
,
d2
);
me
.
markOrbit
(
EDGE
,
d2
);
// les sommet sont plonges, on peut utiliser un marqueur de cellule sommet
CellMarker
cm
(
myMap
,
VERTEX
_ORBIT
);
CellMarker
cm
(
myMap
,
VERTEX
);
cm
.
mark
(
d3
);
for
(
Dart
d
=
myMap
.
begin
();
d
!=
myMap
.
end
();
myMap
.
next
(
d
))
...
...
@@ -204,8 +204,8 @@ int main(int argc, char **argv)
Dart
dx
=
myMap2
.
newOrientedFace
(
4
);
position2
=
myMap2
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
color2
=
myMap2
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"couleur"
);
position2
=
myMap2
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
color2
=
myMap2
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"couleur"
);
position2
[
dx
]
=
PFP
::
VEC3
(
0.0
f
,
0.0
f
,
0.0
f
);
color2
[
dx
]
=
PFP
::
VEC3
(
1.0
f
,
1.0
f
,
0.0
f
);
...
...
Apps/Tuto/tuto4.cpp
View file @
2a524b67
...
...
@@ -140,7 +140,7 @@ void MyQT::slider_explode(int x)
int
main
(
int
argc
,
char
**
argv
)
{
/// Utilisation des Marker
position
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
_ORBIT
,
"position"
);
position
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX
,
"position"
);
Algo
::
Modelisation
::
Polyhedron
<
PFP
>
prim3
(
myMap
,
position
);
Dart
d2
=
prim3
.
tore_topo
(
16
,
24
);
...
...
@@ -158,15 +158,15 @@ int main(int argc, char **argv)
// position[d3] = PFP::VEC3(2.0f, -2.0f, 0.0f);
// d3 = myMap.phi1(d3);
// unsigned int idAttV2 = myMap.addAttribute<float>(VERTEX
_ORBIT
,"reel");
// PFP::AttributeHandler<float> tableReels(idAttV2,VERTEX
_ORBIT
,myMap);
// unsigned int idAttV2 = myMap.addAttribute<float>(VERTEX,"reel");
// PFP::AttributeHandler<float> tableReels(idAttV2,VERTEX,myMap);
//
// tableReels[d2] = 3.5f;
// tableReels[myMap.phi1(d2)] = 3.7f;
//
// // Attention ici on cree un attribut de FACE donc les face sont maintenant plangees
// // l'attribut cree se detruira a la fin de la portee de l'objet
// PFP::MAP::AutoAttributeHandler<Geom::Vec3f> tableRGB(myMap, FACE
_ORBIT
, "RGB"); // "RGB" optionnel
// PFP::MAP::AutoAttributeHandler<Geom::Vec3f> tableRGB(myMap, FACE, "RGB"); // "RGB" optionnel
//
// tableRGB[d3] = Geom::Vec3f(1.0f,2.0f,3.0f);
//
...
...
@@ -182,7 +182,7 @@ int main(int argc, char **argv)
// CGoGNout << "RGB["<<id<<"] = "<<tableRGB.at(id)<<CGoGNendl;
// }
CellMarkerStore
cm
(
myMap
,
VERTEX
_ORBIT
);
CellMarkerStore
cm
(
myMap
,
VERTEX
);
Dart
d3
=
myMap
.
phi1
(
d2
);
cm
.
mark
(
d2
);
...
...
Apps/Tuto/tuto5.cpp
View file @
2a524b67
...
...
@@ -125,7 +125,7 @@ void MyQT::animate()
void
MyQT
::
storeVerticesInfo
()
{
CellMarker
mv
(
myMap
,
VERTEX
_CELL
);
CellMarker
mv
(
myMap
,
VERTEX
);
for
(
Dart
d
=
myMap
.
begin
();
d
!=
myMap
.
end
();
myMap
.
next
(
d
))
{
if
(
!
mv
.
isMarked
(
d
))
...
...
@@ -282,7 +282,7 @@ void MyQT::cb_keyPress(int code)
int
main
(
int
argc
,
char
**
argv
)
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
CGoGNout
<<
5.34
<<
" toto "
<<
Geom
::
Vec3f
(
2.5
,
2.2
,
4.3
)
<<
CGoGNendl
;
CGoGNout
<<
3
<<
" tutu "
<<
4
<<
CGoGNendl
;
...
...
Apps/Tuto/tuto_mt.cpp
View file @
2a524b67
...
...
@@ -82,10 +82,10 @@ void MyQT::cb_Open()
}
// recuper l'attribut pour la position des points (créé lors de l'import)
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
if
(
!
normal
.
isValid
())
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"normal"
);
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
);
Algo
::
Geometry
::
computeNormalVertices
<
PFP
>
(
myMap
,
position
,
normal
)
;
...
...
@@ -103,7 +103,7 @@ void MyQT::cb_Open()
void
MyQT
::
cb_New
()
{
if
(
!
position
.
isValid
())
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
_ORBIT
,
"position"
);