public class BoxInflate extends BoxActionAdapter implements Undoable
Modifier and Type | Field and Description |
---|---|
protected IVectorMutable |
dimVector |
protected MoleculeChildAtomAction |
groupScaler |
protected AtomPositionGeometricCenter |
moleculeCenter |
protected IVectorMutable |
scaleVector |
protected AtomActionTranslateBy |
translator |
box
Constructor and Description |
---|
BoxInflate(IBox box,
ISpace space)
Constructs action ready to be performed on the given box.
|
BoxInflate(ISpace space)
Constructs action with a default scale of 1.0.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed()
Performs boundary dimension change
|
double |
getScale() |
double |
getTargetDensity()
Returns the target density of the action.
|
IVector |
getVectorScale()
Returns the current value of the inflation scale in each dimension.
|
void |
setScale(double scale)
Sets the scale defining the amount of inflation.
|
void |
setTargetDensity(double newTargetDensity)
Sets the action to change the box dimensions isotropically to achieve
the given density.
|
void |
setVectorScale(IVector scale)
Sets the scale defining the amount of inflation for each dimension.
|
void |
undo()
Reverses the action of the inflation by performing the
action with a scale given the by the reciprocal of the
current scale.
|
getBox, setBox
protected final AtomActionTranslateBy translator
protected final MoleculeChildAtomAction groupScaler
protected final IVectorMutable scaleVector
protected final IVectorMutable dimVector
protected final AtomPositionGeometricCenter moleculeCenter
public BoxInflate(ISpace space)
public void setScale(double scale)
public double getScale()
public void setVectorScale(IVector scale)
public IVector getVectorScale()
public void setTargetDensity(double newTargetDensity)
public double getTargetDensity()
public void actionPerformed()
actionPerformed
in interface IAction