Examples of transformDirectionVector()


Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

        canDrag = true;
      }
     
      Vector3D dir = de.getTranslationVect();
      //Transform the global direction vector into listCellContainer local coordiante space
      dir.transformDirectionVector(theListCellContainer.getGlobalInverseMatrix());
     
      switch (de.getId()) {
      case MTGestureEvent.GESTURE_DETECTED:
      case MTGestureEvent.GESTURE_UPDATED:
        //Constrain the movement of the listcellcontainer to the boundaries of the List
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

          return;
        }
        startVelocityVec.scaleLocal(dampingValue);
       
        Vector3D transVect = new Vector3D(startVelocityVec);
        transVect.transformDirectionVector(listCellContainer.getGlobalInverseMatrix());
       
        theListCellContainer.translate(new Vector3D(0, transVect.y), TransformSpace.LOCAL)
       
//        System.out.println("Vel vect: " + transVect);
       
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

      //@Override
      public boolean processGestureEvent(MTGestureEvent ge) {
        DragEvent de = (DragEvent)ge;
        Vector3D dir = new Vector3D(de.getTranslationVect());
        //Transform the global direction vector into knob local coordiante space
        dir.transformDirectionVector(knob.getGlobalInverseMatrix());
       
        float oldValue = getValue();
       
        if (horizontal){
          knob.translate(new Vector3D(dir.x,0,0), TransformSpace.LOCAL);
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

    for (Iterator<MouseInfo> iter = mouseInfos.iterator(); iter.hasNext();) {
      MouseInfo mouseInfo = (MouseInfo) iter.next();
      if (mouseInfo.ellipse != null){
        float currentEllipseWidth = 6;
        Vector3D v = new Vector3D(currentEllipseWidth,0,0);
        v.transformDirectionVector(currentScene.getCanvas().getGlobalInverseMatrix());
        float newEllipseWidth = currentEllipseWidth = v.length();
        mouseInfo.ellipse.setWidthXYGlobal(newEllipseWidth*2);
        try {
          oldCanvas.removeChild(mouseInfo.ellipse);
        } catch (Exception e) {
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

//      MTCanvas canvas = mtApp.getCurrentScene().getMainCanvas();
     
      float currentEllipseWidth = 6;
      if (currentScene != null){
        Vector3D v = new Vector3D(currentEllipseWidth,0,0);
        v.transformDirectionVector(currentScene.getCanvas().getGlobalInverseMatrix());
        currentEllipseWidth = v.length();
      }else{
       
      }
//      mouseInfo.ellipse.setWidthXYGlobal(newEllipseWidth);
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

                      Matrix m = MTComponent.getTransformToDestinationParentSpace(ta, getParentToAddNewTextAreaTo());
                      ta.transform(m);
                      //Transform the direction vector for the translation animation
                      //to preserve the direction from the old reference frame to the new parents one
//                      v.transformNormal(m);
                      v.transformDirectionVector(m);

                      ta.tweenTranslate(v, 500, 0.3f, 0.7f);

                      getParentToAddNewTextAreaTo().addChild(ta);
                    }else{
View Full Code Here

Examples of org.mt4j.util.math.Vector3D.transformDirectionVector()

                        ta.transform(m);
                        //Transform the direction vector to preserve the global direction
                        //from the old reference frame to the new parents one
                        //The translation part has to be removed from the matrix because we're transforming
                        //a translation vector not a point vector
                        v.transformDirectionVector(m);

                        ta.tweenTranslate(v, 500, 0.3f, 0.7f);
                        /////////////////////
                        getParent().addChild(ta);
                      }else{
View Full Code Here

Examples of org.mt4j.util.math.Vertex.transformDirectionVector()

  }
 
  public float getLengthRelativeToParent() {
    Vertex[] v = this.getVerticesLocal();
    Vertex lengthVect = (Vertex)v[1].getSubtracted(v[0]);
    lengthVect.transformDirectionVector(this.getLocalMatrix());
    return lengthVect.length();
  }
 
  public float getLengthLocal(){
    Vertex[] v = this.getVerticesLocal();
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.