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
efef8888
Commit
efef8888
authored
Feb 07, 2011
by
Pierre Kraemer
Browse files
ParticleCell2D -> add changeCell bool
parent
f0b50352
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Algo/MovingObjects/particle_cell_2D.h
View file @
efef8888
...
...
@@ -40,6 +40,8 @@ class ParticleCell2D : public ParticleBase
DartMarker
&
obstacle
;
bool
changeCell
;
ParticleCell2D
()
{}
ParticleCell2D
(
Map
&
map
,
Dart
belonging_cell
,
VEC3
pos
,
TAB_POS
tabPos
,
DartMarker
&
obst
)
:
ParticleBase
(
pos
),
m
(
map
),
d
(
belonging_cell
),
m_positions
(
tabPos
),
obstacle
(
obst
)
...
...
@@ -71,6 +73,7 @@ class ParticleCell2D : public ParticleBase
void
move
(
const
VEC3
&
newCurrent
)
{
changeCell
=
false
;
if
(
!
Geom
::
arePointsEquals
(
newCurrent
,
m_position
))
{
prevPos
=
m_position
;
...
...
include/Algo/MovingObjects/particle_cell_2D.hpp
View file @
efef8888
...
...
@@ -69,6 +69,7 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& current)
#endif
assert
(
std
::
isfinite
(
current
[
0
])
&&
std
::
isfinite
(
current
[
1
])
&&
std
::
isfinite
(
current
[
2
]));
changeCell
=
true
;
if
(
Algo
::
Geometry
::
isPointOnVertex
<
PFP
>
(
m
,
d
,
m_positions
,
current
))
{
state
=
VERTEX_ORBIT
;
return
;
...
...
@@ -135,6 +136,7 @@ void ParticleCell2D<PFP>::edgeState(const VEC3& current, Geom::Orientation2D sid
assert
(
std
::
isfinite
(
current
[
0
])
&&
std
::
isfinite
(
current
[
1
])
&&
std
::
isfinite
(
current
[
2
]));
// assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
changeCell
=
true
;
if
(
sideOfEdge
==
Geom
::
ALIGNED
)
sideOfEdge
=
getOrientationEdge
(
current
,
d
);
...
...
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