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
Hurstel
CGoGN
Commits
c403f8c1
Commit
c403f8c1
authored
May 16, 2013
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some changes
parent
4d46728d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
25 deletions
+72
-25
include/Algo/ImplicitHierarchicalMesh/subdivision.h
include/Algo/ImplicitHierarchicalMesh/subdivision.h
+1
-1
include/Algo/ImplicitHierarchicalMesh/subdivision.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision.hpp
+12
-13
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+48
-6
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
+2
-3
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+9
-2
No files found.
include/Algo/ImplicitHierarchicalMesh/subdivision.h
View file @
c403f8c1
...
...
@@ -41,7 +41,7 @@ template <typename PFP>
void
subdivideEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
;
template
<
typename
PFP
>
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
;
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
bool
forceTri
=
true
)
;
template
<
typename
PFP
>
void
coarsenEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
;
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision.hpp
View file @
c403f8c1
...
...
@@ -61,7 +61,7 @@ void subdivideEdge(typename PFP::MAP& map, Dart d, VertexAttribute<typename PFP:
}
template
<
typename
PFP
>
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
bool
forceTri
)
{
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"
)
;
...
...
@@ -89,7 +89,7 @@ void subdivideFace(typename PFP::MAP& map, Dart d, VertexAttribute<typename PFP:
map
.
setCurrentLevel
(
fLevel
+
1
)
;
// go to the next level to perform face subdivision
if
(
degree
==
3
)
// if subdividing a triangle
if
(
degree
==
3
&&
forceTri
)
// if subdividing a triangle
{
Dart
dd
=
map
.
phi1
(
old
)
;
Dart
e
=
map
.
phi1
(
map
.
phi1
(
dd
))
;
...
...
@@ -134,17 +134,16 @@ void subdivideFace(typename PFP::MAP& map, Dart d, VertexAttribute<typename PFP:
}
else
if
(
t
==
2
)
{
if
(
dId
==
eId
)
{
std
::
cout
<<
"plop"
<<
std
::
endl
;
map
.
setEdgeId
(
dit
,
0
);
map
.
setEdgeId
(
map
.
phi2
(
dit
),
0
);
}
else
{
map
.
setEdgeId
(
dit
,
1
);
map
.
setEdgeId
(
map
.
phi2
(
dit
),
1
);
}
if
(
dId
==
eId
)
{
map
.
setEdgeId
(
dit
,
0
);
map
.
setEdgeId
(
map
.
phi2
(
dit
),
0
);
}
else
{
map
.
setEdgeId
(
dit
,
1
);
map
.
setEdgeId
(
map
.
phi2
(
dit
),
1
);
}
}
else
if
(
t
==
3
)
{
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
c403f8c1
...
...
@@ -121,8 +121,8 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
Dart dd = map.phi1(old) ;
Dart e = map.phi1(map.phi1(dd)) ;
map.splitFace(dd, e) ; // insert a new edge
unsigned
int
id
=
map
.
getNewEdgeId
()
;
map
.
setEdgeId
(
map
.
phi_1
(
dd
),
id
,
EDGE
)
;
// set the edge id of the inserted edge to the next available id
//
unsigned int id = map.getNewEdgeId() ;
//
map.setEdgeId(map.phi_1(dd), id, EDGE) ; // set the edge id of the inserted edge to the next available id
unsigned int idface = map.getFaceId(old);
map.setFaceId(dd, idface, FACE) ;
...
...
@@ -131,8 +131,8 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
dd = e ;
e = map.phi1(map.phi1(dd)) ;
map.splitFace(dd, e) ;
id
=
map
.
getNewEdgeId
()
;
map
.
setEdgeId
(
map
.
phi_1
(
dd
),
id
,
EDGE
)
;
//
id = map.getNewEdgeId() ;
//
map.setEdgeId(map.phi_1(dd), id, EDGE) ;
map.setFaceId(dd, idface, FACE) ;
map.setFaceId(e, idface, FACE) ;
...
...
@@ -140,11 +140,53 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
dd = e ;
e = map.phi1(map.phi1(dd)) ;
map.splitFace(dd, e) ;
id
=
map
.
getNewEdgeId
()
;
map
.
setEdgeId
(
map
.
phi_1
(
dd
),
id
,
EDGE
)
;
//
id = map.getNewEdgeId() ;
//
map.setEdgeId(map.phi_1(dd), id, EDGE) ;
map.setFaceId(dd, idface, FACE) ;
map.setFaceId(e, idface, FACE) ;
Dart stop = map.phi2(map.phi1(old));
Dart dit = stop;
do
{
unsigned int dId = map.getEdgeId(map.phi_1(map.phi2(dit)));
unsigned int eId = map.getEdgeId(map.phi1(map.phi2(dit)));
unsigned int t = dId + eId;
if(t == 0)
{
map.setEdgeId(dit, 1, EDGE) ;
map.setEdgeId(map.phi2(dit), 1, EDGE) ;
}
else if(t == 1)
{
map.setEdgeId(dit, 2, EDGE) ;
map.setEdgeId(map.phi2(dit), 2, EDGE) ;
}
else if(t == 2)
{
if(dId == eId)
{
map.setEdgeId(dit, 0, EDGE) ;
map.setEdgeId(map.phi2(dit), 0, EDGE) ;
}
else
{
map.setEdgeId(dit, 1, EDGE) ;
map.setEdgeId(map.phi2(dit), 1, EDGE) ;
}
}
else if(t == 3)
{
map.setEdgeId(dit, 0, EDGE) ;
map.setEdgeId(map.phi2(dit), 0, EDGE) ;
}
dit = map.phi1(dit);
}while(dit != stop);
}
else
{
...
...
src/Algo/ImplicitHierarchicalMesh/ihm.cpp
View file @
c403f8c1
...
...
@@ -69,10 +69,9 @@ void ImplicitHierarchicalMap::initImplicitProperties()
//initEdgeId() ;
//init each edge Id at 0
TraversorE
<
ImplicitHierarchicalMap
>
te
(
*
this
);
for
(
Dart
dit
=
te
.
begin
()
;
dit
!=
te
.
next
()
;
dit
=
te
.
next
())
for
(
Dart
d
=
Map2
::
begin
();
d
!=
Map2
::
end
();
Map2
::
next
(
d
))
{
m_edgeId
[
d
it
]
=
0
;
m_edgeId
[
d
]
=
0
;
}
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
...
...
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
View file @
c403f8c1
...
...
@@ -72,8 +72,15 @@ void ImplicitHierarchicalMap3::clear(bool removeAttrib)
void
ImplicitHierarchicalMap3
::
initImplicitProperties
()
{
initEdgeId
()
;
initFaceId
();
//initEdgeId() ;
//initFaceId();
for
(
Dart
d
=
Map3
::
begin
();
d
!=
Map3
::
end
();
Map3
::
next
(
d
))
{
m_edgeId
[
d
]
=
0
;
m_faceId
[
d
]
=
0
;
}
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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