Package math

Examples of math.Vector3


      return Math.sqrt(vec.x * vec.x + vec.y * vec.y + vec.z * vec.z);
    }
   
    double getAngle(Vector3 a, Vector3 b) { 
      // calculate angle
      Vector3 c = Vector3.subtract(a, b);
      double cLength = getLength(c);
      double aLength = getLength(a);
      double bLength = getLength(b);   
      double cosC = ((cLength * cLength) - (aLength * aLength) - (bLength * bLength)) / (-2.0 * aLength * bLength);
     
 
View Full Code Here


    /*protected Vector3 getHandForward() {
      return null;
    }*/
   
    protected void setVectors() {
      Vector3 rightUpperPos = upperLimb.getPosition(upperLimb);
      Vector3 targetPos = getTargetPosition(); //m_target.getPosition(upperLimb); 
      targetVector = Vector3.subtract(targetPos,rightUpperPos);
      //targetVector.normalize();
     
      javax.vecmath.Vector3d currentDir = null;
      if (lowerLimb == null) {
View Full Code Here

          rightFootFinalOrient.rotateX(0.25 * java.lang.Math.PI);
         
        }
       
        if (( rightUpper != null) && (rightLower != null)) {
          Vector3 posLower = rightLower.getPosition(rightUpper);
          edu.cmu.cs.stage3.math.Box boxLower = rightLower.getBoundingBox(rightLower);
         
          lengthSupportLeg = java.lang.Math.abs(posLower.y) + java.lang.Math.abs(boxLower.getMinimum().z);
         
          double lengthLowerLeg =  0.0;
View Full Code Here

    }

    public void buildPoses(Model rootMod, Pose startPose, Pose endPose) {
        Key positionKey;
        Key quaternionKey;
        Vector3 position;
        Quaternion orientation;


        if (realMod!=null) {
            position=realMod.getPosition();
View Full Code Here

      return Math.sqrt(vec.x * vec.x + vec.y * vec.y + vec.z * vec.z);
    }
   
    double getAngle(Vector3 a, Vector3 b) { 
      // calculate angle
      Vector3 c = Vector3.subtract(a, b);
      double cLength = getLength(c);
      double aLength = getLength(a);
      double bLength = getLength(b);   
      double cosC = ((cLength * cLength) - (aLength * aLength) - (bLength * bLength)) / (-2.0 * aLength * bLength);
     
 
View Full Code Here

    /*protected Vector3 getHandForward() {
      return null;
    }*/
   
    protected void setVectors() {
      Vector3 rightUpperPos = upperLimb.getPosition(upperLimb);
      Vector3 targetPos = getTargetPosition(); //m_target.getPosition(upperLimb); 
      targetVector = Vector3.subtract(targetPos,rightUpperPos);
      //targetVector.normalize();
     
      javax.vecmath.Vector3d currentDir = null;
      if (lowerLimb == null) {
View Full Code Here

  public javax.vecmath.Vector4d transformTo( javax.vecmath.Vector4d xyzw, ReferenceFrame to ) {
    return MathUtilities.multiply( xyzw, getTransformation( to ) );
  }
  public javax.vecmath.Vector3d transformTo( javax.vecmath.Vector3d xyz, ReferenceFrame to ) {
    return new Vector3( transformTo( new Vector4( xyz, 1 ), to ) );
  }
View Full Code Here

      distanceToMoveHighPoint = 0.0;
    }
   
    //assuming that legs are the same length
    public void setLegLengths() {
      Vector3 top = new Vector3();
      javax.vecmath.Vector3d bottom = new javax.vecmath.Vector3d();
     
      footLength = 0.0;
      footHorizLength = 0.0;
     
View Full Code Here

      if(leftLowerArm != null) leftLowerArmInitialOrient = leftLowerArm.getOrientationAsAxes(leftLowerArm);
      //System.out.println("leftLowerArm: " + leftLowerArmInitialOrient);
     
      if ((rightUpper != null) && (leftUpper != null)) {
     
        Vector3 top = rightUpper.getPosition(rightUpper);
        javax.vecmath.Vector3d bottom = rightUpper.getBoundingBox(rightUpper).getCenterOfBottomFace();
        double offset = (top.y - bottom.y) - totalLength;
     
        top = leftUpper.getPosition(leftUpper);
        bottom = leftUpper.getBoundingBox(leftUpper).getCenterOfBottomFace();
View Full Code Here

  }
  public double getDistanceTo( ReferenceFrame other ) {
    return Math.sqrt( getDistanceSquaredTo( other ) );
  }
  public double getDistanceSquaredTo( ReferenceFrame other ) {
    Vector3 pos = getPosition( other );
    return pos.getLengthSquared();
  }
View Full Code Here

TOP

Related Classes of math.Vector3

Copyright © 2018 www.massapicom. 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.