use of org.concord.energy3d.model.Mirror in project energy3d by concord-consortium.
the class ChangeFoundationHeliostatAzimuthCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = mirrors.size();
newValues = new double[n];
for (int i = 0; i < n; i++) {
final Mirror m = mirrors.get(i);
newValues[i] = m.getRelativeAzimuth();
m.setRelativeAzimuth(oldValues[i]);
m.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Mirror in project energy3d by concord-consortium.
the class ChangeFoundationHeliostatTargetCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = mirrors.size();
newValues = new Foundation[n];
for (int i = 0; i < n; i++) {
final Mirror m = mirrors.get(i);
newValues[i] = m.getReceiver();
m.setReceiver(oldValues[i]);
m.draw();
if (oldValues[i] != null) {
oldValues[i].drawSolarReceiver();
}
if (newValues[i] != null) {
newValues[i].drawSolarReceiver();
}
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Mirror in project energy3d by concord-consortium.
the class ChangeFoundationHeliostatTiltAngleCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = mirrors.size();
newValues = new double[n];
for (int i = 0; i < n; i++) {
final Mirror m = mirrors.get(i);
newValues[i] = m.getTiltAngle();
m.setTiltAngle(oldValues[i]);
m.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Mirror in project energy3d by concord-consortium.
the class ChangeFoundationHeliostatTiltAngleCommand method redo.
@Override
public void redo() throws CannotRedoException {
super.redo();
final int n = mirrors.size();
for (int i = 0; i < n; i++) {
final Mirror m = mirrors.get(i);
m.setTiltAngle(newValues[i]);
m.draw();
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.Mirror in project energy3d by concord-consortium.
the class ChangeAzimuthForAllHeliostatsCommand method undo.
@Override
public void undo() throws CannotUndoException {
super.undo();
final int n = mirrors.size();
newValues = new double[n];
for (int i = 0; i < n; i++) {
final Mirror m = mirrors.get(i);
newValues[i] = m.getRelativeAzimuth();
m.setRelativeAzimuth(oldValues[i]);
m.draw();
}
SceneManager.getInstance().refresh();
}
Aggregations