Examples of sub()


Examples of javax.vecmath.Point3f.sub()

    // in these renderers.
   
   
    Point3f ptCamera = new Point3f(screenWidth / 2, screenHeight / 2, 0);
    viewer.unTransformPoint(ptCamera, ptCamera);
    ptCamera.sub(fixedRotationCenter);
    Point3f pt = new Point3f(screenWidth / 2, screenHeight / 2, cameraDistanceFromCenter * scalePixelsPerAngstrom);
    viewer.unTransformPoint(pt, pt);
    pt.sub(fixedRotationCenter);
    ptCamera.add(pt);
/*
 
View Full Code Here

Examples of javax.vecmath.Vector2d.sub()

        for (int i = 0; i < fWorld.objects.size(); i++) {
          FysixObject fo1 = (FysixObject) fWorld.objects.get(i);                          
          for (int j = i+1; j < fWorld.objects.size(); j++) {
              FysixObject fo2 = (FysixObject) fWorld.objects.get(j);
              Vector2d dist = new Vector2d(0,0);
              dist.sub(fo2.getPosition(), fo1.getPosition());
              int len = (int)dist.length();
              if(len>0 && len < 250){ // Affect area...
                //Vector2d alfa = new Vector2d(fo1.getPosition());
                FysixObject foA;
                FysixObject foB;
View Full Code Here

Examples of javax.vecmath.Vector2f.sub()

            } else {
                nodeToLayout = copyRenderable;
            }
            Vector2f oldPos = nodeToLayout.getPosition();
            tree.layout(nodeToLayout);
            oldPos.sub(nodeToLayout.getPosition());
            nodeToLayout.move(oldPos);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of javax.vecmath.Vector3d.sub()

* Returns the square of the minimum distance from the given point to the segment
* defined by start, end.
*/
static final double ptToSegSquare(Point3d pt, Point3d start, Point3d end, Point3d closest) {
  Vector3d dir = new Vector3d();
  dir.sub(end, start);

  Vector3d dt = new Vector3d();
  dt.sub(pt, start);

  // Project the point onto the line defined by the segment
View Full Code Here

Examples of javax.vecmath.Vector3f.sub()

            Transform controlBallTransform = new Transform();
            controlBall.getMotionState().getWorldTransform(controlBallTransform);
            Vector3f controlBallLocation = controlBallTransform.origin;
            Vector3f cameraPosition = new Vector3f(camera.x(), camera.y(), camera.z());
            Vector3f force = new Vector3f();
            force.sub(cameraPosition, controlBallLocation);
            controlBall.activate(true);
            controlBall.applyCentralForce(force);
        }
        if (createNewShape) {
            CollisionShape shape = new SphereShape(3.0f);
View Full Code Here

Examples of jinngine.math.Vector3.sub()

        // check the next vertex from poly2
        if (poly2iter.hasNext()) {
          p2 = poly2iter.next();
         
          // distance less that epsilon
          if (p2.sub(p1).norm() >= epsilon)
            return false;
        } else {
          // no more vertices
          return true;
        }   
View Full Code Here

Examples of jnr.x86asm.Assembler.sub()

        // Need to align the stack to 16 bytes for function call.
        // It already has 8 bytes pushed (the return address), so making space
        // to save the return value from the function neatly aligns it to 16 bytes
        int space = resultClass == float.class || resultClass == double.class
                    ? 24 : 8;
        a.sub(rsp, imm(space));

        // Clear %rax, since it is used by varargs functions to determine the number of float registers to be saved
        a.mov(rax, imm(0));

        // Call to the actual native function
View Full Code Here

Examples of mikera.arrayz.INDArray.sub()

  }
 
  @Override
  public INDArray subCopy(INDArray a) {
    INDArray r=this.broadcastCloneLike(a);
    r.sub(a);
    return r;
  }
 
  @Override
  public INDArray multiplyCopy(INDArray a) {
View Full Code Here

Examples of mikera.matrixx.AMatrix.sub()

    }

    private double diffNormF(AMatrix tempA, AMatrix tempB)
    {
        AMatrix temp = tempA.copy();
        temp.sub(tempB);
        double total = temp.elementSquaredSum();
        temp.abs();
        double scale = temp.elementMax();
        return Math.abs(scale-0) > 1e-12 ? total/scale : 0;
    }
View Full Code Here

Examples of mikera.matrixx.Matrix.sub()

        checkComponents(alg,B);
    }

    public void testWide() {
        Matrix A = Matrix.createRandom(1,1);
        A.sub(0.5);
        A.scale(2);
        SvdImplicitQr alg = createSvd();
        assertNotNull(alg._decompose(A));

        checkComponents(alg,A);
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.