Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
KennethVanhoey
CGoGN
Commits
134014b0
Commit
134014b0
authored
Dec 09, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctif pb merge ParticleBase
parent
f8f141b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
39 deletions
+32
-39
Apps/Examples/viewer.cpp
Apps/Examples/viewer.cpp
+1
-1
include/Algo/MovingObjects/particle_base.h
include/Algo/MovingObjects/particle_base.h
+31
-38
No files found.
Apps/Examples/viewer.cpp
View file @
134014b0
...
...
@@ -194,7 +194,7 @@ void Viewer::importMesh(std::string& filename)
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
POINTS
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
LINES
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
TRIANGLES
,
false
)
;
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
TRIANGLES
)
;
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
)
;
normalBaseSize
=
bb
.
diagSize
()
/
100.0
f
;
...
...
include/Algo/MovingObjects/particle_base.h
View file @
134014b0
...
...
@@ -18,47 +18,40 @@ typedef Geom::Vec3f VEC3;
class
ParticleBase
{
public
:
VEC3
m_position
;
ParticleBase
()
{
m_position
.
zero
();
}
ParticleBase
(
VEC3
position
)
{
m_position
=
position
;
}
virtual
unsigned
int
getState
()
{
return
0
;
}
/**
* @param newPosition new position to reach
*/
virtual
bool
move
(
VEC3
position
)
{
m_position
=
position
;
return
true
;
}
virtual
unsigned
int
getState
()
{
return
0
;
}
VEC3
getPosition
()
{
return
m_position
;
}
public
:
VEC3
m_position
;
ParticleBase
()
{
m_position
.
zero
();
}
ParticleBase
(
VEC3
position
)
{
m_position
=
position
;
}
virtual
unsigned
int
getState
()
{
return
0
;
}
/**
* @param newPosition new position to reach
*/
virtual
bool
move
(
VEC3
position
)
{
m_position
=
position
;
return
true
;
}
VEC3
getPosition
()
{
return
m_position
;
}
};
//namespace
}
}
// namespace MovingObjects
}
}
}
// namespace Algo
}
// namespace CGoGN
#endif
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