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
Sauvage
CGoGN
Commits
f9dac96f
Commit
f9dac96f
authored
Oct 27, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout fctions g-cartes
parent
750381ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
7 deletions
+69
-7
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
+9
-7
include/Topology/gmap/gmap2.h
include/Topology/gmap/gmap2.h
+16
-0
src/Topology/gmap/gmap2.cpp
src/Topology/gmap/gmap2.cpp
+44
-0
No files found.
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
f9dac96f
...
...
@@ -167,10 +167,10 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 current, Geom::Orientation3D sid
faceState
(
current
);
return
;
case
Geom
::
OVER
:
{
//transform the displacement into the new entered face
VEC3
displ
=
current
-
m_position
;
VEC3
edge
=
Algo
::
Geom
::
vectorOutOfDart
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
VEC3
edge
=
Algo
::
Geom
etry
::
vectorOutOfDart
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
edge
.
normalize
();
VEC3
n
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
current
=
m_position
+
((
displ
^
n
)
*
displ
.
norm
());
...
...
@@ -178,6 +178,7 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 current, Geom::Orientation3D sid
d
=
m
.
phi1
(
m
.
phi2
(
d
));
faceState
(
current
);
return
;
}
default
:
state
=
EDGE
;
}
...
...
@@ -311,12 +312,13 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 current)
default
:
if
(
wsoe
==
Geom
::
ON
)
{
d
=
m
.
phi1
(
d
);
//to check
m_position
=
m_positions
[
d
];
vertexState
(
current
);
std
::
cout
<<
__FILE__
<<
" to uncomment and check"
<<
std
::
endl
;
// d = m.phi1(d); //to check
// m_position = m_positions[d];
//
// vertexState(current);
}
else
//
else
{
// CGoGNout << "wsoe : " << wsoe << CGoGNendl;
// CGoGNout << "current " << current << " " << m_position << CGoGNendl;
...
...
include/Topology/gmap/gmap2.h
View file @
f9dac96f
...
...
@@ -246,12 +246,28 @@ public:
* Return or set various topological information
*************************************************************************/
//! Test if dart d and e belong to the same oriented vertex
/*! @param d a dart
* @param e a dart
*/
bool
sameOrientedVertex
(
Dart
d
,
Dart
e
);
//! Test if dart d and e belong to the same vertex
/*! @param d a dart
* @param e a dart
*/
bool
sameVertex
(
Dart
d
,
Dart
e
);
//! Test if dart d and e belong to the same oriented volume
/*! @param d a dart
* @param e a dart
*/
bool
sameOrientedVolume
(
Dart
d
,
Dart
e
);
//! Test if dart d and e belong to the same volume
/*! @param d a dart
* @param e a dart
*/
bool
sameVolume
(
Dart
d
,
Dart
e
);
/**
...
...
src/Topology/gmap/gmap2.cpp
View file @
f9dac96f
...
...
@@ -426,6 +426,19 @@ void GMap2::closeMap(DartMarker& marker)
* Return or set various topological information
*************************************************************************/
bool
GMap2
::
sameOrientedVertex
(
Dart
d
,
Dart
e
)
{
Dart
dNext
=
d
;
// Foreach dart dNext in the vertex of d
do
{
if
(
dNext
==
e
)
// Test equality with e
return
true
;
dNext
=
alpha1
(
dNext
);
}
while
(
dNext
!=
d
);
return
false
;
// None is equal to e => vertices are distinct
}
bool
GMap2
::
sameVertex
(
Dart
d
,
Dart
e
)
{
Dart
dNext
=
d
;
// Foreach dart dNext in the vertex of d
...
...
@@ -438,6 +451,37 @@ bool GMap2::sameVertex(Dart d, Dart e)
return
false
;
// None is equal to e => vertices are distinct
}
bool
GMap2
::
sameOrientedVolume
(
Dart
d
,
Dart
e
)
{
DartMarkerStore
mark
(
*
this
);
// Lock a marker
bool
found
=
false
;
// Last functor return value
std
::
list
<
Dart
>
visitedFaces
;
// Faces that are traversed
visitedFaces
.
push_back
(
d
);
// Start with the face of d
std
::
list
<
Dart
>::
iterator
face
;
// For every face added to the list
for
(
face
=
visitedFaces
.
begin
();
!
found
&&
face
!=
visitedFaces
.
end
();
++
face
)
{
if
(
!
mark
.
isMarked
(
*
face
))
// Face has not been visited yet
{
Dart
dNext
=
*
face
;
do
{
if
(
dNext
==
e
)
return
true
;
mark
.
mark
(
dNext
);
// Mark
Dart
adj
=
phi2
(
dNext
);
// Get adjacent face
if
(
adj
!=
dNext
&&
!
mark
.
isMarked
(
adj
))
visitedFaces
.
push_back
(
adj
);
// Add it
dNext
=
phi1
(
dNext
);
}
while
(
dNext
!=
*
face
);
}
}
return
false
;
}
bool
GMap2
::
sameVolume
(
Dart
d
,
Dart
e
)
{
DartMarkerStore
mark
(
*
this
);
// Lock a marker
...
...
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