Examples of scale()


Examples of physics.Vector2D.scale()

    a.set(0,0);
  }
 
  public void apply(Vector2D force){
    Vector2D a_=new Vector2D();
    a_.scale(1.0/mass,force);
    a.add(a_);
  }
 
}
View Full Code Here

Examples of processing.core.PApplet.scale()

    for (int i = 0; i < triangles.length; i++) {
      Triangle t = triangles[i];
      r.pushMatrix();
      Vector3D centerPoint = t.getCenterPointLocal();
      r.translate(centerPoint.x, centerPoint.y, centerPoint.z);
      r.scale(-2,-2,-2);
     
      r.line(0, 0, 0,  t.getNormalLocal().x, t.getNormalLocal().y, t.getNormalLocal().z);
      r.popMatrix();
    }
//    for (int i = 0; i < normals.length; i++) {
View Full Code Here

Examples of processing.core.PGraphics.scale()

        diagramImg.rotateY(GLOBAL.rotateModelsY);
      } else {
        diagramImg.rotateX(rotateX);
        diagramImg.rotateY(rotateY);
      }
      diagramImg.scale((float) GLOBAL.getZOOM());
      diagramImg.scale(scale);

      //we scaled up so now we need to scale the window width move
      diagramImg.translate((-(w / scale) / 2) + (float)(GLOBAL.CAM_OFFSET_X),
          (-(h / scale) / 2) + (float)(GLOBAL.CAM_OFFSET_Y));
View Full Code Here

Examples of se.llbit.math.Vector3d.scale()

    Vector3d v = vectorPool.get(sv);
    Vector3d w = vectorPool.get(sw);

    u.scale(FastMath.cos(phi)*sin_a);
    v.scale(FastMath.sin(phi)*sin_a);
    w.scale(cos_a);

    reflected.d.add(u, v);
    reflected.d.add(w);
    reflected.d.normalize();

View Full Code Here

Examples of siena.core.DecimalPrecision.scale()

        column.setSizeAndScale(19, 2);
      }
      else {
        if(an.storageType() == DecimalPrecision.StorageType.NATIVE){
          columnType = Types.DECIMAL;
          column.setSizeAndScale(an.size(), an.scale());
        }else if(an.storageType() == DecimalPrecision.StorageType.STRING) {
          columnType = Types.VARCHAR;
          // should be an.size+"."+sign
          column.setSize((an.size()+2)+"");
        }else if(an.storageType() == DecimalPrecision.StorageType.DOUBLE) {
View Full Code Here

Examples of soc.qase.tools.vecmath.Vector3f.scale()

  private Vector3f getEndpoint(Vector3f start, Vector3f dir, float maxDist)
  {
    Vector3f end = new Vector3f(dir);

    end.normalize();
    end.scale(maxDist);
    end.add(start);

    return end;
  }
View Full Code Here

Examples of sun.java2d.loops.ScaledBlit.Scale()

            comp = CompositeType.SrcNoEa;
        }

        ScaledBlit blit = ScaledBlit.getFromCache(srcType, comp, dstType);
        if (blit != null) {
            blit.Scale(srcData, dstData, sg.composite, clipRegion,
                       sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of sun.print.ProxyGraphics2D.scale()

        /* The application expects to see user space at 72 dpi.
         * so change user space from image source resolution to
         *  72 dpi.
         */
        proxy.scale(sourceResX / DEFAULT_USER_RES,
                    sourceResY / DEFAULT_USER_RES);

        proxy.translate(
            -wPrinterJob.getPhysicalPrintableX(pageFormat.getPaper())
               / wPrinterJob.getXRes() * DEFAULT_USER_RES,
 
View Full Code Here

Examples of toxi.geom.Vec2D.scale()

            Vec3D[] curr = new Vec3D[resV + 1];
            for (int v = 0; v < resV; v++) {
                Vec3D vert = surf.getControlNet().get(u, v).to3D();
                if (v > 0 && u > 0) {
                    mesh.addFace(curr[v - 1], vert, prev[v - 1],
                            dUV.scale(u, v - 1), dUV.scale(u, v),
                            dUV.scale(u - 1, v - 1));
                    mesh.addFace(vert, prev[v], prev[v - 1], dUV.scale(u, v),
                            dUV.scale(u - 1, v), dUV.scale(u - 1, v - 1));
                }
                curr[v] = vert;
View Full Code Here

Examples of toxi.geom.Vec3D.scale()

        // add minute offset to avoid div-by-zero errors
        float dist = delta.magnitude() + EPS;
        float normDistStrength = (dist - restLength)
                / (dist * (a.invWeight + b.invWeight)) * strength;
        if (!a.isLocked && !isALocked) {
            a.addSelf(delta.scale(normDistStrength * a.invWeight));
            if (applyConstraints) {
                a.applyConstraints();
            }
        }
        if (!b.isLocked && !isBLocked) {
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.