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
9684ff4c
Commit
9684ff4c
authored
Dec 08, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qq correctif mineur
parent
33cc8427
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
37 deletions
+40
-37
include/Algo/Export/exportPov.h
include/Algo/Export/exportPov.h
+1
-1
include/Algo/Geometry/volume.hpp
include/Algo/Geometry/volume.hpp
+2
-1
include/Algo/Modelisation/tetrahedralization.hpp
include/Algo/Modelisation/tetrahedralization.hpp
+21
-34
include/Algo/MovingObjects/particle_base.h
include/Algo/MovingObjects/particle_base.h
+6
-1
include/Algo/MovingObjects/particle_cell_2D.h
include/Algo/MovingObjects/particle_cell_2D.h
+5
-0
include/Algo/MovingObjects/particle_cell_2DandHalf.h
include/Algo/MovingObjects/particle_cell_2DandHalf.h
+5
-0
No files found.
include/Algo/Export/exportPov.h
View file @
9684ff4c
#ifndef EXPORT_POV_H
#define EXPORT_POV
#define EXPORT_POV
_H
#include "Topology/generic/attributeHandler.h"
#include "Utils/cgognStream.h"
...
...
include/Algo/Geometry/volume.hpp
View file @
9684ff4c
...
...
@@ -23,6 +23,7 @@
*******************************************************************************/
#include "Algo/Geometry/centroid.h"
#include "Algo/Modelisation/tetrahedralization.h"
namespace
CGoGN
{
...
...
@@ -60,7 +61,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const
{
typedef
typename
PFP
::
VEC3
VEC3
;
if
(
map
.
isVolumeTetrahedron
(
d
))
if
(
Modelisation
::
Tetrahedralization
::
isTetrahedron
<
PFP
>
(
map
,
d
))
return
tetrahedronVolume
<
PFP
>
(
map
,
d
,
position
)
;
else
{
...
...
include/Algo/Modelisation/tetrahedralization.hpp
View file @
9684ff4c
...
...
@@ -57,8 +57,7 @@ void hexahedronToTetrahedron(typename PFP::MAP& map, Dart d)
template
<
typename
PFP
>
bool
isTetrahedron
(
typename
PFP
::
MAP
&
the_map
,
Dart
d
)
{
DartMarkerStore
mark
(
*
the_map
);
// Lock a marker
bool
isTetrahedron
=
true
;
// Last return value
DartMarkerStore
mark
(
the_map
);
// Lock a marker
std
::
list
<
Dart
>
visitedFaces
;
// Faces that are traversed
visitedFaces
.
push_back
(
d
);
...
...
@@ -67,50 +66,38 @@ bool isTetrahedron(typename PFP::MAP& the_map, Dart d)
int
nbFaces
=
0
;
// Count the faces
//Test the number of faces end its valency
for
(
faces
=
visitedFaces
.
begin
()
;
isTetrahedron
&&
faces
!=
visitedFaces
.
end
()
;
++
faces
)
for
(
faces
=
visitedFaces
.
begin
()
;
faces
!=
visitedFaces
.
end
()
;
++
faces
)
{
Dart
dc
=
*
faces
;
//if this dart is not marked
if
(
!
mark
.
isMarked
(
dc
))
{
//increase the number of faces
nbFaces
++
;
if
(
nbFaces
>
4
)
//too much faces
return
false
;
//test the valency of this face
if
(
dc
!=
the_map
.
phi1
(
the_map
.
phi1
(
the_map
.
phi1
(
dc
))))
isTetrahedron
=
false
;
else
return
false
;
//mark the face and push adjacent faces
Dart
d1
=
dc
;
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
{
//mark them
mark
.
markOrbit
(
DART
,
dc
);
mark
.
mark
(
d1
);
//if phi2 not marked
if
(
!
mark
.
markOrbit
(
DART
,
the_map
.
phi2
(
dc
)))
visitedFaces
.
push_back
(
the_map
.
phi2
(
dc
));
//increase the number of faces
nbFaces
++
;
//too much faces
if
(
nbFaces
>
4
)
isTetrahedron
=
false
;
// or count the size of the face
else
{
mark
.
markOrbit
(
DART
,
the_map
.
phi1
(
dc
));
//if phi12 not marked
if
(
!
mark
.
markOrbit
(
DART
,
the_map
.
phi2
(
the_map
.
phi1
(
dc
))))
visitedFaces
.
push_back
(
the_map
.
phi2
(
the_map
.
phi1
(
dc
)));
mark
.
markOrbit
(
DART
,
the_map
.
phi_1
(
dc
));
//if phi_12 not marked
if
(
!
mark
.
markOrbit
(
DART
,
the_map
.
phi2
(
the_map
.
phi_1
(
dc
))))
visitedFaces
.
push_back
(
the_map
.
phi2
(
the_map
.
phi_1
(
dc
)));
}
Dart
d2
=
the_map
.
phi2
(
d1
);
if
(
!
mark
.
isMarked
(
d2
))
visitedFaces
.
push_back
(
d2
);
d1
=
the_map
.
phi1
(
dc
);
}
}
}
//nettoyage
mark
.
unmarkAll
();
return
isTetrahedron
;
return
true
;
}
/************************************************************************************************
...
...
@@ -272,8 +259,8 @@ void swap4To4(typename PFP::MAP& map, Dart d)
map
.
unsewVolumes
(
d
);
map
.
unsewVolumes
(
map
.
phi2
(
map
.
phi3
(
dd
)));
Algo
::
Modelisation
::
Tetrahedron
::
swap2To2
<
PFP
>
(
map
,
dd
);
Algo
::
Modelisation
::
Tetrahedron
::
swap2To2
<
PFP
>
(
map
,
e
);
Algo
::
Modelisation
::
Tetrahedr
alizati
on
::
swap2To2
<
PFP
>
(
map
,
dd
);
Algo
::
Modelisation
::
Tetrahedr
alizati
on
::
swap2To2
<
PFP
>
(
map
,
e
);
//sew middle darts so that they do not cross
map
.
sewVolumes
(
d
,
map
.
phi2
(
map
.
phi3
(
e
)));
...
...
include/Algo/MovingObjects/particle_base.h
View file @
9684ff4c
...
...
@@ -34,12 +34,17 @@ class ParticleBase
/**
* @param newPosition new position to reach
*/
bool
move
(
VEC3
position
)
virtual
bool
move
(
VEC3
position
)
{
m_position
=
position
;
return
true
;
}
virtual
unsigned
int
getState
()
{
return
0
;
}
VEC3
getPosition
()
{
return
m_position
;
}
};
...
...
include/Algo/MovingObjects/particle_cell_2D.h
View file @
9684ff4c
...
...
@@ -76,6 +76,11 @@ public :
void
faceState
(
const
VEC3
&
current
);
virtual
unsigned
int
getState
()
{
return
state
;
}
void
move
(
const
VEC3
&
newCurrent
)
{
crossCell
=
NO_CROSS
;
...
...
include/Algo/MovingObjects/particle_cell_2DandHalf.h
View file @
9684ff4c
...
...
@@ -70,6 +70,11 @@ public :
void
faceState
(
VEC3
current
);
virtual
unsigned
int
getState
()
{
return
state
;
}
void
move
(
const
VEC3
&
newCurrent
)
{
crossCell
=
NO_CROSS
;
...
...
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