Examples of Vector2


Examples of org.cmj.flowy.simulation.math.Vector2

    }

    public Vector2 CalculateGradient(Vector2 r) {
        float lenSq = r.getLengthSqaured();
        if (lenSq > theKernelSizeSquared) {
            return new Vector2(0.0f, 0.0f);
        }
        if (lenSq < Constants.FLOAT_EPSILON) {
            lenSq = Constants.FLOAT_EPSILON;
        }
        float diffSq = theKernelSizeSquared - lenSq;
        float f = -thefactor * 6.0f * diffSq * diffSq;
        return new Vector2(r.x * f, r.y * f);
    }
View Full Code Here

Examples of org.cmj.flowy.simulation.math.Vector2

  }

  public Vector2 CalculateGradient(Vector2 r) {
    float lenSq = r.getLengthSqaured();
    if (lenSq > theKernelSizeSquared) {
      return new Vector2(0.0f, 0.0f);
    }
    if (lenSq < Constants.FLOAT_EPSILON) {
      lenSq = Constants.FLOAT_EPSILON;
    }
    float len = (float) Math.sqrt((double) lenSq);
    float f = theFactorIntermediate * (theKernelSize - len)
        * (theKernelSize - len) / len;
    return new Vector2(r.x * f, r.y * f);
  }
 
View Full Code Here

Examples of org.graphstream.ui.geom.Vector2

      Point2 oo = (Point2) o;
      xyz[0] = oo.x;
      xyz[1] = oo.y;
      xyz[2] = 0;
    } else if(o instanceof Vector2) {
      Vector2 oo = (Vector2) o;
      xyz[0] = oo.data[0];
      xyz[1] = oo.data[1];
      xyz[2] = 0;
    } else {
      logger.warning(String.format("Do not know how to handle xyz attribute %s.", o.getClass().getName()));
View Full Code Here

Examples of universalelectricity.api.vector.Vector2

{
  private TileFortronCapacitor tileEntity;

  public GuiButtonPressTransferMode(int id, int x, int y, GuiMFFS mainGui, TileFortronCapacitor tileEntity)
  {
    super(id, x, y, new Vector2(), mainGui);
    this.tileEntity = tileEntity;
  }
View Full Code Here

Examples of wecui.util.Vector2

    public PointRectangle(Vector2 point) {
        this.point = point;
    }

    public PointRectangle(int x, int z) {
        this.point = new Vector2(x, z);
    }
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.