File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,15 @@ const Vector3& Atom::getPosition() const
54
54
return _position;
55
55
}
56
56
57
+ void Atom::setPosition (const Ogre::Vector3& position)
58
+ {
59
+ _position = position;
60
+ _node->setPosition (_position);
61
+
62
+ // Mise à jour des structures Ogre de la scene (octree)
63
+ Global::getSceneManager ()->_updateSceneGraph (0 );
64
+ }
65
+
57
66
void Atom::move (Real dt)
58
67
{
59
68
assert (dt > 0 );
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ class Atom
34
34
*/
35
35
const Ogre::Vector3& getPosition () const ;
36
36
37
+ /* *
38
+ * Définie manuellement la position de l'atome
39
+ * Le respect des contraintes de position n'est
40
+ * pas vérifié !
41
+ */
42
+ void setPosition (const Ogre::Vector3& position);
43
+
37
44
/* *
38
45
* Renvoi true si l'atome représente
39
46
* l'atome spécifié
You can’t perform that action at this time.
0 commit comments