Examples of Pos


Examples of crazypants.enderio.machine.reservoir.TileReservoir.Pos

    if(!tr.isMultiblock()) {
      return blockIcon;
    }

    ForgeDirection side = ForgeDirection.getOrientation(blockSide);
    Pos pos = tr.pos;

    if(tr.front == side || tr.front == side.getOpposite()) { // 2x2 area

      boolean isRight;
      if(tr.isVertical()) { // to to flip right and left for back faces of
        // vertical multiblocks
        isRight = !pos.isRight(side);
      } else {
        isRight = pos.isRight(side);
      }
      if(pos.isTop) {
        return isRight ? mbIcons[MbFace.TR.ordinal()] : mbIcons[MbFace.TL.ordinal()];
      } else {
        return isRight ? mbIcons[MbFace.BR.ordinal()] : mbIcons[MbFace.BL.ordinal()];
      }

    }
    if(tr.up == side || tr.up == side.getOpposite()) { // up or down face
      if(tr.isVertical()) {
        if(tr.right.offsetX != 0) {
          return pos.isRight ? mbIcons[MbFace.L.ordinal()] : mbIcons[MbFace.R.ordinal()];
        } else {
          return pos.isRight ? mbIcons[MbFace.T.ordinal()] : mbIcons[MbFace.B.ordinal()];
        }
      } else {
        if(tr.up == side) {
          return pos.isRight ? mbIcons[MbFace.L.ordinal()] : mbIcons[MbFace.R.ordinal()];
        } else {
          return pos.isRight ? mbIcons[MbFace.R.ordinal()] : mbIcons[MbFace.L.ordinal()];
        }
      }

    } else {
      if(tr.isVertical()) {
        return pos.isTop ? mbIcons[MbFace.T.ordinal()] : mbIcons[MbFace.B.ordinal()];
      } else {
        return pos.isTop(side) ? mbIcons[MbFace.L.ordinal()] : mbIcons[MbFace.R.ordinal()];
      }
    }

  }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the formula (all...| this)
    * <p> this must be a formula
    */
   public final Expr forAll(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.ALL.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the formula (no...| this)
    * <p> this must be a formula
    */
   public final Expr forNo(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.NO.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the formula (lone...| this)
    * <p> this must be a formula
    */
   public final Expr forLone(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.LONE.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the formula (one ...| this)
    * <p> this must be a formula
    */
   public final Expr forOne(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.ONE.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the formula (some...| this)
    * <p> this must be a formula
    */
   public final Expr forSome(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.SOME.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the comprehension expression {...|this}
    * <p> this must be a formula
    * <p> each declaration must be a "one-of" quantification over a unary set
    */
   public final Expr comprehensionOver(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.COMPREHENSION.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

   /** Returns the integer (sum...| this)
    * <p> this must be an integer expression
    * <p> each declaration must be a "one-of" quantification over a unary set
    */
   public final Expr sumOver(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.SUM.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

            }
            catch(Err e) {
                commands = null;
                runmenu.getItem(0).setEnabled(false);
                runmenu.getItem(3).setEnabled(false);
                text.shade(new Pos(text.get().getFilename(), e.pos.x, e.pos.y, e.pos.x2, e.pos.y2));
                if ("yes".equals(System.getProperty("debug")) && Verbosity.get()==Verbosity.FULLDEBUG)
                    log.logRed("Fatal Exception!" + e.dump() + "\n\n");
                else
                    log.logRed(e.toString()+"\n\n");
                return null;
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4.Pos

        if (arg.startsWith("POS: ")) { // POS: x1 y1 x2 y2 filename
            Scanner s=new Scanner(arg.substring(5));
            int x1=s.nextInt(), y1=s.nextInt(), x2=s.nextInt(), y2=s.nextInt();
            String f=s.nextLine();
            if (f.length()>0 && f.charAt(0)==' ') f=f.substring(1); // Get rid of the space after Y2
            Pos p=new Pos(Util.canon(f), x1, y1, x2, y2);
            text.shade(p);
        }
        if (arg.startsWith("CNF: ")) { // CNF: filename
            String filename=Util.canon(arg.substring(5));
            try { String text=Util.readAll(filename); OurDialog.showtext("Text Viewer", text); }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.