Examples of scaleAdd()


Examples of javax.vecmath.Vector3f.scaleAdd()

            Vector3f pt1 = vectorsPool.get();
            pt1.scale(vecLen, vec0);
            pt1.sub(planeOrigin, pt1);

            Vector3f pt2 = vectorsPool.get();
            pt2.scaleAdd(vecLen, vec1, planeOrigin);

            Vector3f pt3 = vectorsPool.get();
            pt3.scale(vecLen, vec1);
            pt3.sub(planeOrigin, pt3);
           
View Full Code Here

Examples of javax.vecmath.Vector3f.scaleAdd()

  @Override
  public void drawContactPoint(Vector3f pointOnB, Vector3f normalOnB, float distance, int lifeTime, Vector3f color) {
    if ((debugMode & DebugDrawModes.DRAW_CONTACT_POINTS) != 0) {
      Vector3f to = tmpVec;
      to.scaleAdd(distance*100f, normalOnB, pointOnB);
      Vector3f from = pointOnB;

      // JAVA NOTE: added
      if (DEBUG_NORMALS) {
        to.normalize(normalOnB);
View Full Code Here

Examples of javax.vecmath.Vector3f.scaleAdd()

            Vector3f vec1 = vectorsPool.get();
            TransformUtil.planeSpace1(planeNormal,vec0,vec1);
            float vecLen = 100f;
           
            Vector3f pt0 = vectorsPool.get();
            pt0.scaleAdd(vecLen, vec0, planeOrigin);

            Vector3f pt1 = vectorsPool.get();
            pt1.scale(vecLen, vec0);
            pt1.sub(planeOrigin, pt1);
View Full Code Here

Examples of javax.vecmath.Vector3f.scaleAdd()

 
  public Vector3f getAncorInA(Vector3f out) {
    Transform tmpTrans = Stack.alloc(Transform.class);

    Vector3f ancorInA = out;
    ancorInA.scaleAdd((lowerLinLimit + upperLinLimit) * 0.5f, sliderAxis, realPivotAInW);
    rbA.getCenterOfMassTransform(tmpTrans);
    tmpTrans.inverse();
    tmpTrans.transform(ancorInA);
    return ancorInA;
  }
View Full Code Here

Examples of javax.vecmath.Vector3f.scaleAdd()

    }

    boolean isSwapped = manifoldPtr.getBody0() != body0;

    Vector3f pointA = Stack.alloc(Vector3f.class);
    pointA.scaleAdd(depth, normalOnBInWorld, pointInWorld);

    Vector3f localA = Stack.alloc(Vector3f.class);
    Vector3f localB = Stack.alloc(Vector3f.class);

    if (isSwapped) {
View Full Code Here

Examples of javax.vecmath.Vector3f.scaleAdd()

    float totalMass = 0;
    Vector3f center = Stack.alloc(Vector3f.class);
    center.set(0, 0, 0);
    for (int k = 0; k < n; k++) {
      center.scaleAdd(masses[k], children.getQuick(k).transform.origin, center);
      totalMass += masses[k];
    }
    center.scale(1f / totalMass);
    principal.origin.set(center);
View Full Code Here

Examples of mikera.vectorz.Vector.scaleAdd()

  public void timeOptimised(int runs) {
    Vector v=Vector.createLength(8388608);
    Vectorz.fillGaussian(v);

    for (int i=0; i<runs; i++) {
      v.scaleAdd(4.0, 1.5); // combine scaling and addition
      v.sqrt();
    }   
  }

  /**
 
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.