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
Etienne Schmitt
CGoGN
Commits
33cc8427
Commit
33cc8427
authored
Dec 06, 2011
by
Thomas
Browse files
ajout projection deplacement MovingObjects 2.5
parent
721eb1c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
33cc8427
...
...
@@ -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