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
Hurstel
CGoGN
Commits
a3dd8899
Commit
a3dd8899
authored
Dec 07, 2011
by
Thomas
Browse files
modif mineure MovingObjects
parent
c3509197
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/Algo/MovingObjects/particle_base.h
View file @
a3dd8899
...
...
@@ -31,6 +31,11 @@ class ParticleBase
m_position
=
position
;
}
virtual
unsigned
int
getState
()
{
return
0
;
}
/**
* @param newPosition new position to reach
*/
...
...
include/Algo/MovingObjects/particle_cell_2D.h
View file @
a3dd8899
...
...
@@ -76,6 +76,11 @@ public :
void
faceState
(
const
VEC3
&
current
);
virtual
unsigned
int
getState
()
{
return
state
;
}
void
move
(
const
VEC3
&
newCurrent
)
{
crossCell
=
NO_CROSS
;
...
...
include/Algo/MovingObjects/particle_cell_2DandHalf.h
View file @
a3dd8899
...
...
@@ -70,6 +70,11 @@ public :
void
faceState
(
VEC3
current
);
virtual
unsigned
int
getState
()
{
return
state
;
}
void
move
(
const
VEC3
&
newCurrent
)
{
crossCell
=
NO_CROSS
;
...
...
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
a3dd8899
...
...
@@ -221,6 +221,16 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 current)
assert
(
std
::
isfinite
(
current
[
0
])
&&
std
::
isfinite
(
current
[
1
])
&&
std
::
isfinite
(
current
[
2
]));
// assert(Algo::Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));
//project current within plane
VEC3
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
VEC3
n2
=
current
-
m_position
;
n1
.
normalize
();
VEC3
n3
=
n1
^
n2
;
n3
.
normalize
();
VEC3
n4
=
n3
^
n1
;
current
=
m_position
+
(
n2
*
n4
)
*
n4
;
//track new position within map
Dart
dd
=
d
;
float
wsoe
=
getOrientationFace
(
current
,
m_position
,
m
.
phi1
(
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