Search in sources :

Example 1 with PyramidRoof

use of org.concord.energy3d.model.PyramidRoof in project energy3d by concord-consortium.

the class SceneManager method newPart.

private HousePart newPart() {
    final HousePart drawn;
    setGridsVisible(false);
    if (operation == Operation.DRAW_WALL) {
        drawn = new Wall();
        drawn.setColor(Scene.getInstance().getWallColor());
    } else if (operation == Operation.DRAW_DOOR) {
        drawn = new Door();
        drawn.setColor(Scene.getInstance().getDoorColor());
    } else if (operation == Operation.DRAW_WINDOW) {
        drawn = new Window();
    } else if (operation == Operation.DRAW_ROOF_PYRAMID) {
        drawn = new PyramidRoof();
        drawn.setColor(Scene.getInstance().getRoofColor());
    } else if (operation == Operation.DRAW_ROOF_HIP) {
        drawn = new HipRoof();
        drawn.setColor(Scene.getInstance().getRoofColor());
    } else if (operation == Operation.DRAW_ROOF_SHED) {
        drawn = new ShedRoof();
        drawn.setColor(Scene.getInstance().getRoofColor());
    } else if (operation == Operation.DRAW_ROOF_GAMBREL) {
        drawn = new GambrelRoof();
        drawn.setColor(Scene.getInstance().getRoofColor());
    } else if (operation == Operation.DRAW_ROOF_CUSTOM) {
        drawn = new CustomRoof();
        drawn.setColor(Scene.getInstance().getRoofColor());
    } else if (operation == Operation.DRAW_FLOOR) {
        drawn = new Floor();
        drawn.setColor(Scene.getInstance().getFloorColor());
    } else if (operation == Operation.DRAW_SOLAR_PANEL) {
        drawn = new SolarPanel();
    } else if (operation == Operation.DRAW_RACK) {
        drawn = new Rack();
    } else if (operation == Operation.DRAW_MIRROR) {
        drawn = new Mirror();
    } else if (operation == Operation.DRAW_PARABOLIC_TROUGH) {
        drawn = new ParabolicTrough();
    } else if (operation == Operation.DRAW_PARABOLIC_DISH) {
        drawn = new ParabolicDish();
    } else if (operation == Operation.DRAW_FRESNEL_REFLECTOR) {
        drawn = new FresnelReflector();
    } else if (operation == Operation.DRAW_SENSOR) {
        drawn = new Sensor();
    } else if (operation == Operation.DRAW_FOUNDATION) {
        drawn = new Foundation();
        setGridsVisible(Scene.getInstance().isSnapToGrids());
        drawn.setColor(Scene.getInstance().getFoundationColor());
    } else if (operation == Operation.DRAW_DOGWOOD) {
        drawn = new Tree(Tree.DOGWOOD);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_ELM) {
        drawn = new Tree(Tree.ELM);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_OAK) {
        drawn = new Tree(Tree.OAK);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_LINDEN) {
        drawn = new Tree(Tree.LINDEN);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_COTTONWOOD) {
        drawn = new Tree(Tree.COTTONWOOD);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_MAPLE) {
        drawn = new Tree(Tree.MAPLE);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_PINE) {
        drawn = new Tree(Tree.PINE);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_JANE) {
        drawn = new Human(Human.JANE);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_JENI) {
        drawn = new Human(Human.JENI);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_JILL) {
        drawn = new Human(Human.JILL);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_JACK) {
        drawn = new Human(Human.JACK);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_JOHN) {
        drawn = new Human(Human.JOHN);
        setGridsVisible(true);
    } else if (operation == Operation.DRAW_JOSE) {
        drawn = new Human(Human.JOSE);
        setGridsVisible(true);
    } else {
        return null;
    }
    Scene.getInstance().add(drawn, false);
    addPartCommand = new AddPartCommand(drawn);
    return drawn;
}
Also used : Window(org.concord.energy3d.model.Window) Human(org.concord.energy3d.model.Human) Floor(org.concord.energy3d.model.Floor) ParabolicTrough(org.concord.energy3d.model.ParabolicTrough) FresnelReflector(org.concord.energy3d.model.FresnelReflector) Wall(org.concord.energy3d.model.Wall) ShedRoof(org.concord.energy3d.model.ShedRoof) Door(org.concord.energy3d.model.Door) GambrelRoof(org.concord.energy3d.model.GambrelRoof) CustomRoof(org.concord.energy3d.model.CustomRoof) ParabolicDish(org.concord.energy3d.model.ParabolicDish) PyramidRoof(org.concord.energy3d.model.PyramidRoof) Rack(org.concord.energy3d.model.Rack) SolarPanel(org.concord.energy3d.model.SolarPanel) AddPartCommand(org.concord.energy3d.undo.AddPartCommand) Tree(org.concord.energy3d.model.Tree) Foundation(org.concord.energy3d.model.Foundation) HipRoof(org.concord.energy3d.model.HipRoof) Mirror(org.concord.energy3d.model.Mirror) PickedHousePart(org.concord.energy3d.model.PickedHousePart) HousePart(org.concord.energy3d.model.HousePart) Sensor(org.concord.energy3d.model.Sensor)

Aggregations

CustomRoof (org.concord.energy3d.model.CustomRoof)1 Door (org.concord.energy3d.model.Door)1 Floor (org.concord.energy3d.model.Floor)1 Foundation (org.concord.energy3d.model.Foundation)1 FresnelReflector (org.concord.energy3d.model.FresnelReflector)1 GambrelRoof (org.concord.energy3d.model.GambrelRoof)1 HipRoof (org.concord.energy3d.model.HipRoof)1 HousePart (org.concord.energy3d.model.HousePart)1 Human (org.concord.energy3d.model.Human)1 Mirror (org.concord.energy3d.model.Mirror)1 ParabolicDish (org.concord.energy3d.model.ParabolicDish)1 ParabolicTrough (org.concord.energy3d.model.ParabolicTrough)1 PickedHousePart (org.concord.energy3d.model.PickedHousePart)1 PyramidRoof (org.concord.energy3d.model.PyramidRoof)1 Rack (org.concord.energy3d.model.Rack)1 Sensor (org.concord.energy3d.model.Sensor)1 ShedRoof (org.concord.energy3d.model.ShedRoof)1 SolarPanel (org.concord.energy3d.model.SolarPanel)1 Tree (org.concord.energy3d.model.Tree)1 Wall (org.concord.energy3d.model.Wall)1