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
bb14948f
Commit
bb14948f
authored
Mar 19, 2015
by
Thomas Pitiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some change
parent
9d618d97
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
40 deletions
+37
-40
include/surface.h
include/surface.h
+2
-2
src/ArticulatedObject.cpp
src/ArticulatedObject.cpp
+2
-2
src/env_map.cpp
src/env_map.cpp
+0
-1
src/simulator.cpp
src/simulator.cpp
+17
-17
src/surface.cpp
src/surface.cpp
+0
-2
src/viewer.cpp
src/viewer.cpp
+16
-16
No files found.
include/surface.h
View file @
bb14948f
...
...
@@ -57,8 +57,8 @@ public:
bool
removeGeneralNeighbor
(
Dart
d
);
std
::
vector
<
Dart
>
*
belonging_cells
;
std
::
vector
<
Dart
>
*
neighbor_cells
;
std
::
vector
<
std
::
vector
<
Dart
>
>
belonging_cells
;
std
::
vector
<
std
::
vector
<
Dart
>
>
neighbor_cells
;
std
::
vector
<
std
::
pair
<
Dart
,
int
>
>
general_belonging
;
std
::
vector
<
std
::
pair
<
Dart
,
int
>
>
general_neighbors
;
...
...
src/ArticulatedObject.cpp
View file @
bb14948f
...
...
@@ -11,8 +11,8 @@ ArticulatedObject::ArticulatedObject() :
,
nbEdges
(
0u
)
,
parts_
(
std
::
vector
<
PARTICULE
*>
())
,
Segments_
(
std
::
vector
<
Segment
*>
())
,
belonging_cells
(
NULL
)
,
neighbor_cells
(
NULL
)
,
belonging_cells
(
std
::
vector
<
std
::
vector
<
Dart
>>
()
)
,
neighbor_cells
(
std
::
vector
<
std
::
vector
<
Dart
>>
()
)
,
width
(
0.
)
,
sim_
(
NULL
)
,
index_articulated
(
0u
)
...
...
src/env_map.cpp
View file @
bb14948f
...
...
@@ -286,7 +286,6 @@ void EnvMap::FirstRegistrationSegment(Segment * o)// réenregistre l'Segment en
if
(
memo
.
size
()
==
1u
)
{
std
::
cout
<<
"COUCOU !! "
<<
std
::
endl
;
pushAOneCellSegment
(
o
,
d1
);
}
else
...
...
src/simulator.cpp
View file @
bb14948f
...
...
@@ -26,8 +26,8 @@ void Simulator::init(int argc, char **argv)
else
Needle_or_knife
=
true
;
//
initFixedObjects();
initSurfaces
();
initFixedObjects
();
//
initSurfaces();
initMovingObject
();
// initEmptyMovingObject();
...
...
@@ -60,20 +60,20 @@ void Simulator::initFixedObjects()
p
.
second
=
envMap_
.
getBelongingCell
(
pos
);
startingPoints
.
push_back
(
p
);
pos
=
VEC3
(
-
4.68
,
1.36
,
2.15
);
pos
=
VEC3
(
1.23
,
1.36
,
2.15
);
p
.
first
=
pos
;
p
.
second
=
envMap_
.
getBelongingCell
(
pos
);
startingPoints
.
push_back
(
p
);
pos
=
VEC3
(
4
,
-
2
,
3
);
p
.
first
=
pos
;
p
.
second
=
envMap_
.
getBelongingCell
(
pos
);
startingPoints
.
push_back
(
p
);
//
pos=VEC3(4,-2,3);
//
p.first=pos;
//
p.second=envMap_.getBelongingCell(pos);
//
startingPoints.push_back(p);
pos
=
VEC3
(
1
,
-
1
,
1
);
p
.
first
=
pos
;
p
.
second
=
envMap_
.
getBelongingCell
(
pos
);
startingPoints
.
push_back
(
p
);
//
pos=VEC3(1,-1,1);
//
p.first=pos;
//
p.second=envMap_.getBelongingCell(pos);
//
startingPoints.push_back(p);
// pos=VEC3(2,-2.5f,0.5f);
// p.first=pos;
...
...
@@ -84,13 +84,13 @@ void Simulator::initFixedObjects()
ind
.
second
=
1
;
segmentParts
.
push_back
(
ind
);
ind
.
first
=
2
;
ind
.
second
=
3
;
segmentParts
.
push_back
(
ind
);
//
ind.first=2;
//
ind.second=3;
//
segmentParts.push_back(ind);
ind
.
first
=
0
;
ind
.
second
=
2
;
segmentParts
.
push_back
(
ind
);
//
ind.first=0;
//
ind.second=2;
//
segmentParts.push_back(ind);
// ind.first=0;
// ind.second=4;
// segmentParts.push_back(ind);
...
...
src/surface.cpp
View file @
bb14948f
...
...
@@ -44,8 +44,6 @@ Surface::Surface(Simulator* sim,VEC3 offset):
{
nbTriangles
++
;
}
belonging_cells
=
new
std
::
vector
<
Dart
>
[
nbTriangles
];
neighbor_cells
=
new
std
::
vector
<
Dart
>
[
nbTriangles
];
...
...
src/viewer.cpp
View file @
bb14948f
...
...
@@ -386,12 +386,12 @@ void Volusion::displayMO()
if
(
val_comboEdge
==
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
simul
.
aiguille
->
nbEdges
;
i
++
)
for
(
auto
vect
:
simul
.
aiguille
->
belonging_cells
)
{
// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0);
for
(
auto
it
=
simul
.
aiguille
->
belonging_cells
[
i
].
begin
();
it
!=
simul
.
aiguille
->
belonging_cells
[
i
].
end
();
++
i
t
)
for
(
Dart
it
:
vec
t
)
{
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,
(
*
it
)
))
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,
it
))
{
m_topo_render
->
overdrawDart
(
d
,
5.0
f
,
0
,
1.0
f
,
0
);
...
...
@@ -408,10 +408,10 @@ void Volusion::displayMO()
// m_topo_render->overdrawDart(simul.aiguille->parts_[val_comboEdge-1]->d,10.0f,1.0f,0,0);
// m_topo_render->overdrawDart(simul.aiguille->parts_[val_comboEdge]->d,10.0f,1.0f,0,0);
int
i
=
val_comboEdge
-
1
;
for
(
auto
it
=
simul
.
aiguille
->
belonging_cells
[
i
].
begin
();
it
!=
simul
.
aiguille
->
belonging_cells
[
i
].
end
();
++
it
)
for
(
Dart
it
:
simul
.
aiguille
->
belonging_cells
[
i
]
)
{
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
*
it
)))
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
it
)))
{
m_topo_render
->
overdrawDart
(
d
,
5.0
f
,
0
,
1.0
f
,
0
);
...
...
@@ -428,12 +428,12 @@ void Volusion::displayMO()
m_topo_render
->
updateData
(
simul
.
envMap_
.
map
,
simul
.
envMap_
.
position
,
0.8
f
,
0.8
f
,
0.8
f
);
if
(
val_comboEdge
==
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
simul
.
aiguille
->
nbEdges
;
i
++
)
for
(
auto
vect
:
simul
.
aiguille
->
neighbor_cells
)
{
for
(
auto
it
=
simul
.
aiguille
->
neighbor_cells
[
i
].
begin
();
it
!=
simul
.
aiguille
->
neighbor_cells
[
i
].
end
();
++
i
t
)
// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0);
for
(
Dart
it
:
vec
t
)
{
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
*
it
)))
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
it
)))
{
m_topo_render
->
overdrawDart
(
d
,
5.0
f
,
1.0
f
,
0.0
f
,
0.8
f
);
...
...
@@ -447,9 +447,9 @@ void Volusion::displayMO()
else
{
int
i
=
val_comboEdge
-
1
;
for
(
auto
it
=
simul
.
aiguille
->
neighbor_cells
[
i
].
begin
();
it
!=
simul
.
aiguille
->
neighbor_cells
[
i
].
end
();
++
it
)
for
(
Dart
it
:
simul
.
aiguille
->
neighbor_cells
[
i
]
)
{
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
*
it
)))
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
it
)))
{
m_topo_render
->
overdrawDart
(
d
,
5.0
f
,
1.0
f
,
0.0
f
,
0.8
f
);
}
...
...
@@ -551,12 +551,12 @@ void Volusion::displayObj()
m_topo_render
->
updateData
(
simul
.
envMap_
.
map
,
simul
.
envMap_
.
position
,
0.8
f
,
0.8
f
,
0.8
f
);
for
(
ArticulatedObject
*
o
:
simul
.
objects
)
{
for
(
unsigned
int
i
=
0
;
i
<
o
->
nbEdges
;
i
++
)
for
(
auto
vect
:
o
->
belonging_cells
)
{
// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0);
for
(
auto
it
=
o
->
belonging_cells
[
i
].
begin
();
it
!=
o
->
belonging_cells
[
i
].
end
();
++
i
t
)
for
(
Dart
it
:
vec
t
)
{
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
*
it
)))
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
it
)))
{
m_topo_render
->
overdrawDart
(
d
,
5.0
f
,
0.0
f
,
0.6
f
,
0.4
f
);
}
...
...
@@ -573,9 +573,9 @@ void Volusion::displayObj()
// for(unsigned int i =0;i<o->nbTriangles;i++)
{
// m_topo_render->overdrawDart(simul.aiguille->parts_[i]->d,10.0f,1.0f,0,0);
for
(
auto
it
=
o
->
belonging_cells
[
i
].
begin
();
it
!=
o
->
belonging_cells
[
i
].
end
();
++
it
)
for
(
Dart
it
:
o
->
belonging_cells
[
i
]
)
{
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
*
it
)))
for
(
Edge
d
:
edgesIncidentToVolume3
(
simul
.
envMap_
.
map
,(
it
)))
{
m_topo_render
->
overdrawDart
(
d
,
5.0
f
,
0.0
f
,
0.6
f
,
0.4
f
);
}
...
...
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