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
Thomas Pitiot
CGoGN
Commits
134014b0
Commit
134014b0
authored
Dec 09, 2011
by
Pierre Kraemer
Browse files
correctif pb merge ParticleBase
parent
f8f141b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
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