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
6ea92056
Commit
6ea92056
authored
May 13, 2015
by
Thomas Pitiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no onelevel diff
parent
8ae449f5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
479 deletions
+97
-479
include/env_map.h
include/env_map.h
+4
-6
src/env_map.cpp
src/env_map.cpp
+82
-462
src/needle.cpp
src/needle.cpp
+10
-10
src/simulator.cpp
src/simulator.cpp
+1
-1
No files found.
include/env_map.h
View file @
6ea92056
...
...
@@ -56,8 +56,6 @@ public:
bool
checkPointInCube
(
VEC3
pos
);
bool
checkFaces
();
// vérifie que tous les points des faces sont bien coplanaires si ce n'eest pas le cas renvoie true
bool
insideVolume
(
VEC3
pos
,
Dart
d
);
void
unStuckCell
(
Dart
cell
);
void
StuckCell
(
Dart
cell
);
REAL
volumeMaxdistance
(
Vol
volume
);
VEC3
normaleFromVolume
(
Dart
volume
,
Dart
face
);
void
open_file
(
std
::
string
filename
);
...
...
@@ -70,13 +68,13 @@ public:
float
maxCellRay
;
void
resetPartNeighborsFace
(
Dart
neighbor
,
unsigned
int
vLevel
);
void
simplifyNeedle
(
Dart
celltoSimplify
,
Dart
needleCell
);
bool
simplifyCellAgents
(
Dart
volume
);
bool
simplifyVolume
(
Dart
d
,
CellMarkerMemo
<
MAP
,
VOLUME
>&
smallCells
);
bool
subdivideVolume
(
Dart
d
,
bool
OneLevelDifference
=
true
);
bool
subdivideVolume
(
Dart
d
);
void
subdivideToMaxLevel
();
bool
subdivideMap
();
bool
simplifyMap
();
Dart
getBelongingCell
(
const
PFP
::
VEC3
&
pos
);
unsigned
int
nbAgentsToSubdivide
;
unsigned
int
nbAgentsToSimplify
;
...
...
@@ -95,8 +93,7 @@ public:
VolumeAttribute
<
TRIANGLES
,
MAP
>
RegisteredTriangles
;
VolumeAttribute
<
TRIANGLES
,
MAP
>
RegisteredNeighborTriangles
;
VolumeAttribute
<
Dart
,
MAP
>
OldestDart
;
VolumeAttribute
<
bool
,
MAP
>
CellOnMaxLevel
;
// remplacer apr marker ?
VolumeAttribute
<
bool
,
MAP
>
CellStuckCauseOneLevel
;
VolumeAttribute
<
bool
,
MAP
>
CellOnMaxLevel
;
// remplacer par marker ?
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
;
std
::
vector
<
Dart
>
getMemoCross
(
const
VEC3
&
pos
,
const
VEC3
&
dest
,
Dart
&
d1
,
unsigned
int
state
);
...
...
@@ -144,6 +141,7 @@ public:
#ifndef IHMap
Dart
volumeLowestIndex
(
Dart
v
);
#endif
}
;
/**************************************
...
...
src/env_map.cpp
View file @
6ea92056
This diff is collapsed.
Click to expand it.
src/needle.cpp
View file @
6ea92056
...
...
@@ -149,22 +149,22 @@ void Needle::move(VEC3 diff)
diff
*=
(
sim_
->
envMap_
.
maxCellRay
/
4
)
*
0.9
;
}
VEC3
pos
=
getPosition
(
0
)
+
diff
;
if
(
sim_
->
envMap_
.
map
.
isVolumeIncidentToBoundary
(
oldDart
))
{
if
(
!
sim_
->
envMap_
.
checkPointInMap
(
pos
,
oldDart
))
{
//
if(sim_->envMap_.map.isVolumeIncidentToBoundary(oldDart))
//
{
//
if(!sim_->envMap_.checkPointInMap(pos,oldDart))
//
{
pos
=
pos
-
diff
;
//
pos=pos-diff;
}
}
//
}
//
}
this
->
getParticule
(
0
)
->
move
(
pos
);
updateRegistration
();
this
->
unColor_close
(
oldDart
);
#ifdef IHMap
if
(
getParticule
(
0
)
->
newVol
)
if
(
getParticule
(
0
)
->
crossCell
!=
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
NO_CROSS
)
{
#ifdef DEBUG_affichage
...
...
@@ -198,7 +198,7 @@ void Needle::updateRegistration()
Dart
d2
=
this
->
getParticule
(
o
->
indexPart2
)
->
getCell
();
if
(
!
(
(
sim_
->
envMap_
.
map
.
sameVolume
(
d1
,
d2
))
&&
(
!
(
getParticule
(
o
->
indexPart1
)
->
newVol
)
&&
!
(
getParticule
(
o
->
indexPart2
)
->
newVol
))))
&&
(
!
(
getParticule
(
o
->
indexPart1
)
->
crossCell
!=
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
NO_CROSS
)
&&
!
(
getParticule
(
o
->
indexPart2
)
->
crossCell
!=
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
NO_CROSS
))))
{
sim_
->
envMap_
.
popAndPushSegment
(
o
);
...
...
@@ -230,7 +230,7 @@ Dart Needle::refine()
{
if
(
sim_
->
envMap_
.
subdivideVolume
(
volume
))
{
newold
=
volume
;
newold
=
this
->
getParticule
(
0
)
->
getCell
();
;
refine
();
}
}
...
...
src/simulator.cpp
View file @
6ea92056
...
...
@@ -47,7 +47,7 @@ void Simulator::doStep()
Dart
oldCell
=
ag
->
part_
->
getCell
();
ag
->
updatePosition
();
if
(
ag
->
part_
->
newVol
)
if
(
ag
->
part_
->
crossCell
!=
CGoGN
::
Algo
::
Volume
::
MovingObjects
::
NO_CROSS
)
{
envMap_
.
agentChangeFace
(
ag
,
oldCell
);
}
...
...
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