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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
0caa53f8
Commit
0caa53f8
authored
Jan 27, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modif social agent -> small city example
parent
32c0c874
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
Apps/Examples/SocialAgents/src/env_map.cpp
Apps/Examples/SocialAgents/src/env_map.cpp
+2
-2
Apps/Examples/SocialAgents/src/simulator.cpp
Apps/Examples/SocialAgents/src/simulator.cpp
+5
-6
Apps/Examples/SocialAgents/src/viewer.cpp
Apps/Examples/SocialAgents/src/viewer.cpp
+2
-2
No files found.
Apps/Examples/SocialAgents/src/env_map.cpp
View file @
0caa53f8
...
...
@@ -339,8 +339,8 @@ void EnvMap::addNeighborAgents(PFP::AGENTS agentsFrom,PFP::AGENTS agentsTo)
void
EnvMap
::
updateMap
()
{
// simplifyFaces();
//
subdivideFaces() ;
//
map.setCurrentLevel(map.getMaxLevel()) ;
subdivideFaces
()
;
map
.
setCurrentLevel
(
map
.
getMaxLevel
())
;
}
void
EnvMap
::
subdivideFaces
()
...
...
Apps/Examples/SocialAgents/src/simulator.cpp
View file @
0caa53f8
...
...
@@ -14,18 +14,17 @@ Simulator::Simulator() : agents_(), defaultAgent_(0), globalTime_(0.0f), timeSte
// CGoGN::CityGenerator::generateGrid<PFP,PFP::TVEC3>(envMap.map,envMap.position,100,100,50.0f,envMap.closeMark);
envMap
.
sideSize
=
70.0
f
;
//
CGoGN::CityGenerator::generateSmallCity<PFP,PFP::TVEC3>(envMap.map,envMap.position,envMap.closeMark,envMap.sideSize);
CGoGN
::
CityGenerator
::
generateSmallCity
<
PFP
,
PFP
::
TVEC3
>
(
envMap
.
map
,
envMap
.
position
,
envMap
.
closeMark
,
envMap
.
sideSize
);
// CGoGN::CityGenerator::generateAbsolutSpiralOfDeath<PFP>(envMap.map,envMap.position,envMap.closeMark,2000,0.25,110,100);
CGoGN
::
CityGenerator
::
generateToboggan
<
PFP
>
(
envMap
.
map
,
envMap
.
position
,
envMap
.
closeMark
,
100
,
0.25
,
200
,
10
);
// CGoGN::CityGenerator::generateToboggan<PFP>(envMap.map,envMap.position,envMap.closeMark,100,0.25,200,10);
// std::cout << "simplify" << std::endl;
// envMap.simplify();
//
envMap.map.init();
envMap
.
map
.
init
();
std
::
cout
<<
"setup scenario"
<<
std
::
endl
;
//
setupScenario();
setupHelicoidScenario
(
1
,
50
);
setupScenario
();
//
setupHelicoidScenario(1,50);
// Dart dStop=envMap.map.begin();
// for(unsigned int i=0;i<5000;++i) envMap.map.next(dStop);
...
...
Apps/Examples/SocialAgents/src/viewer.cpp
View file @
0caa53f8
...
...
@@ -388,9 +388,9 @@ void MyGlutWin::animate(void)
// std::cout << "pos to reach : " << posToReach << std::endl;
// std::cout << sim->getGlobalTime() << " " << std::endl;
updateVisualization
(
sim
);
//
sim->setPreferredVelocities(posToReach);
sim
->
setPreferredVelocities
(
posToReach
);
// sim->setPreferredPathVelocities();
sim
->
setPreferredNextCellVelocities
();
//
sim->setPreferredNextCellVelocities();
sim
->
doStep
();
// sim->envMap.simplify();
glutPostRedisplay
();
...
...
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