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
7bd6b89b
Commit
7bd6b89b
authored
Oct 25, 2011
by
Thomas
Browse files
correction particle 2D et demi
parent
750381ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
7bd6b89b
...
...
@@ -39,7 +39,7 @@ Geom::Orientation3D ParticleCell2DAndHalf<PFP>::getOrientationEdge(const VEC3& p
const
VEC3
&
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
//orientation relative to the plane orthogonal to the face going through the edge
return
Geom
::
testOrientation3D
(
point
,
vertexPoint
,
endPoint
,
vertexPoint
+
n1
);
return
Geom
::
testOrientation3D
(
point
,
vertexPoint
,
endPoint
,
vertexPoint
+
n1
);
}
template
<
typename
PFP
>
...
...
@@ -67,7 +67,7 @@ Geom::Orientation3D ParticleCell2DAndHalf<PFP>::getOrientationFace(VEC3 point, V
VEC3
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
return
Geom
::
testOrientation3D
(
point
,
sourcePoint
,
dPoint
,
dPoint
+
n1
);
return
Geom
::
testOrientation3D
(
point
,
sourcePoint
,
dPoint
+
n1
,
dPoint
);
}
template
<
typename
PFP
>
...
...
@@ -167,17 +167,27 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 current, Geom::Orientation3D sid
faceState
(
current
);
return
;
case
Geom
::
OVER
:
{
//transform the displacement into the new entered face
VEC3
displ
=
current
-
m_position
;
VEC3
edge
=
Algo
::
Geom
::
vectorOutOfDart
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
edge
.
normalize
();
VEC3
n
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
current
=
m_position
+
((
displ
^
n
)
*
displ
.
norm
());
VEC3
edge
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
VEC3
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
VEC3
n2
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
float
angle
=
acos
(
n1
*
n2
);
Geom
::
Matrix
<
4
,
4
,
float
>
mRot
;
mRot
.
identity
();
Geom
::
rotate
(
edge
[
0
],
edge
[
1
],
edge
[
2
],
angle
,
mRot
);
displ
=
Geom
::
transform
(
displ
,
mRot
);
current
=
m_position
+
displ
;
d
=
m
.
phi1
(
m
.
phi2
(
d
));
faceState
(
current
);
return
;
}
default
:
state
=
EDGE
;
}
...
...
@@ -311,12 +321,14 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 current)
default
:
if
(
wsoe
==
Geom
::
ON
)
{
d
=
m
.
phi1
(
d
);
//to check
m_position
=
m_positions
[
d
];
std
::
cout
<<
__FILE__
<<
" to uncomment and check"
<<
std
::
endl
;
vertexState
(
current
);
// d = m.phi1(d); //to check
// m_position = m_positions[d];
//
// vertexState(current);
}
else
//
else
{
// CGoGNout << "wsoe : " << wsoe << CGoGNendl;
// CGoGNout << "current " << current << " " << m_position << CGoGNendl;
...
...
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