Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
CGoGN
Commits
a5e78af2
Commit
a5e78af2
authored
May 24, 2012
by
untereiner
Browse files
changing TVEC3 to AttributeHander<VEC3> in IHM3 and export choupi
parent
e42d0200
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/Algo/Export/export.h
View file @
a5e78af2
...
...
@@ -142,7 +142,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const AttributeH
* @return
*/
template
<
typename
PFP
>
bool
exportChoupi
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
T
VEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportChoupi
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
}
// namespace Export
...
...
include/Algo/Export/export.hpp
View file @
a5e78af2
...
...
@@ -911,7 +911,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const AttributeH
}
template
<
typename
PFP
>
bool
exportChoupi
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
T
VEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
bool
exportChoupi
(
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
;
...
...
@@ -923,19 +923,19 @@ bool exportChoupi(typename PFP::MAP& map, const typename PFP::TVEC3& position, c
return
false
;
}
out
<<
map
.
getNbOrbits
(
VERTEX
)
<<
" "
<<
map
.
getNbOrbits
(
EDGE
)
<<
std
::
endl
;
out
<<
map
.
template
getNbOrbits
<
VERTEX
>(
)
<<
" "
<<
map
.
template
getNbOrbits
<
EDGE
>(
)
<<
std
::
endl
;
TraversorV
<
typename
PFP
::
MAP
>
travV
(
map
);
for
(
Dart
dit
=
travV
.
begin
()
;
dit
!=
travV
.
end
()
;
dit
=
travV
.
next
())
{
out
<<
map
.
getEmbedding
(
VERTEX
,
dit
)
<<
" "
<<
position
[
dit
]
<<
std
::
endl
;
out
<<
map
.
template
getEmbedding
<
VERTEX
>(
dit
)
<<
" "
<<
position
[
dit
]
<<
std
::
endl
;
}
TraversorE
<
typename
PFP
::
MAP
>
travE
(
map
);
unsigned
int
indexE
=
0
;
for
(
Dart
dit
=
travE
.
begin
()
;
dit
!=
travE
.
end
()
;
dit
=
travE
.
next
())
{
out
<<
indexE
<<
" "
<<
map
.
getEmbedding
(
VERTEX
,
dit
)
<<
" "
<<
map
.
getEmbedding
(
VERTEX
,
map
.
phi2
(
dit
))
<<
std
::
endl
;
out
<<
indexE
<<
" "
<<
map
.
template
getEmbedding
<
VERTEX
>(
dit
)
<<
" "
<<
map
.
template
getEmbedding
<
VERTEX
>(
map
.
phi2
(
dit
))
<<
std
::
endl
;
++
indexE
;
}
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.h
View file @
a5e78af2
...
...
@@ -46,26 +46,26 @@ enum SubdivideType
***********************************************************************************/
template
<
typename
PFP
>
void
subdivideEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
;
void
subdivideEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
;
template
<
typename
PFP
>
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
,
SubdivideType
sType
=
S_TRI
);
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
SubdivideType
sType
=
S_TRI
);
template
<
typename
PFP
>
Dart
subdivideVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
Dart
subdivideVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
template
<
typename
PFP
>
Dart
subdivideVolumeGen
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
Dart
subdivideVolumeGen
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
template
<
typename
PFP
>
Dart
subdivideVolumeClassic
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
Dart
subdivideVolumeClassic
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
template
<
typename
PFP
>
Dart
subdivideVolumeClassic2
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
Dart
subdivideVolumeClassic2
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
template
<
typename
PFP
>
void
subdivideLoop
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
void
subdivideLoop
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
/***********************************************************************************
...
...
@@ -73,13 +73,13 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
***********************************************************************************/
template
<
typename
PFP
>
void
coarsenEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
void
coarsenEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
template
<
typename
PFP
>
void
coarsenFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
,
SubdivideType
sType
=
S_TRI
);
void
coarsenFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
SubdivideType
sType
=
S_TRI
);
template
<
typename
PFP
>
void
coarsenVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
void
coarsenVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
/***********************************************************************************
* Raffinement
...
...
@@ -88,7 +88,7 @@ void coarsenVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
* Un brin de la face oppose aux faces a spliter
*/
template
<
typename
PFP
>
void
splitVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
);
void
splitVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
);
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
a5e78af2
...
...
@@ -37,7 +37,7 @@ namespace IHM
template
<
typename
PFP
>
void
subdivideEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
void
subdivideEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
edgeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided edge"
)
;
...
...
@@ -70,7 +70,7 @@ void subdivideEdge(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
}
template
<
typename
PFP
>
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
,
SubdivideType
sType
)
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
SubdivideType
sType
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
faceIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided face"
)
;
...
...
@@ -176,7 +176,7 @@ void subdivideFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
}
template
<
typename
PFP
>
Dart
subdivideVolumeClassic
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
Dart
subdivideVolumeClassic
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
volumeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided volume"
)
;
...
...
@@ -381,7 +381,7 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, typename PFP::TVEC3&
}
template
<
typename
PFP
>
Dart
subdivideVolumeClassic2
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
Dart
subdivideVolumeClassic2
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
volumeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided volume"
)
;
...
...
@@ -515,7 +515,7 @@ Dart subdivideVolumeClassic2(typename PFP::MAP& map, Dart d, typename PFP::TVEC3
}
template
<
typename
PFP
>
void
subdivideLoop
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
void
subdivideLoop
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
volumeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided volume"
)
;
...
...
@@ -690,7 +690,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
}
while
(
f
!=
x
);
}
map
.
embedOrbit
<
VERTEX
>
(
centralDart
,
map
.
getEmbedding
<
VERTEX
>
(
centralDart
));
map
.
template
embedOrbit
<
VERTEX
>(
centralDart
,
map
.
template
getEmbedding
<
VERTEX
>(
centralDart
));
//Third step : 3-sew internal faces
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
it
=
subdividedfaces
.
begin
();
it
!=
subdividedfaces
.
end
();
++
it
)
...
...
@@ -710,7 +710,7 @@ void subdivideLoop(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
template
<
typename
PFP
>
Dart
subdivideVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
Dart
subdivideVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
volumeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided volume"
)
;
...
...
@@ -1084,7 +1084,7 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi
template
<
typename
PFP
>
Dart
subdivideVolumeGen
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
Dart
subdivideVolumeGen
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
volumeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided volume"
)
;
...
...
@@ -1547,7 +1547,7 @@ Dart subdivideVolumeGen(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& pos
template
<
typename
PFP
>
void
coarsenEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
void
coarsenEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
map
.
edgeCanBeCoarsened
(
d
)
||
!
"Trying to coarsen an edge that can not be coarsened"
)
;
...
...
@@ -1559,7 +1559,7 @@ void coarsenEdge(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position)
}
template
<
typename
PFP
>
void
coarsenFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
,
SubdivideType
sType
)
void
coarsenFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
,
SubdivideType
sType
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
map
.
faceIsSubdividedOnce
(
d
)
||
!
"Trying to coarsen a non-subdivided face or a more than once subdivided face"
)
;
...
...
@@ -1614,7 +1614,7 @@ void coarsenFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position,
}
template
<
typename
PFP
>
void
coarsenVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
void
coarsenVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
//assert(map.volumeIsSubdivdedOnce(d) || !"Trying to coarsen a non-subdivided volume or a more than once subdivided volume") ;
...
...
@@ -1714,7 +1714,7 @@ void coarsenVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
* Raffinement
***********************************************************************************/
template
<
typename
PFP
>
void
splitVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
T
VEC3
&
position
)
void
splitVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>
&
position
)
{
assert
(
map
.
getDartLevel
(
d
)
<=
map
.
getCurrentLevel
()
||
!
"Access to a dart introduced after current level"
)
;
assert
(
!
map
.
volumeIsSubdivided
(
d
)
||
!
"Trying to subdivide an already subdivided volume"
)
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment