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
S
SocialAgents3D
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
SocialAgents3D
Commits
e7780e3e
Commit
e7780e3e
authored
Mar 18, 2015
by
Thomas Pitiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attention on va tout changer
parent
a1267f46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
include/env_map.h
include/env_map.h
+2
-2
src/env_map.cpp
src/env_map.cpp
+18
-13
No files found.
include/env_map.h
View file @
e7780e3e
...
...
@@ -151,9 +151,9 @@ inline bool removeElementFromVector(std::vector<T>& a, T ag)
inline
std
::
vector
<
Dart
>
EnvMap
::
getMemoCross
(
const
VEC3
&
pos
,
const
VEC3
&
dest
,
Dart
&
d1
)
{
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
ParticleCell3DMemo
<
PFP
>
*
registering_part
=
new
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
ParticleCell3DMemo
<
PFP
>
(
map
,
d1
,
pos
,
position
);
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
ParticleCell3DMemo
<
PFP
>
registering_part
(
map
,
d1
,
pos
,
position
);
std
::
vector
<
Dart
>
result
=
(
registering_part
->
move
(
dest
));
std
::
vector
<
Dart
>
result
=
(
registering_part
.
move
(
dest
));
// d2=registering_part->d;
// CGoGNout<<"d1 : "<< *d1<<"|| d2 : "<< *d2<<"|| start : "<< pos<<"|| stop : "<< dest<<CGoGNendl;
return
result
;
...
...
src/env_map.cpp
View file @
e7780e3e
...
...
@@ -270,7 +270,7 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en
if
(
mo
!=
NULL
)
{
int
n1
=
o
->
indexPart1
;
int
n2
=
o
->
indexPart2
;
//
int n2 = o->indexPart2;
#ifdef DEBUG_affichage
CGoGNout
<<
"First Registration arete "
<<
o
->
index
<<
CGoGNendl
;
#endif
...
...
@@ -278,21 +278,21 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en
VEC3
p2
=
o
->
p2
;
Dart
d1
=
mo
->
parts_
[
n1
]
->
d
;
Dart
d2
=
mo
->
parts_
[
n2
]
->
d
;
//
Dart d2=mo->parts_[n2]->d;
std
::
vector
<
Dart
>
memo
;
memo
=
getMemoCross
(
p1
,
p2
,
d1
);
if
(
map
.
sameVolume
(
d1
,
d2
))
{
pushAOneCellSegment
(
o
,
d1
);
}
else
{
//
if(map.sameVolume(d1,d2))
//
{
//
pushAOneCellSegment(o , d1);
//
}
//
else
//
{
pushSegmentInSetOfCells
(
o
,
memo
);
}
//
}
}
}
...
...
@@ -627,7 +627,7 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
const
std
::
chrono
::
time_point
<
std
::
chrono
::
system_clock
>
endPop
=
std
::
chrono
::
system_clock
::
now
();
duration_pop
=
endPop
-
startPop
;
std
::
cout
<<
"pop duration : "
<<
duration_pop
.
count
()
<<
"s
\n
"
;
if
(
duration_pop
.
count
()
>
0.035
)
std
::
cout
<<
"pop duration : "
<<
duration_pop
.
count
()
<<
"s
\n
"
;
const
std
::
chrono
::
time_point
<
std
::
chrono
::
system_clock
>
startSubdiv
=
std
::
chrono
::
system_clock
::
now
();
...
...
@@ -639,7 +639,7 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
const
std
::
chrono
::
time_point
<
std
::
chrono
::
system_clock
>
endSubdiv
=
std
::
chrono
::
system_clock
::
now
();
duration_subdiv
=
endSubdiv
-
startSubdiv
;
std
::
cout
<<
"subdiv duration : "
<<
duration_subdiv
.
count
()
<<
"s
\n
"
;
if
(
duration_subdiv
.
count
()
>
0.035
)
std
::
cout
<<
"subdiv duration : "
<<
duration_subdiv
.
count
()
<<
"s
\n
"
;
map
.
setCurrentLevel
(
map
.
getMaxLevel
())
;
// map.check();
...
...
@@ -680,6 +680,8 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
{
FirstRegistrationSegment
(
o
)
;
}
const
std
::
chrono
::
time_point
<
std
::
chrono
::
system_clock
>
endPushSegmentNeighbors
=
std
::
chrono
::
system_clock
::
now
();
//same for obstacles contained
for
(
Segment
*
o
:
oldobst
)
{
...
...
@@ -690,8 +692,11 @@ bool EnvMap::subdivideVolume(Dart dglobal, bool OneLevelDifference)
const
std
::
chrono
::
time_point
<
std
::
chrono
::
system_clock
>
endPush
=
std
::
chrono
::
system_clock
::
now
();
duration_push
=
endPush
-
startPush
;
std
::
cout
<<
"push triangle duration : "
<<
std
::
chrono
::
duration
<
double
>
(
endPushTriangle
-
startPush
).
count
()
<<
"s
\n
"
;
std
::
cout
<<
"push duration : "
<<
duration_push
.
count
()
<<
"s
\n
"
;
std
::
chrono
::
duration
<
double
>
duration_triangle
=
(
endPushTriangle
-
startPush
);
std
::
chrono
::
duration
<
double
>
duration_segment
=
(
endPush
-
endPushSegmentNeighbors
);
std
::
chrono
::
duration
<
double
>
duration_segmentNeighbor
=
(
endPushSegmentNeighbors
-
endPushTriangle
);
if
(
duration_triangle
.
count
()
>
0.035
)
std
::
cout
<<
"push triangle duration : "
<<
duration_triangle
.
count
()
<<
"s
\n
"
;
if
(
duration_push
.
count
()
>
0.035
)
std
::
cout
<<
"push duration : "
<<
duration_push
.
count
()
<<
"
\n
dont pour les segments présents : "
<<
duration_segment
.
count
()
<<
"s
\n
et pour les voisins :"
<<
duration_segmentNeighbor
.
count
()
<<
"s
\n
"
;
#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