Examples of multiply()


Examples of cofh.repack.codechicken.lib.render.uv.UV.multiply()

    for (int k = 0; k < verts.length; k += vp) {
      UV uv = new UV();
      for (int i = 0; i < vp; i++) {
        uv.add(verts[k + i].uv);
      }
      uv.multiply(1D / vp);
      for (int i = 0; i < vp; i++) {
        Vertex5 vert = verts[k + i];
        vert.uv.u += vert.uv.u < uv.u ? d : -d;
        vert.uv.v += vert.uv.v < uv.v ? d : -d;
      }
View Full Code Here

Examples of cofh.repack.codechicken.lib.vec.Vector3.multiply()

    Vector3 v = new Vector3();
    for (Vertex5 vert : verts) {
      v.add(vert.vec);
    }
    v.multiply(1 / (double) verts.length);
    return v;
  }

  public CCModel zOffset(Cuboid6 offsets) {
View Full Code Here

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

     */
    public void poseUpdated(final SkeletonPose pose) {
        // only update if we have something attached.
        if (_attachment != null) {
            final Transform t = pose.getGlobalJointTransforms()[_jointIndex];
            t.multiply(_offset, _store);
            _attachment.setTransform(_store);
        }
    }
}
View Full Code Here

Examples of com.ardor3d.math.Vector3.multiply()

            Vector3 kNormal;
            final int iSave = i;
            for (int iR = 0; iR < _radialSamples; iR++) {
                final double fRadialFraction = iR * fInvRS; // in [0,1)
                final Vector3 kRadial = tempVc.set(afCos[iR], afSin[iR], 0);
                kRadial.multiply(fSliceRadius, tempVa);
                _meshData.getVertexBuffer().put((float) (kSliceCenter.getX() + tempVa.getX()))
                        .put((float) (kSliceCenter.getY() + tempVa.getY()))
                        .put((float) (kSliceCenter.getZ() + tempVa.getZ()));

                BufferUtils.populateFromBuffer(tempVa, _meshData.getVertexBuffer(), i);
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyTransform.multiply()

        // Set our transform
        final ReadOnlyTransform worldT = appliedTransform != null ? appliedTransform : Transform.IDENTITY;
        final Vector3 v = Vector3.fetchTempInstance();
        v.set(x, y, 0);
        worldT.applyForwardVector(v);
        worldT.multiply(subTex.getTransform(), SubTexUtil._helperT);
        SubTexUtil._helperT.translate(v);
        Vector3.releaseTempInstance(v);
        SubTexUtil._mesh.setWorldTransform(SubTexUtil._helperT);

        // set our vertices into the mesh
View Full Code Here

Examples of com.emitrom.lienzo.client.core.types.Transform.multiply()

        }
        int size = list.size(); // TODO no need to use a list

        for (int i = size - 1; i >= 0; i--)
        {
            xfrm.multiply(list.get(i).getCombinedTransform());
        }
        return xfrm;
    }

    protected Transform getCombinedTransform()
View Full Code Here

Examples of com.forgeessentials.util.vector.Vector2.multiply()

  public static Vector2 getDirectionVector(Point center, EntityPlayerMP player)
  {
    Vector2 vecp = new Vector2(center.getX() - player.posX, center.getZ() - player.posZ);
    vecp.normalize();
    vecp.multiply(-1);
    return vecp;
  }

  public static int getDistanceRound(Point center, EntityPlayer player)
  {
View Full Code Here

Examples of com.ibm.icu.math.BigDecimal.multiply()

        BigDecimal lastParsed = new BigDecimal(Integer.MIN_VALUE); // used to make sure that rounding is monotonic
        for (int i = -iterations; i <= iterations; ++i) {
            BigDecimal iValue = base.add(increment.multiply(new BigDecimal(i)).movePointLeft(1));
            BigDecimal smallIncrement = new BigDecimal("0.00000001");
            if (iValue.signum() != 0) {
                smallIncrement.multiply(iValue); // scale unless zero
            }
            // we not only test the value, but some values in a small range around it.
            lastParsed = checkRound(nf, iValue.subtract(smallIncrement), lastParsed);
            lastParsed = checkRound(nf, iValue, lastParsed);
            lastParsed = checkRound(nf, iValue.add(smallIncrement), lastParsed);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Vector3.multiply()

          Vector3 Interpolate(Vector3 start, Vector3 end, float fraction)
          {
//              float distance = Vector3.distance(start, end);
              Vector3 direction = Vector3.subtract(end, start);
              return direction.multiply(fraction).add(start);
          }

          public void EndMove()
          {
              mModified = true;
View Full Code Here

Examples of com.opengamma.analytics.math.function.DoubleFunction1D.multiply()

        polynomials[i] = Pair.of(F1, DF1);
      } else {
        p1 = polynomials[i - 1].getFirst();
        p2 = polynomials[i - 2].getFirst();
        p = (p1.multiply(2. * i + alpha - 1).subtract(p1.multiply(getX())).subtract(p2.multiply((i - 1. + alpha))).divide(i));
        dp = (p.multiply(i).subtract(p1.multiply(i + alpha))).divide(getX());
        polynomials[i] = Pair.of(p, dp);
      }
    }
    return polynomials;
  }
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.