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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
70b2a513
Commit
70b2a513
authored
Apr 26, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orbit as template -> viewer OK
parent
cb1ede68
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
410 additions
and
439 deletions
+410
-439
Apps/Examples/viewer.cpp
Apps/Examples/viewer.cpp
+5
-5
Apps/Examples/viewer.h
Apps/Examples/viewer.h
+3
-2
include/Algo/Export/export.h
include/Algo/Export/export.h
+8
-8
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+29
-37
include/Algo/Geometry/area.h
include/Algo/Geometry/area.h
+10
-10
include/Algo/Geometry/area.hpp
include/Algo/Geometry/area.hpp
+10
-10
include/Algo/Geometry/basic.h
include/Algo/Geometry/basic.h
+4
-4
include/Algo/Geometry/boundingbox.h
include/Algo/Geometry/boundingbox.h
+1
-1
include/Algo/Geometry/centroid.h
include/Algo/Geometry/centroid.h
+9
-9
include/Algo/Geometry/centroid.hpp
include/Algo/Geometry/centroid.hpp
+3
-3
include/Algo/Geometry/normal.h
include/Algo/Geometry/normal.h
+9
-9
include/Algo/Geometry/normal.hpp
include/Algo/Geometry/normal.hpp
+9
-9
include/Algo/Import/import2tables.h
include/Algo/Import/import2tables.h
+1
-1
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+31
-31
include/Algo/Import/import2tablesVolume.hpp
include/Algo/Import/import2tablesVolume.hpp
+3
-3
include/Algo/Import/importMesh.hpp
include/Algo/Import/importMesh.hpp
+14
-14
include/Algo/Import/importMoka.hpp
include/Algo/Import/importMoka.hpp
+7
-7
include/Algo/Import/importNodeEle.hpp
include/Algo/Import/importNodeEle.hpp
+8
-8
include/Algo/Import/importObjEle.hpp
include/Algo/Import/importObjEle.hpp
+8
-8
include/Algo/Import/importTet.hpp
include/Algo/Import/importTet.hpp
+8
-8
include/Algo/Import/importTs.hpp
include/Algo/Import/importTs.hpp
+9
-11
include/Algo/Modelisation/polyhedron.h
include/Algo/Modelisation/polyhedron.h
+10
-15
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+9
-19
include/Algo/Render/GL2/mapRender.h
include/Algo/Render/GL2/mapRender.h
+6
-7
include/Algo/Render/GL2/mapRender.hpp
include/Algo/Render/GL2/mapRender.hpp
+21
-21
include/Algo/Render/GL2/topoRender.h
include/Algo/Render/GL2/topoRender.h
+3
-4
include/Algo/Render/GL2/topoRender.hpp
include/Algo/Render/GL2/topoRender.hpp
+6
-6
include/Topology/generic/attribmap.hpp
include/Topology/generic/attribmap.hpp
+43
-0
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+123
-0
src/Topology/generic/attribmap.cpp
src/Topology/generic/attribmap.cpp
+0
-43
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+0
-126
No files found.
Apps/Examples/viewer.cpp
View file @
70b2a513
...
...
@@ -201,7 +201,7 @@ void Viewer::importMesh(std::string& filename)
if
(
extension
==
std
::
string
(
".map"
))
{
myMap
.
loadMapBin
(
filename
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
)
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"position"
)
;
}
else
{
...
...
@@ -211,7 +211,7 @@ void Viewer::importMesh(std::string& filename)
CGoGNerr
<<
"could not import "
<<
filename
<<
CGoGNendl
;
return
;
}
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
}
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
POINTS
)
;
...
...
@@ -224,9 +224,9 @@ void Viewer::importMesh(std::string& filename)
normalBaseSize
=
bb
.
diagSize
()
/
100.0
f
;
// vertexBaseSize = normalBaseSize / 5.0f ;
normal
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
normal
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"normal"
)
;
if
(
!
normal
.
isValid
())
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"normal"
)
;
normal
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"normal"
)
;
Algo
::
Geometry
::
computeNormalVertices
<
PFP
>
(
myMap
,
position
,
normal
)
;
...
...
@@ -246,7 +246,7 @@ void Viewer::exportMesh(std::string& filename)
Algo
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
filename
.
c_str
(),
allDarts
)
;
else
if
(
extension
.
compare
(
0
,
4
,
std
::
string
(
".ply"
))
==
0
)
{
std
::
vector
<
PFP
::
TVEC3
*>
attributes
;
std
::
vector
<
AttributeHandler
<
VEC3
,
VERTEX
>
*>
attributes
;
attributes
.
push_back
(
&
position
)
;
Algo
::
Export
::
exportPLYnew
<
PFP
>
(
myMap
,
attributes
,
filename
.
c_str
(),
true
,
allDarts
)
;
}
...
...
Apps/Examples/viewer.h
View file @
70b2a513
...
...
@@ -59,6 +59,7 @@ struct PFP: public PFP_STANDARD
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
class
Viewer
:
public
Utils
::
QT
::
SimpleQT
{
...
...
@@ -92,8 +93,8 @@ public:
bool
m_drawNormals
;
bool
m_drawTopo
;
PFP
::
TVEC3
position
;
PFP
::
TVEC3
normal
;
AttributeHandler
<
VEC3
,
VERTEX
>
position
;
AttributeHandler
<
VEC3
,
VERTEX
>
normal
;
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Algo
::
Render
::
GL2
::
TopoRender
*
m_topoRender
;
...
...
include/Algo/Export/export.h
View file @
70b2a513
...
...
@@ -46,7 +46,7 @@ namespace Export
* @return true
*/
template
<
typename
PFP
>
bool
exportPLY
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
bool
binary
,
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportPLY
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
const
bool
binary
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a PLY file
...
...
@@ -57,7 +57,7 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
* @return true
*/
template
<
typename
PFP
>
bool
exportPLYnew
(
typename
PFP
::
MAP
&
map
,
const
std
::
vector
<
typename
PFP
::
TVEC3
*
>&
attributeHandlers
,
const
char
*
filename
,
const
bool
binary
,
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportPLYnew
(
typename
PFP
::
MAP
&
map
,
const
std
::
vector
<
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
*
>&
attributeHandlers
,
const
char
*
filename
,
const
bool
binary
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a OFF file
...
...
@@ -66,7 +66,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
* @return true
*/
template
<
typename
PFP
>
bool
exportOFF
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportOFF
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a Trian file
...
...
@@ -75,7 +75,7 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
* @return true
*/
template
<
typename
PFP
>
bool
exportTrian
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportTrian
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format).
...
...
@@ -90,7 +90,7 @@ bool exportTrian(typename PFP::MAP& map, const typename PFP::TVEC3& position, ch
* @return true
*/
//template <typename PFP>
//bool exportPlySLFgeneric(typename PFP::MAP& map, const
typename PFP::TVEC3
& position, const char* filename, const FunctorSelect& good = allDarts) ;
//bool exportPlySLFgeneric(typename PFP::MAP& map, const
AttributeHandler<typename PFP::VEC3, VERTEX>
& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format).
...
...
@@ -105,7 +105,7 @@ bool exportTrian(typename PFP::MAP& map, const typename PFP::TVEC3& position, ch
* @return true
*/
//template <typename PFP>
//bool exportPlySLFgenericBin(typename PFP::MAP& map, const
typename PFP::TVEC3
& position, const char* filename, const FunctorSelect& good = allDarts) ;
//bool exportPlySLFgenericBin(typename PFP::MAP& map, const
AttributeHandler<typename PFP::VEC3, VERTEX>
& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYSLF file (K. Vanhoey generic format).
...
...
@@ -120,7 +120,7 @@ bool exportTrian(typename PFP::MAP& map, const typename PFP::TVEC3& position, ch
* @return true
*/
template
<
typename
PFP
>
bool
exportPlyPTMgeneric
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportPlyPTMgeneric
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format)
...
...
@@ -132,7 +132,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
* @return true
*/
template
<
typename
PFP
>
bool
exportPLYPTM
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
frame
[
3
],
const
typename
PFP
::
TVEC3
colorPTM
[
6
],
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportPLYPTM
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
frame
[
3
],
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
colorPTM
[
6
],
const
FunctorSelect
&
good
=
allDarts
)
;
}
// namespace Export
...
...
include/Algo/Export/export.hpp
View file @
70b2a513
...
...
@@ -38,7 +38,7 @@ namespace Export
{
template
<
typename
PFP
>
bool
exportPLY
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
bool
binary
,
const
FunctorSelect
&
good
)
bool
exportPLY
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
bool
binary
,
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
...
...
@@ -67,7 +67,7 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
vertices
.
reserve
(
nbDarts
/
6
)
;
// Go over all faces
CellMarker
markV
(
map
,
VERTEX
)
;
CellMarker
<
VERTEX
>
markV
(
map
)
;
TraversorF
<
MAP
>
t
(
map
,
good
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
...
...
@@ -78,7 +78,7 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
for
(
Dart
it
=
tfv
.
begin
();
it
!=
tfv
.
end
();
it
=
tfv
.
next
())
{
++
degree
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
vNum
=
map
.
template
getEmbedding
<
VERTEX
>(
it
)
;
if
(
!
markV
.
isMarked
(
it
))
{
markV
.
mark
(
it
)
;
...
...
@@ -165,7 +165,7 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
}
template
<
typename
PFP
>
bool
exportPLYnew
(
typename
PFP
::
MAP
&
map
,
const
std
::
vector
<
typename
PFP
::
TVEC3
*>&
attributeHandlers
,
const
char
*
filename
,
bool
binary
,
const
FunctorSelect
&
good
)
bool
exportPLYnew
(
typename
PFP
::
MAP
&
map
,
const
std
::
vector
<
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
*>&
attributeHandlers
,
const
char
*
filename
,
bool
binary
,
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
...
...
@@ -194,7 +194,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
vertices
.
reserve
(
nbDarts
/
6
)
;
// Go over all faces
CellMarker
markV
(
map
,
VERTEX
)
;
CellMarker
<
VERTEX
>
markV
(
map
)
;
TraversorF
<
MAP
>
t
(
map
,
good
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
...
...
@@ -205,7 +205,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
for
(
Dart
it
=
tfv
.
begin
();
it
!=
tfv
.
end
();
it
=
tfv
.
next
())
{
++
degree
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
vNum
=
map
.
template
getEmbedding
<
VERTEX
>(
it
)
;
if
(
!
markV
.
isMarked
(
it
))
{
markV
.
mark
(
it
)
;
...
...
@@ -241,7 +241,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
out
<<
"comment or contact : cgogn@unistra.fr"
<<
std
::
endl
;
// Vertex elements
out
<<
"element vertex "
<<
vertices
.
size
()
<<
std
::
endl
;
for
(
typename
std
::
vector
<
typename
PFP
::
TVEC3
*
>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
for
(
typename
std
::
vector
<
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
*
>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
{
if
((
*
attrHandler
)
->
isValid
()
&&
((
*
attrHandler
)
->
getOrbit
()
==
VERTEX
)
)
{
...
...
@@ -281,7 +281,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
{
// ascii vertices
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
for
(
typename
std
::
vector
<
typename
PFP
::
TVEC3
*
>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
for
(
typename
std
::
vector
<
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
*
>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
if
((
*
attrHandler
)
->
isValid
()
&&
(
*
attrHandler
)
->
getOrbit
()
==
VERTEX
)
out
<<
(
*
(
*
attrHandler
))[
vertices
[
i
]]
<<
std
::
endl
;
...
...
@@ -298,7 +298,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
{
// binary vertices
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
for
(
typename
std
::
vector
<
typename
PFP
::
TVEC3
*>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
for
(
typename
std
::
vector
<
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
*>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
if
((
*
attrHandler
)
->
isValid
()
&&
(
*
attrHandler
)
->
getOrbit
()
==
VERTEX
)
{
const
typename
PFP
::
VEC3
&
v
=
(
*
(
*
attrHandler
))[
vertices
[
i
]]
;
...
...
@@ -320,7 +320,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<typename PFP::TVEC3*
}
template
<
typename
PFP
>
bool
exportOFF
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
bool
exportOFF
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
...
...
@@ -342,7 +342,7 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
std
::
vector
<
unsigned
int
>
vertices
;
vertices
.
reserve
(
nbDarts
/
6
)
;
CellMarker
markV
(
map
,
VERTEX
)
;
CellMarker
<
VERTEX
>
markV
(
map
)
;
TraversorF
<
MAP
>
t
(
map
,
good
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
{
...
...
@@ -353,7 +353,7 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
for
(
Dart
it
=
tfv
.
begin
();
it
!=
tfv
.
end
();
it
=
tfv
.
next
())
{
++
degree
;
unsigned
int
vNum
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
vNum
=
map
.
template
getEmbedding
<
VERTEX
>(
it
)
;
if
(
!
markV
.
isMarked
(
it
))
{
markV
.
mark
(
it
)
;
...
...
@@ -387,13 +387,11 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
}
template
<
typename
PFP
>
bool
exportPlyPTMgeneric
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
bool
exportPlyPTMgeneric
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
TVEC3
TVEC3
;
typedef
typename
PFP
::
REAL
REAL
;
typedef
typename
PFP
::
TREAL
TREAL
;
std
::
ofstream
out
(
filename
,
std
::
ios
::
out
)
;
if
(
!
out
.
good
())
...
...
@@ -402,8 +400,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
return
false
;
}
AutoAttributeHandler
<
unsigned
int
>
tableVertLab
(
map
,
VERTEX
);
AutoAttributeHandler
<
unsigned
int
,
VERTEX
>
tableVertLab
(
map
);
unsigned
int
nbDarts
=
map
.
getNbDarts
()
;
...
...
@@ -413,7 +410,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
vertices
.
reserve
(
nbDarts
/
5
);
// TODO non optimal reservation
faces
.
reserve
(
nbDarts
/
3
);
CellMarker
markV
(
map
,
VERTEX
);
CellMarker
<
VERTEX
>
markV
(
map
);
TraversorF
<
MAP
>
t
(
map
,
good
)
;
unsigned
int
lab
=
0
;
unsigned
int
nbf
=
0
;
...
...
@@ -427,7 +424,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
{
markV
.
mark
(
it
);
tableVertLab
[
it
]
=
lab
++
;
vertices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
it
));
vertices
.
push_back
(
map
.
template
getEmbedding
<
VERTEX
>(
it
));
}
face
.
push_back
(
tableVertLab
[
it
]);
}
...
...
@@ -439,13 +436,13 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
++
nbf
;
}
TVEC3
frame
[
3
]
;
TVEC3
colorPTM
[
15
]
;
AttributeHandler
<
VEC3
,
VERTEX
>
frame
[
3
]
;
AttributeHandler
<
VEC3
,
VERTEX
>
colorPTM
[
15
]
;
frame
[
0
]
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
"frame_T"
)
;
frame
[
1
]
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
"frame_B"
)
;
frame
[
2
]
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
"frame_N"
)
;
for
(
unsigned
i
=
0
;
i
<
15
;
++
i
)
for
(
unsigned
i
nt
i
=
0
;
i
<
15
;
++
i
)
{
std
::
stringstream
name
;
name
<<
"colorPTM_a"
<<
i
;
...
...
@@ -476,9 +473,9 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
for
(
unsigned
int
coefI
=
0
;
coefI
<
nbCoefs
;
++
coefI
)
out
<<
"property float C2_a"
<<
coefI
<<
std
::
endl
;
TREAL
errL2
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"errL2"
)
;
TREAL
errLmax
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"errLmax"
)
;
TREAL
stdDev
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"stdDev"
)
;
AttributeHandler
<
REAL
,
VERTEX
>
errL2
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"errL2"
)
;
AttributeHandler
<
REAL
,
VERTEX
>
errLmax
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"errLmax"
)
;
AttributeHandler
<
REAL
,
VERTEX
>
stdDev
=
map
.
template
getAttribute
<
REAL
>(
VERTEX
,
"stdDev"
)
;
if
(
errL2
.
isValid
())
out
<<
"property float errL2"
<<
std
::
endl
;
if
(
errLmax
.
isValid
())
...
...
@@ -529,13 +526,11 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
}
/*
template <typename PFP>
bool exportPlySLFgeneric(typename PFP::MAP& map, const
typename PFP::TVEC3
& position, const char* filename, const FunctorSelect& good)
bool exportPlySLFgeneric(typename PFP::MAP& map, const
AttributeHandler<typename PFP::VEC3, VERTEX>
& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::TVEC3 TVEC3;
typedef typename PFP::REAL REAL;
typedef typename PFP::TREAL TREAL;
std::ofstream out(filename, std::ios::out) ;
if (!out.good())
...
...
@@ -546,7 +541,6 @@ bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
AutoAttributeHandler<unsigned int> tableVertLab(map, VERTEX);
unsigned int nbDarts = map.getNbDarts() ;
std::vector<unsigned int> vertices;
...
...
@@ -581,7 +575,7 @@ bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
++nbf;
}
TVEC3
frame[3] ;
AttributeHandler<typename PFP::VEC3, VERTEX>
frame[3] ;
std::vector<TVEC3> coefs ;
frame[0] = map.template getAttribute<VEC3>(VERTEX, "frame_T") ;
...
...
@@ -663,13 +657,11 @@ bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
}
template <typename PFP>
bool exportPlySLFgenericBin(typename PFP::MAP& map, const
typename PFP::TVEC3
& position, const char* filename, const FunctorSelect& good)
bool exportPlySLFgenericBin(typename PFP::MAP& map, const
AttributeHandler<typename PFP::VEC3, VERTEX>
& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
typedef typename PFP::TVEC3 TVEC3;
typedef typename PFP::REAL REAL;
typedef typename PFP::TREAL TREAL;
std::ofstream out(filename, std::ios::out) ;
if (!out.good())
...
...
@@ -806,7 +798,7 @@ bool exportPlySLFgenericBin(typename PFP::MAP& map, const typename PFP::TVEC3& p
*/
template
<
typename
PFP
>
bool
exportPLYPTM
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
frame
[
3
],
const
typename
PFP
::
TVEC3
colorPTM
[
6
],
const
FunctorSelect
&
good
)
bool
exportPLYPTM
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
frame
[
3
],
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
colorPTM
[
6
],
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
...
...
@@ -818,7 +810,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
return
false
;
}
AutoAttributeHandler
<
unsigned
int
>
tableVertLab
(
map
,
VERTEX
);
AutoAttributeHandler
<
unsigned
int
,
VERTEX
>
tableVertLab
(
map
);
unsigned
int
nbDarts
=
map
.
getNbDarts
()
;
...
...
@@ -828,7 +820,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
vertices
.
reserve
(
nbDarts
/
5
);
// TODO non optimal reservation
faces
.
reserve
(
nbDarts
/
3
);
CellMarker
markV
(
map
,
VERTEX
);
CellMarker
<
VERTEX
>
markV
(
map
);
TraversorF
<
MAP
>
t
(
map
,
good
)
;
unsigned
int
lab
=
0
;
unsigned
int
nbf
=
0
;
...
...
@@ -842,7 +834,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
{
markV
.
mark
(
it
);
tableVertLab
[
it
]
=
lab
++
;
vertices
.
push_back
(
map
.
getEmbedding
<
VERTEX
>
(
it
));
vertices
.
push_back
(
map
.
template
getEmbedding
<
VERTEX
>(
it
));
}
face
.
push_back
(
tableVertLab
[
it
]);
}
...
...
include/Algo/Geometry/area.h
View file @
70b2a513
...
...
@@ -35,34 +35,34 @@ namespace Geometry
{
template
<
typename
PFP
>
typename
PFP
::
REAL
triangleArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
;
typename
PFP
::
REAL
triangleArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
;
template
<
typename
PFP
>
typename
PFP
::
REAL
convexFaceArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
;
typename
PFP
::
REAL
convexFaceArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
;
template
<
typename
PFP
>
typename
PFP
::
REAL
totalArea
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
FunctorSelect
&
select
=
allDarts
,
unsigned
int
thread
=
0
)
;
typename
PFP
::
REAL
totalArea
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
FunctorSelect
&
select
=
allDarts
,
unsigned
int
thread
=
0
)
;
template
<
typename
PFP
>
typename
PFP
::
REAL
vertexOneRingArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
;
typename
PFP
::
REAL
vertexOneRingArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
;
template
<
typename
PFP
>
typename
PFP
::
REAL
vertexBarycentricArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
;
typename
PFP
::
REAL
vertexBarycentricArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
;
template
<
typename
PFP
>
typename
PFP
::
REAL
vertexVoronoiArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
;
typename
PFP
::
REAL
vertexVoronoiArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
;
template
<
typename
PFP
>
void
computeAreaFaces
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
face_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
void
computeAreaFaces
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
FACE
>
&
face_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
template
<
typename
PFP
>
void
computeOneRingAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
vertex_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
void
computeOneRingAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
VERTEX
>
&
vertex_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
template
<
typename
PFP
>
void
computeBarycentricAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
vertex_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
void
computeBarycentricAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
VERTEX
>
&
vertex_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
template
<
typename
PFP
>
void
computeVoronoiAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
vertex_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
void
computeVoronoiAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
VERTEX
>
&
vertex_area
,
const
FunctorSelect
&
select
=
allDarts
)
;
}
// namespace Geometry
...
...
include/Algo/Geometry/area.hpp
View file @
70b2a513
...
...
@@ -37,7 +37,7 @@ namespace Geometry
{
template
<
typename
PFP
>
typename
PFP
::
REAL
triangleArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
REAL
triangleArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
VEC3
p1
=
position
[
d
]
;
typename
PFP
::
VEC3
p2
=
position
[
map
.
phi1
(
d
)]
;
...
...
@@ -47,7 +47,7 @@ typename PFP::REAL triangleArea(typename PFP::MAP& map, Dart d, const typename P
}
template
<
typename
PFP
>
typename
PFP
::
REAL
convexFaceArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
REAL
convexFaceArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typedef
typename
PFP
::
VEC3
VEC3
;
...
...
@@ -69,7 +69,7 @@ typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Dart d, const typename
}
template
<
typename
PFP
>
typename
PFP
::
REAL
totalArea
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
FunctorSelect
&
select
,
unsigned
int
thread
)
typename
PFP
::
REAL
totalArea
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
FunctorSelect
&
select
,
unsigned
int
thread
)
{
typename
PFP
::
REAL
area
(
0
)
;
TraversorF
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
...
...
@@ -79,7 +79,7 @@ typename PFP::REAL totalArea(typename PFP::MAP& map, const typename PFP::TVEC3&
}
template
<
typename
PFP
>
typename
PFP
::
REAL
vertexOneRingArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
REAL
vertexOneRingArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
REAL
area
(
0
)
;
Traversor2VF
<
typename
PFP
::
MAP
>
t
(
map
,
d
)
;
...
...
@@ -89,7 +89,7 @@ typename PFP::REAL vertexOneRingArea(typename PFP::MAP& map, Dart d, const typen
}
template
<
typename
PFP
>
typename
PFP
::
REAL
vertexBarycentricArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
REAL
vertexBarycentricArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
REAL
area
(
0
)
;
Traversor2VF
<
typename
PFP
::
MAP
>
t
(
map
,
d
)
;
...
...
@@ -99,7 +99,7 @@ typename PFP::REAL vertexBarycentricArea(typename PFP::MAP& map, Dart d, const t
}
template
<
typename
PFP
>
typename
PFP
::
REAL
vertexVoronoiArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
REAL
vertexVoronoiArea
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
REAL
area
(
0
)
;
Traversor2VF
<
typename
PFP
::
MAP
>
t
(
map
,
d
)
;
...
...
@@ -127,7 +127,7 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const typen
}
template
<
typename
PFP
>
void
computeAreaFaces
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
face_area
,
const
FunctorSelect
&
select
)
void
computeAreaFaces
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
FACE
>
&
face_area
,
const
FunctorSelect
&
select
)
{
TraversorF
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
@@ -135,7 +135,7 @@ void computeAreaFaces(typename PFP::MAP& map, const typename PFP::TVEC3& positio
}
template
<
typename
PFP
>
void
computeOneRingAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
vertex_area
,
const
FunctorSelect
&
select
)
void
computeOneRingAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
VERTEX
>
&
vertex_area
,
const
FunctorSelect
&
select
)
{
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
@@ -143,7 +143,7 @@ void computeOneRingAreaVertices(typename PFP::MAP& map, const typename PFP::TVEC
}
template
<
typename
PFP
>
void
computeBarycentricAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
vertex_area
,
const
FunctorSelect
&
select
)
void
computeBarycentricAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
VERTEX
>
&
vertex_area
,
const
FunctorSelect
&
select
)
{
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
@@ -151,7 +151,7 @@ void computeBarycentricAreaVertices(typename PFP::MAP& map, const typename PFP::
}
template
<
typename
PFP
>
void
computeVoronoiAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
typename
PFP
::
TREAL
&
vertex_area
,
const
FunctorSelect
&
select
)
void
computeVoronoiAreaVertices
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
AttributeHandler
<
typename
PFP
::
REAL
,
VERTEX
>
&
vertex_area
,
const
FunctorSelect
&
select
)
{
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
for
(
Dart
d
=
t
.
begin
();
d
!=
t
.
end
();
d
=
t
.
next
())
...
...
include/Algo/Geometry/basic.h
View file @
70b2a513
...
...
@@ -40,7 +40,7 @@ namespace Geometry
* vectorOutOfDart return a dart from the position of vertex attribute of d to the position of vertex attribute of phi1(d)
*/
template
<
typename
PFP
>
inline
typename
PFP
::
VEC3
vectorOutOfDart
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
inline
typename
PFP
::
VEC3
vectorOutOfDart
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
VEC3
vec
=
position
[
map
.
phi1
(
d
)]
;
vec
-=
position
[
d
]
;
...
...
@@ -48,14 +48,14 @@ inline typename PFP::VEC3 vectorOutOfDart(typename PFP::MAP& map, Dart d, const
}
template
<
typename
PFP
>
inline
typename
PFP
::
REAL
edgeLength
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
inline
typename
PFP
::
REAL
edgeLength
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
VEC3
v
=
vectorOutOfDart
<
PFP
>
(
map
,
d
,
position
)
;
return
v
.
norm
()
;
}
template
<
typename
PFP
>
inline
float
angle
(
typename
PFP
::
MAP
&
map
,
Dart
d1
,
Dart
d2
,
const
typename
PFP
::
TVEC3
&
position
)
inline
float
angle
(
typename
PFP
::
MAP
&
map
,
Dart
d1
,
Dart
d2
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
typename
PFP
::
VEC3
v1
=
vectorOutOfDart
<
PFP
>
(
map
,
d1
,
position
)
;
typename
PFP
::
VEC3
v2
=
vectorOutOfDart
<
PFP
>
(
map
,
d2
,
position
)
;
...
...
@@ -63,7 +63,7 @@ inline float angle(typename PFP::MAP& map, Dart d1, Dart d2, const typename PFP:
}
template
<
typename
PFP
>
bool
isTriangleObtuse
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
bool
isTriangleObtuse
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
return
Geom
::
isTriangleObtuse
(
position
[
d
],
position
[
map
.
phi1
(
d
)],
position
[
map
.
phi_1
(
d
)])
;
}
...
...
include/Algo/Geometry/boundingbox.h
View file @
70b2a513
...
...
@@ -39,7 +39,7 @@ namespace Geometry
{
template
<
typename
PFP
>
Geom
::
BoundingBox
<
typename
PFP
::
VEC3
>
computeBoundingBox
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
FunctorSelect
&
select
=
allDarts
)
Geom
::
BoundingBox
<
typename
PFP
::
VEC3
>
computeBoundingBox
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
FunctorSelect
&
select
=
allDarts
)
{
Geom
::
BoundingBox
<
typename
PFP
::
VEC3
>
bb
;
TraversorV
<
typename
PFP
::
MAP
>
t
(
map
,
select
)
;
...
...
include/Algo/Geometry/centroid.h
View file @
70b2a513
...
...
@@ -59,9 +59,9 @@ EMB volumeCentroidGen(typename PFP::MAP& map, Dart d, const EMBV& attributs);
* @param position the vector of attribute
*/
template
<
typename
PFP
>
typename
PFP
::
VEC3
volumeCentroid
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
VEC3
volumeCentroid
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
return
volumeCentroidGen
<
PFP
,
typename
PFP
::
TVEC3
,
typename
PFP
::
VEC3
>
(
map
,
d
,
position
);
return
volumeCentroidGen
<
PFP
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
,
typename
PFP
::
VEC3
>
(
map
,
d
,
position
);
}
/**
...
...
@@ -85,9 +85,9 @@ EMB faceCentroidGen(typename PFP::MAP& map, Dart d, const EMBV& attributs);
* @param position the vector of attribute
*/
template
<
typename
PFP
>
typename
PFP
::
VEC3
faceCentroid
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
typename
PFP
::
TVEC3
&
position
)
typename
PFP
::
VEC3
faceCentroid
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
return
faceCentroidGen
<
PFP
,
typename
PFP
::
TVEC3
,
typename
PFP
::
VEC3
>
(
map
,
d
,
position
);
return
faceCentroidGen
<
PFP
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
,
typename
PFP
::
VEC3
>
(
map
,
d
,
position
);