Package javax.vecmath

Examples of javax.vecmath.Vector3d.negate()


        Cylinder link = new Cylinder(1.5f, (float)source.distance(destination));
        link.setAppearance(base);

        Vector3d destination0 = new Vector3d(destination);
        destination0.negate();
        destination0.add(source);
        Vector3d diff = new Vector3d(destination0);
        destination0.y = -destination0.y;
        double angle = destination0.angle(new Vector3d(0.0, -1.0, 0.0));
        destination0.cross(destination0, new Vector3d(0.0, -1.0, 0.0));
View Full Code Here


           
            Vector3d armForces = new Vector3d();
            armForces.add(armForcesKp, armForcesKd);
           
            xArmExternalForcePoint.setForce(armForces);
            armForces.negate();
            yArmExternalForcePoint.setForce(armForces);
           
           
            // Pen onto desk:
           
View Full Code Here

     
      //calculate offset from the center of the bounding box
      if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.BACKWARD)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfBackFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(2);
        offsetDir.negate();
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.UP)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfTopFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(1);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.DOWN)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfBottomFace();
View Full Code Here

        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfTopFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(1);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.DOWN)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfBottomFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(1);
        offsetDir.negate();
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.LEFT)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfLeftFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(0);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.RIGHT)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfRightFace();
View Full Code Here

        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfLeftFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(0);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.RIGHT)) {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfRightFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(0);
        offsetDir.negate();
      } else {
        targPos = m_target.getBoundingBox(m_target, howMuch).getCenterOfFrontFace()
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(2);
      }
     
View Full Code Here

     
      //calculate offset from the center of the bounding box
      if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.BACKWARD)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfBackFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(2);
        offsetDir.negate();
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.UP)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfTopFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(1);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.DOWN)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfBottomFace();
View Full Code Here

        targPos = m_target.getBoundingBox(m_target).getCenterOfTopFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(1);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.DOWN)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfBottomFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(1);
        offsetDir.negate();
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.LEFT)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfLeftFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(0);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.RIGHT)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfRightFace();
View Full Code Here

        targPos = m_target.getBoundingBox(m_target).getCenterOfLeftFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(0);
      } else if (sideToTouch.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.RIGHT)) {
        targPos = m_target.getBoundingBox(m_target).getCenterOfRightFace();
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(0);
        offsetDir.negate();
      } else {
        targPos = m_target.getBoundingBox(m_target).getCenterOfFrontFace()
        offsetDir = m_target.getOrientationAsAxes(asb).getRow(2);
      }
     
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.