Examples of translate()


Examples of com.aqpproject.tools.Vector2D.translate()

    public void action(RaceGameState state, WECar car) {
        if (Singleton.getOptionsController().getRole().equals("SERVER")) {
            String name = "Missile_" + car + "_" + Singleton.getWorldModel().getTime();
            for (int i = 0; i < 3; i++) {
                Vector2D pos = car.getCenter();
                pos.translate(car.getDirection().scale(-12 + 50 + (i == 1 ? 32 : 0)));
                int shift = (7 - 7 * i) * 4;
                pos.translate(car.getRight().scale(shift));
                state.getWorldEntities().put(name + "_" + i, new WEMissile(name + "_" + i, pos, car.getRotation(), car, state));
            }
        }
View Full Code Here

Examples of com.ardor3d.math.Transform.translate()

                // note: we round to get the text pixel aligned... otherwise it can get blurry
                v.set(Math.round(x), Math.round(y), 0);
                final Transform t = Transform.fetchTempInstance();
                t.set(getWorldTransform());
                t.applyForwardVector(v);
                t.translate(v);
                Vector3.releaseTempInstance(v);
                _uiText.setWorldTransform(t);
                Transform.releaseTempInstance(t);

                // draw the selection first
View Full Code Here

Examples of com.ardublock.translator.Translator.translate()

     
      for (RenderableBlock renderableBlock : loopBlockSet)
      {
        translator.setRootBlockName("loop");
        Block loopBlock = renderableBlock.getBlock();
        code.append(translator.translate(loopBlock.getBlockID()));
      }
     
      for (RenderableBlock renderableBlock : scoopBlockSet)
      {
        translator.setRootBlockName("scoop");
View Full Code Here

Examples of com.badlogic.gdx.math.Matrix3.translate()

      localTransform.setToTranslation(originX, originY);
    else
      localTransform.idt();
    if (rotation != 0) localTransform.rotate(rotation);
    if (scaleX != 1 || scaleY != 1) localTransform.scale(scaleX, scaleY);
    if (originX != 0 || originY != 0) localTransform.translate(-originX, -originY);
    localTransform.trn(x, y);

    // Find the first parent that transforms.
    Group parentGroup = parent;
    while (parentGroup != null) {
View Full Code Here

Examples of com.bramosystems.oss.player.core.client.geom.TransformationMatrix.translate()

    public void testTranslate() {
        System.out.println("translate");
        double x = 2.0;
        double y = 2.0;
        TransformationMatrix instance = new TransformationMatrix();
        instance.translate(x, y);

        TransformationMatrix instance2 = new TransformationMatrix();
        instance2.getMatrix().getVx().setZ(x);
        instance2.getMatrix().getVy().setZ(y);
View Full Code Here

Examples of com.cburch.draw.model.CanvasObject.translate()

    List<CanvasObject> select = new ArrayList<CanvasObject>(n);
    List<CanvasObject> clones = new ArrayList<CanvasObject>(n);
    for (CanvasObject o : sel.getSelected()) {
      if (o.canRemove()) {
        CanvasObject copy = o.clone();
        copy.translate(10, 10);
        clones.add(copy);
        select.add(copy);
      } else {
        select.add(o);
      }
View Full Code Here

Examples of com.cburch.logisim.circuit.appear.AppearanceAnchor.translate()

    if (toAdd != null) canvasModel.addObjects(dest, toAdd);

    AppearanceAnchor anchor = findAnchor(canvasModel);
    if (anchor != null && anchorNewLocation != null) {
      anchorOldLocation = anchor.getLocation();
      anchor.translate(anchorNewLocation.getX() - anchorOldLocation.getX(),
          anchorNewLocation.getY() - anchorOldLocation.getY());
    }
    if (anchor != null && anchorNewFacing != null) {
      anchorOldFacing = anchor.getFacing();
      anchor.setValue(AppearanceAnchor.FACING, anchorNewFacing);
View Full Code Here

Examples of com.cburch.logisim.data.Bounds.translate()

      }
    }
    if (ret == null) {
      return Bounds.EMPTY_BOUNDS;
    } else if (relativeToAnchor && offset != null) {
      return ret.translate(-offset.getX(), -offset.getY());
    } else {
      return ret;
    }
  }
 
View Full Code Here

Examples of com.cburch.logisim.data.Location.translate()

        dx = isFirst ? -10 : 10;
        dy = 0;
      }
      Location loc = others.get(neighbor).getLocation();
      do {
        loc = loc.translate(dx, dy);
      } while (usedLocs.contains(loc));
      if (loc.getX() >= 0 && loc.getY() >= 0) {
        return loc;
      }
      do {
View Full Code Here

Examples of com.db4o.config.ObjectClass.translate()

        feedConfiguration.callConstructor(true);
    }

    private void configureOtherObjects(Configuration configuration) {
        ObjectClass urlConfiguration = configuration.objectClass(URL.class);
        urlConfiguration.translate(new UrlConstructor());
        urlConfiguration.cascadeOnActivate(true);
        urlConfiguration.cascadeOnDelete(true);
        urlConfiguration.cascadeOnUpdate(true);
    }
}
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.