use of org.concord.energy3d.model.HousePart in project energy3d by concord-consortium.
the class Scene method deleteAllConnectedWalls.
public void deleteAllConnectedWalls(final Wall w) {
final List<HousePart> copy = new ArrayList<HousePart>();
w.visitNeighbors(new WallVisitor() {
@Override
public void visit(final Wall currentWall, final Snap prev, final Snap next) {
copy.add(currentWall);
}
});
final RemoveMultiplePartsCommand c = new RemoveMultiplePartsCommand(copy);
for (final HousePart p : copy) {
remove(p, false);
}
SceneManager.getInstance().getUndoManager().addEdit(c);
edited = true;
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.HousePart in project energy3d by concord-consortium.
the class Scene method setThicknessForAllWalls.
public void setThicknessForAllWalls(final double thickness) {
for (final HousePart p : parts) {
if (p instanceof Wall) {
((Wall) p).setThickness(thickness);
p.draw();
}
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.HousePart in project energy3d by concord-consortium.
the class Scene method setRimRadiusForAllParabolicDishes.
public void setRimRadiusForAllParabolicDishes(final double apertureRadius) {
for (final HousePart p : parts) {
if (p instanceof ParabolicDish) {
((ParabolicDish) p).setRimRadius(apertureRadius);
p.draw();
}
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.HousePart in project energy3d by concord-consortium.
the class Scene method setLengthForAllFresnelReflectors.
public void setLengthForAllFresnelReflectors(final double length) {
for (final HousePart p : parts) {
if (p instanceof FresnelReflector) {
final FresnelReflector r = (FresnelReflector) p;
r.setLength(length);
r.ensureFullModules(false);
r.draw();
}
}
SceneManager.getInstance().refresh();
}
use of org.concord.energy3d.model.HousePart in project energy3d by concord-consortium.
the class Scene method setShutterColorOfBuilding.
public void setShutterColorOfBuilding(final HousePart part, final ReadOnlyColorRGBA color) {
if (part instanceof Foundation) {
return;
}
for (final HousePart p : parts) {
if (p instanceof Window && p.getTopContainer() == part.getTopContainer()) {
final Window w = (Window) p;
w.setShutterColor(color);
w.draw();
}
}
}
Aggregations