Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
67f9658c
Commit
67f9658c
authored
Oct 28, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update traversorCell
parent
109fc559
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
205 deletions
+91
-205
include/Topology/generic/traversor1.h
include/Topology/generic/traversor1.h
+0
-82
include/Topology/generic/traversor2.h
include/Topology/generic/traversor2.h
+0
-123
include/Topology/generic/traversorCell.h
include/Topology/generic/traversorCell.h
+91
-0
No files found.
include/Topology/generic/traversor1.h
View file @
67f9658c
...
...
@@ -34,47 +34,6 @@ namespace CGoGN
VERTEX CENTERED TRAVERSALS
*******************************************************************************/
// Traverse all the vertices of the map
template
<
typename
MAP
>
class
TraversorV
{
private:
MAP
&
m
;
DartMarker
mark
;
Dart
current
;
public:
TraversorV
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
mark
(
map
)
{}
Dart
begin
()
{
mark
.
unmarkAll
()
;
current
=
m
.
begin
()
;
if
(
current
==
m
.
end
())
current
=
NIL
;
else
mark
.
markOrbit
(
VERTEX
,
current
)
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
if
(
current
!=
NIL
)
{
while
(
current
!=
NIL
&&
mark
.
isMarked
(
current
))
{
m
.
next
(
current
)
;
if
(
current
==
m
.
end
())
current
=
NIL
;
}
if
(
current
!=
NIL
)
mark
.
markOrbit
(
VERTEX
,
current
)
;
}
return
current
;
}
}
;
// Traverse the edges incident to a given vertex
template
<
typename
MAP
>
class
Traversor1VE
...
...
@@ -152,47 +111,6 @@ public:
EDGE CENTERED TRAVERSALS
*******************************************************************************/
// Traverse all the vertices of the map
template
<
typename
MAP
>
class
TraversorE
{
private:
MAP
&
m
;
DartMarker
mark
;
Dart
current
;
public:
TraversorE
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
mark
(
map
)
{}
Dart
begin
()
{
mark
.
unmarkAll
()
;
current
=
m
.
begin
()
;
if
(
current
==
m
.
end
())
current
=
NIL
;
else
mark
.
markOrbit
(
EDGE
,
current
)
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
if
(
current
!=
NIL
)
{
while
(
current
!=
NIL
&&
mark
.
isMarked
(
current
))
{
m
.
next
(
current
)
;
if
(
current
==
m
.
end
())
current
=
NIL
;
}
if
(
current
!=
NIL
)
mark
.
markOrbit
(
EDGE
,
current
)
;
}
return
current
;
}
}
;
// Traverse the vertices incident to a given edge
template
<
typename
MAP
>
class
Traversor1EV
...
...
include/Topology/generic/traversor2.h
View file @
67f9658c
...
...
@@ -34,47 +34,6 @@ namespace CGoGN
VERTEX CENTERED TRAVERSALS
*******************************************************************************/
// Traverse all the vertices of the map
template
<
typename
MAP
>
class
TraversorV
{
private:
MAP
&
m
;
DartMarker
mark
;
Dart
current
;
public:
TraversorV
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
mark
(
map
)
{}
Dart
begin
()
{
mark
.
unmarkAll
()
;
current
=
m
.
begin
()
;
if
(
current
==
m
.
end
())
current
=
NIL
;
else
mark
.
markOrbit
(
VERTEX
,
current
)
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
if
(
current
!=
NIL
)
{
while
(
current
!=
NIL
&&
mark
.
isMarked
(
current
))
{
m
.
next
(
current
)
;
if
(
current
==
m
.
end
())
current
=
NIL
;
}
if
(
current
!=
NIL
)
mark
.
markOrbit
(
VERTEX
,
current
)
;
}
return
current
;
}
}
;
// Traverse the edges incident to a given vertex
template
<
typename
MAP
>
class
Traversor2VE
...
...
@@ -210,47 +169,6 @@ public:
EDGE CENTERED TRAVERSALS
*******************************************************************************/
// Traverse all the edges of the map
template
<
typename
MAP
>
class
TraversorE
{
private:
MAP
&
m
;
DartMarker
mark
;
Dart
current
;
public:
TraversorE
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
mark
(
map
)
{}
Dart
begin
()
{
mark
.
unmarkAll
()
;
current
=
m
.
begin
()
;
if
(
current
==
m
.
end
())
current
=
NIL
;
else
mark
.
markOrbit
(
EDGE
,
current
)
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
if
(
current
!=
NIL
)
{
while
(
current
!=
NIL
&&
mark
.
isMarked
(
current
))
{
m
.
next
(
current
)
;
if
(
current
==
m
.
end
())
current
=
NIL
;
}
if
(
current
!=
NIL
)
mark
.
markOrbit
(
EDGE
,
current
)
;
}
return
current
;
}
}
;
// Traverse the vertices incident to a given edge
template
<
typename
MAP
>
class
Traversor2EV
...
...
@@ -379,47 +297,6 @@ public:
FACE CENTERED TRAVERSALS
*******************************************************************************/
// Traverse all the faces of the map
template
<
typename
MAP
>
class
TraversorF
{
private:
MAP
&
m
;
DartMarker
mark
;
Dart
current
;
public:
TraversorF
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
mark
(
map
)
{}
Dart
begin
()
{
mark
.
unmarkAll
()
;
current
=
m
.
begin
()
;
if
(
current
==
m
.
end
())
current
=
NIL
;
else
mark
.
markOrbit
(
FACE
,
current
)
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
if
(
current
!=
NIL
)
{
while
(
current
!=
NIL
&&
mark
.
isMarked
(
current
))
{
m
.
next
(
current
)
;
if
(
current
==
m
.
end
())
current
=
NIL
;
}
if
(
current
!=
NIL
)
mark
.
markOrbit
(
FACE
,
current
)
;
}
return
current
;
}
}
;
// Traverse the vertices incident to a given face
template
<
typename
MAP
>
class
Traversor2FV
...
...
include/Topology/generic/traversorCell.h
0 → 100644
View file @
67f9658c
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2011, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.u-strasbg.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __TRAVERSOR_CELL_H__
#define __TRAVERSOR_CELL_H__
#include "Topology/generic/dart.h"
namespace
CGoGN
{
template
<
typename
MAP
,
unsigned
int
ORBIT
>
class
TraversorCell
{
private:
MAP
&
m
;
DartMarker
mark
;
Dart
current
;
public:
TraversorCell
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
mark
(
map
)
{}
Dart
begin
()
{
mark
.
unmarkAll
()
;
current
=
m
.
begin
()
;
if
(
current
==
m
.
end
())
current
=
NIL
;
else
mark
.
markOrbit
(
ORBIT
,
current
)
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
if
(
current
!=
NIL
)
{
while
(
current
!=
NIL
&&
mark
.
isMarked
(
current
))
{
m
.
next
(
current
)
;
if
(
current
==
m
.
end
())
current
=
NIL
;
}
if
(
current
!=
NIL
)
mark
.
markOrbit
(
ORBIT
,
current
)
;
}
return
current
;
}
}
;
template
<
typename
MAP
>
class
TraversorV
:
public
TraversorCell
<
MAP
,
VERTEX
>
{};
template
<
typename
MAP
>
class
TraversorE
:
public
TraversorCell
<
MAP
,
EDGE
>
{};
template
<
typename
MAP
>
class
TraversorF
:
public
TraversorCell
<
MAP
,
FACE
>
{};
template
<
typename
MAP
>
class
TraversorW
:
public
TraversorCell
<
MAP
,
VOLUME
>
{};
}
// namespace CGoGN
#endif
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