Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
d4283bc0
Commit
d4283bc0
authored
Feb 01, 2011
by
Pierre Kraemer
Browse files
SocialAgents -> simplif faces
parent
4cbe43d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Apps/Examples/SocialAgents/src/env_map.cpp
View file @
d4283bc0
...
...
@@ -338,7 +338,7 @@ void EnvMap::addNeighborAgents(PFP::AGENTS agentsFrom,PFP::AGENTS agentsTo)
void
EnvMap
::
updateMap
()
{
simplifyFaces
()
;
//
simplifyFaces() ;
subdivideFaces
()
;
map
.
setCurrentLevel
(
map
.
getMaxLevel
())
;
}
...
...
@@ -432,14 +432,18 @@ void EnvMap::simplifyFaces()
{
Dart
old
=
map
.
faceOldestDart
(
d
)
;
map
.
setCurrentLevel
(
cur
-
1
)
;
Dart
fit
=
old
;
do
if
(
map
.
faceIsSubdividedOnce
(
old
))
{
map
.
setCurrentLevel
(
cur
)
;
map
.
setCurrentLevel
(
cur
-
1
)
;
fit
=
phi1
(
fit
)
;
}
while
(
fit
!=
d
)
;
unsigned
int
nbAgents
=
0
;
Dart
fit
=
old
;
do
{
map
.
setCurrentLevel
(
cur
)
;
nbAgents
+=
agentvect
[
fit
].
size
()
;
map
.
setCurrentLevel
(
cur
-
1
)
;
fit
=
map
.
phi1
(
fit
)
;
}
while
(
fit
!=
old
)
;
}
map
.
setCurrentLevel
(
cur
)
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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