Examples of scaleLocal()


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

        break;
      case DragEvent.GESTURE_UPDATED:
        break;
      case DragEvent.GESTURE_ENDED:
        Vector3D vel = de.getDragCursor().getVelocityVector(integrationTime);
        vel.scaleLocal(0.9f); //Test - integrate over longer time but scale down velocity vec
        vel = vel.getLimited(limit);
        oldController = comp.getController();
        comp.setController(new InertiaController(comp, vel, oldController));
        break;
      default:
View Full Code Here

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

                  return segmentEnd;
          }
 
          // Return the point between 'a' and 'b'
          // set length of V to t. V is normalized so this is easy
          v.scaleLocal(t);
          return segmentStart.getAdded(v);
  }
 

    /* code rewritten to do tests on the sign of the determinant */
 
View Full Code Here

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

     *
     * @return the middle point between fingers
     */
    public Vector3D getMiddlePointBetweenFingers(){
      Vector3D bla = secondFingerNewPos.getSubtracted(firstFingerNewPos); //= Richtungsvektor vom 1. zum 2. finger
      bla.scaleLocal(0.5f); //take the half
      return (new Vector3D(firstFingerNewPos.getX() + bla.getX(), firstFingerNewPos.getY() + bla.getY(), firstFingerNewPos.getZ() + bla.getZ()));
    }

    /**
     * Gets the first finger new pos.
View Full Code Here

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

   *
   * @return the middle point between fingers
   */
  private Vector3D getMiddlePointBetweenFingers(Vector3D firstFinger, Vector3D secondFinger){
    Vector3D bla = secondFinger.getSubtracted(firstFinger); //= Richtungsvektor vom 1. zum 2. finger
    bla.scaleLocal(0.5f); //take the half
    return (new Vector3D(firstFinger.getX() + bla.getX(), firstFinger.getY() + bla.getY(), firstFinger.getZ() + bla.getZ()));
  }
 
 
 
View Full Code Here

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

     *
     * @return the middle point between fingers
     */
    public Vector3D getMiddlePointBetweenFingers(){
      Vector3D bla = rotateFingerNew.getSubtracted(pinFingerNew); //= Richtungsvektor vom 1. zum 2. finger
      bla.scaleLocal(0.5f); //take the half
      return (new Vector3D(pinFingerNew.getX() + bla.getX(), pinFingerNew.getY() + bla.getY(), pinFingerNew.getZ() + bla.getZ()));
    }


    /**
 
View Full Code Here

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

                float scaledStepDistance = stepDistance*brushScale;

                Vector3D direction = pos.getSubtracted(lastDrawnPoint);
                float distance = direction.length();
                direction.normalizeLocal();
                direction.scaleLocal(scaledStepDistance);

                float howManySteps = distance/scaledStepDistance;
                int stepsToTake = Math.round(howManySteps);

                //Force draw at 1st point
View Full Code Here

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

      if (target != null && target.equals(this.shape)){
        AbstractShape shape = (AbstractShape)target;
        float amount = ae.getAnimation().getInterpolator().getCurrentStepDelta();
       
        Vector3D newTranslationVect = this.normalizedDirVect.getCopy();
        newTranslationVect.scaleLocal(amount);
        //Move shape
//        shape.translateGlobal(newTranslationVect);
        shape.translate(newTranslationVect);
      }
    }
View Full Code Here

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

  @Override
  public Vector3D getCenterPointLocal() {
    Vertex[] v = this.getVerticesLocal();
    Vertex lengthVect = (Vertex)v[1].getSubtracted(v[0]);
    lengthVect.scaleLocal(0.5f);
    return v[0].getAdded(lengthVect);
  }
 
  /**
   * Gets the length.
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.