Package edu.cmu.cs.stage3.math

Examples of edu.cmu.cs.stage3.math.Matrix44


  }
  public void translate( javax.vecmath.Vector3d vector, ReferenceFrame asSeenBy ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
    }
    Matrix44 m = getTransformation( asSeenBy );
    m.translate( vector );
    setTransformation( m, asSeenBy );
  }
View Full Code Here


  }
  public void rotate( javax.vecmath.Vector3d axis, double amount, ReferenceFrame asSeenBy ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
    }
    Matrix44 m = getTransformation( asSeenBy );
    m.rotate( axis, amount );
    setTransformation( m, asSeenBy );
  }
View Full Code Here

  }
  public void scale( javax.vecmath.Vector3d axis, ReferenceFrame asSeenBy ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
    }
    Matrix44 m = getTransformation( asSeenBy );
    m.scale( axis );
    setTransformation( m, asSeenBy );
  }
View Full Code Here

  }
  public void transform( javax.vecmath.Matrix4d trans, ReferenceFrame asSeenBy ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
    }
    Matrix44 m = getTransformation( asSeenBy );
    m.transform( trans );
    setTransformation( m, asSeenBy );
  }
View Full Code Here

    return sphere;
  }
    */

  public void setPivot( ReferenceFrame pivot ) {
    Matrix44 m = getTransformation( pivot );
    Matrix44 mInverse = Matrix44.invert( m );
    transform( mInverse, this );
    for( int i=0; i<getChildCount(); i++ ) {
      Component child = getChildAt( i );
      if( child instanceof Transformable ) {
        ((Transformable)child).transform( m, this );
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

      if (asb == null) asb = upperLimb;
     
      javax.vecmath.Vector3d targPos = m_target.getBoundingBox(asb).getCenter();
      Vector3d offsetDir = null;
     
      HowMuch howMuch = HowMuch.INSTANCE_AND_PARTS;
      // if target is not a top-level object, just get the bounding box for that one part
      if ( !(m_target.getParent().equals(m_target.getWorld() )) ){
        howMuch = HowMuch.INSTANCE;
      }
     
View Full Code Here

    protected java.util.Vector createPopupStructure() {
      java.util.Vector structure = createExpressionStructure();
      if( (structure != null) && isNullValid ) {
        if( structure.size() > 0 ) {
          structure.insertElementAt( new StringObjectPair( "Separator", javax.swing.JSeparator.class ), 0 );
        }
        //structure.insertElementAt( new StringObjectPair( "<None>", objectRunnableFactory.createRunnable( null ) ), 0 );
      }
      return structure;
    }
View Full Code Here

        structure.add( new edu.cmu.cs.stage3.util.StringObjectPair( "Expressions which evaluate to " + className, expressionStructure ) );
      }

      if( isNullValid ) {
        if( structure.size() > 0 ) {
          structure.insertElementAt( new StringObjectPair( "Separator", javax.swing.JSeparator.class ), 0 );
        }
        //structure.insertElementAt( new StringObjectPair( "<None>", objectRunnableFactory.createRunnable( null ) ), 0 );
      }

      return structure;
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.math.Matrix44

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.