Package com.eteks.sweethome3d.model

Examples of com.eteks.sweethome3d.model.HomeDoorOrWindow


      float halfWidth = piece.getWidth() / 2;
      final float thicknessEpsilon = 0.0002f;
      if (piece.isDoorOrWindow()) {
        float wallDistance = thicknessEpsilon / 2;
        if (piece instanceof HomeDoorOrWindow) {
          HomeDoorOrWindow doorOrWindow = (HomeDoorOrWindow) piece;
          if (piece.isResizable()
              && isItemResizable(piece)) {
            piece.setDepth(thicknessEpsilon
                + wallAtPoint.getThickness() / doorOrWindow.getWallThickness());
          }
          wallDistance += piece.getDepth() * doorOrWindow.getWallDistance();          
        }
        float halfDepth = piece.getDepth() / 2;
        if (distanceToRightSide < distanceToLeftSide) {
          angle = wallAngle;
          xPiece = x + sinAngle * (distanceToLeftSide + wallDistance);
View Full Code Here


      List<HomePieceOfFurniture> newFurniture =
          new ArrayList<HomePieceOfFurniture>();
      for (CatalogPieceOfFurniture piece : selectedFurniture) {
        HomePieceOfFurniture homePiece;
        if (piece instanceof CatalogDoorOrWindow) {
          homePiece = new HomeDoorOrWindow((DoorOrWindow)piece);
        } else if (piece instanceof CatalogLight) {
          homePiece = new HomeLight((Light)piece);
        } else {
          homePiece = new HomePieceOfFurniture(piece);
        }
View Full Code Here

    List<CatalogPieceOfFurniture> selectedCatalogFurniture = this.catalogController.getSelectedFurniture();
    List<HomePieceOfFurniture> transferedFurniture =
        new ArrayList<HomePieceOfFurniture>(selectedCatalogFurniture.size());
    for (CatalogPieceOfFurniture piece : selectedCatalogFurniture) {
      if (piece instanceof CatalogDoorOrWindow) {
        transferedFurniture.add(new HomeDoorOrWindow((DoorOrWindow)piece));
      } else if (piece instanceof CatalogLight) {
        transferedFurniture.add(new HomeLight((Light)piece));
      } else {
        transferedFurniture.add(new HomePieceOfFurniture(piece));
      }
View Full Code Here

              yArea + areaFontMetrics.getDescent());
        }
      }
    } else if (item instanceof HomePieceOfFurniture) {
      if (item instanceof HomeDoorOrWindow) {
        HomeDoorOrWindow doorOrWindow = (HomeDoorOrWindow)item;
        // Add to bounds door and window sashes
        for (Sash sash : doorOrWindow.getSashes()) {
          itemBounds.add(getDoorOrWindowSashShape(doorOrWindow, sash).getBounds2D());
        }
      } else if (item instanceof HomeFurnitureGroup) {
        itemBounds.add(getItemsBounds(g, ((HomeFurnitureGroup)item).getFurniture()));
      }
View Full Code Here

                    || selectedPiece) {
            // In clipboard paint mode, paint piece only if it is selected
            Shape pieceShape = getShape(piece.getPoints());
            Shape pieceShape2D;
            if (piece instanceof HomeDoorOrWindow) {
              HomeDoorOrWindow doorOrWindow = (HomeDoorOrWindow)piece;
              pieceShape2D = getDoorOrWindowShapeAtWallIntersection(doorOrWindow);
              paintDoorOrWindowSashes(g2D, doorOrWindow, planScale, foregroundColor);
            } else {
              pieceShape2D = pieceShape;
            }
View Full Code Here

    }
   
    if (this.home != null) {
      // Add new piece to home
      addPieceOfFurniture(isDoorOrWindow()
          ? new HomeDoorOrWindow((DoorOrWindow)newPiece)
          : new HomePieceOfFurniture(newPiece));
    }
    // Remove the edited piece from catalog
    FurnitureCatalog catalog = this.preferences.getFurnitureCatalog();
    if (this.piece != null) {
View Full Code Here

TOP

Related Classes of com.eteks.sweethome3d.model.HomeDoorOrWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.