Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Pitiot
SocialAgents3D
Commits
289da2a2
Commit
289da2a2
authored
Mar 20, 2015
by
Thomas Pitiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working
parent
f961ea6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/needle.cpp
src/needle.cpp
+3
-3
src/simulator.cpp
src/simulator.cpp
+4
-4
No files found.
src/needle.cpp
View file @
289da2a2
...
...
@@ -240,10 +240,10 @@ void Needle::refine()
REAL
rayon
=
sim_
->
envMap_
.
volumeMaxdistance
(
volume
)
;
if
(
rayon
>
sim_
->
envMap_
.
maxCellRay
)
{
//
if(sim_->envMap_.subdivideVolume(volume))
//
{
if
(
sim_
->
envMap_
.
subdivideVolume
(
volume
))
{
// refine();
//
}
}
}
#endif
...
...
src/simulator.cpp
View file @
289da2a2
...
...
@@ -26,7 +26,7 @@ void Simulator::init(int argc, char **argv)
else
Needle_or_knife
=
true
;
initFixedObjects
();
//
initFixedObjects();
initSurfaces
();
initMovingObject
();
...
...
@@ -42,7 +42,7 @@ void Simulator::doStep()
void
Simulator
::
initSurfaces
()
{
Surface
*
obj
=
new
Surface
(
this
,
VEC3
(
-
1.0
f
,
-
1.5
f
,
0.
0
f
));
Surface
*
obj
=
new
Surface
(
this
,
VEC3
(
-
1.0
f
,
-
1.5
f
,
0.
69
f
));
CGoGNout
<<
"surface initialisée : "
<<
obj
->
index_surface
<<
CGoGNendl
;
}
...
...
@@ -121,8 +121,8 @@ void Simulator::initMovingObject()
{
std
::
pair
<
VEC3
,
Dart
>
startingPoint
;
Dart
d
=
envMap_
.
map
.
indexDart
(
0
);
startingPoint
.
first
=
Algo
::
Surface
::
Geometry
::
volumeCentroid
<
PFP
,
VertexAttribute
<
VEC3
,
MAP
>>
(
envMap_
.
map
,
d
,
envMap_
.
position
);
//
startingPoint.first=VEC3(-
2.5f,-2.5f,2.5f
);
//
startingPoint.first=Algo::Surface::Geometry::volumeCentroid<PFP,VertexAttribute<VEC3,MAP>>(envMap_.map,d,envMap_.position);
startingPoint
.
first
=
VEC3
(
-
5
,
0
,
0
);
startingPoint
.
second
=
d
;
aiguille
=
new
Needle
(
this
,
startingPoint
);
}
...
...
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