Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
a3dd8899
Commit
a3dd8899
authored
Dec 07, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modif mineure MovingObjects
parent
c3509197
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
0 deletions
+25
-0
include/Algo/MovingObjects/particle_base.h
include/Algo/MovingObjects/particle_base.h
+5
-0
include/Algo/MovingObjects/particle_cell_2D.h
include/Algo/MovingObjects/particle_cell_2D.h
+5
-0
include/Algo/MovingObjects/particle_cell_2DandHalf.h
include/Algo/MovingObjects/particle_cell_2DandHalf.h
+5
-0
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
+10
-0
No files found.
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
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