Examples of unit()


Examples of Hexel.math.Vector3d.unit()

    ArrayList<Vector3i> blocks = new ArrayList<Vector3i>();
    double STEP_SIZE = .01;

    Vector3d v = new Vector3d();
    Vector3d step = Vector3d.Sub(t, v);
    step.unit();
    step.times(STEP_SIZE);

    Vector2d tmp2d = new Vector2d();
    Vector3i tmp3i = new Vector3i();
View Full Code Here

Examples of Hexel.math.Vector3d.unit()

  public Vector3i getClosestNonEmptyBlockOnVector(Vector3d offset, Vector3d t) {
    double STEP_SIZE = .01;

    Vector3d v = new Vector3d();
    Vector3d step = Vector3d.Sub(t, v);
    step.unit();
    step.times(STEP_SIZE);

    Vector2d tmp2d = new Vector2d();
    Vector3i tmp3i = new Vector3i();
View Full Code Here

Examples of Hexel.math.Vector3d.unit()

  public Vector3i getClosestEmptyBlockOnVector(Vector3d offset, Vector3d t) {
    double STEP_SIZE = .01;

    Vector3d v = new Vector3d();
    Vector3d step = Vector3d.Sub(t, v);
    step.unit();
    step.times(STEP_SIZE);

    Vector3i farthestEmpty = new Vector3i();
    Vector3i blockPos = new Vector3i();
View Full Code Here

Examples of Hexel.math.Vector3d.unit()

  public void moveMovable(Movable movable, Vector3d reqMoveVector, Vector3i tmp){

    Vector3d partialMove = new Vector3d(reqMoveVector);

    partialMove.unit();
    partialMove.times(.2);
    Vector3d leftToMove = new Vector3d(reqMoveVector);
    while (leftToMove.mag() > 0){
      if (leftToMove.mag() > partialMove.mag()){
        Movement movement = getMovement((Volumetric) movable,
View Full Code Here

Examples of Hexel.math.Vector3d.unit()

      Vector3d plane = tmps.v3d3[i];
      plane.x = vd.x - ud.x;
      plane.y = vd.y - ud.y;
      plane.z = 0;
      plane.cross(up);
      plane.unit();
      axis[3 + i] = plane;
      if (plane.y == -1)
        plane.y = 1;
    }
    double[] magnitudes = tmps.d6;
View Full Code Here

Examples of ca.eandb.jmist.math.Vector3.unit()

      Point2 p = pointOnImagePlane;
      Vector3 v = new Vector3(
          width * (p.x() - 0.5),
          height * (0.5 - p.y()),
          -1.0);
      Ray3 ray = new Ray3(Point3.ORIGIN, v.unit());
      Color color = getWhite();
      double z = v.x() * v.x() + v.y() * v.y() + 1.0;
      double pdf = z * z / (width * height);
      return ScatteredRay.diffuse(ray, color, pdf);
    }
View Full Code Here

Examples of de.hpi.eworld.simulationstatistic.model.Value.unit()

    }
    XYSeriesCollection dataCol = new XYSeriesCollection(serie);

    JFreeChart chart = ChartFactory.createScatterPlot(
        "Dependency Scatter Plot", firstValue.text() + "  " + firstValue.unit(),
        secondValue.text() + "  " + secondValue.unit(), dataCol,
        PlotOrientation.HORIZONTAL, true, true, false);
    chart.addSubtitle(new TextTitle("Each dot represents the value combination of one edge\n" +
        "Only non-zero values are considered"));
    ChartFrame frame = new ChartFrame("Dependency Scatter Plot", chart);
    frame.setIconImage(Toolkit.getDefaultToolkit().getImage(
View Full Code Here

Examples of javax.ejb.AccessTimeout.unit()

    AspectGenerator<X> next = super.create(method, true);

    if (accessTimeout != null) {
      return new StatefulMethodHeadGenerator<X>(this, method, next,
                                                accessTimeout.value(),
                                                accessTimeout.unit());
    } else {
      return new StatefulMethodHeadGenerator<X>(this, method, next);
    }
  }
}
View Full Code Here

Examples of javax.ejb.AccessTimeout.unit()

        final StatefulSessionComponent component = getComponent(context, StatefulSessionComponent.class);
        final StatefulSessionComponentInstance instance = getComponentInstance(context);

        // TODO: per method
        AccessTimeout timeout = component.getAccessTimeout();
        boolean acquired = lock.tryLock(timeout.value(), timeout.unit());
        if(!acquired) {
            throw new ConcurrentAccessTimeoutException("EJB 3.1 FR 4.3.14.1 concurrent access timeout on " + context
                 + " - could not obtain lock within " + timeout.value() + timeout.unit());
        }
View Full Code Here

Examples of javax.ejb.AccessTimeout.unit()

        // TODO: per method
        AccessTimeout timeout = component.getAccessTimeout();
        boolean acquired = lock.tryLock(timeout.value(), timeout.unit());
        if(!acquired) {
            throw new ConcurrentAccessTimeoutException("EJB 3.1 FR 4.3.14.1 concurrent access timeout on " + context
                 + " - could not obtain lock within " + timeout.value() + timeout.unit());
        }

        TransactionSynchronizationRegistry transactionSynchronizationRegistry = component.getTransactionSynchronizationRegistry();
        Object currentTransactionKey = transactionSynchronizationRegistry.getTransactionKey();
        if(transactionKey != null) {
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.