etomica.action
Class AtomActionTranslateBy
java.lang.Object
etomica.action.AtomActionTranslateBy
- All Implemented Interfaces:
- AtomAction, Serializable
public class AtomActionTranslateBy
- extends Object
- implements AtomAction, Serializable
Moves (translates) an atom by a specified vector amount.
To move all atoms in a molecule (or atom group), wrap an
instance of this class in an AtomGroupAction.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtomActionTranslateBy
public AtomActionTranslateBy(ISpace space)
actionPerformed
public void actionPerformed(IAtom atom)
- Specified by:
actionPerformed in interface AtomAction
getTranslationVector
public IVectorMutable getTranslationVector()
- Returns the translation vector, the distance that the
atom will be moved by this action. Returns the vector used by this
instance, not a copy, so any manipulation of the returned vector will
affect the action of this instance.
setTranslationVector
public void setTranslationVector(IVector translationVector)
- Parameters:
destination - The translation vector to set. A local copy
is made of the given vector.