Examples of rotateZ()


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

          //Inverse the angle if we are inside the boundingsphere and
          //hit the inner side
          if (camInSphere){ //we hit the backside of the boundingsphere, have to invert direction
//            angle *= -1;
//            rotationAxis.rotateZ(PApplet.radians(180)); //better than angle*-1
            rotationAxis.rotateZ(ToolsMath.PI); //better than angle*-1
//            rotationAxis.rotateX(PApplet.radians(180)); //better than angle*-1
//            rotationAxis.scaleLocal(-1); //like angle*-1
//            rotationAxis.rotateAroundAxisLocal(rotationAxis, PApplet.radians(90));
          }
          rotationAxis.normalizeLocal();
View Full Code Here

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

    final float buttonOpacity = 170;
   
    //CLOSE BUTTON
//    Vector3D a = new Vector3D(-width * 1.2f, height/2f);
    Vector3D a = new Vector3D(-width * 1.55f, 0);
    a.rotateZ(PApplet.radians(80));
    final MTRectangle closeButton = new MTRectangle(x + a.x, y + a.y, buttonWidth, buttonHeight, app);
   
    if (closeButtonImage == null){
      closeButtonImage = app.loadImage(MT4jSettings.getInstance().getDefaultImagesPath() +
//          "close_32.png"));
View Full Code Here

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

    //or was added to a normal scene
    //-> if its not a windowed scene we dont display the Restore button
    if (this.windowedScene){
      //RESTORE BUTTON
      Vector3D b = new Vector3D(-width * 1.55f, 0);
      b.rotateZ(PApplet.radians(10));
      final MTRectangle restoreButton = new MTRectangle(x + b.x, y + b.y, buttonWidth, buttonHeight, app);
     
      if (restoreButtonImage == null){
        restoreButtonImage = app.loadImage(MT4jSettings.getInstance().getDefaultImagesPath() +
//            "window_app_32.png"));
View Full Code Here

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

   
    System.out.println(c.angleBetween(d) * ToolsMath.RAD_TO_DEG);
    assertTrue(c.angleBetween(d) * ToolsMath.RAD_TO_DEG == 90 );
   
    Vector3D e = new Vector3D(c);
    e.rotateZ(90 * ToolsMath.DEG_TO_RAD);
    e.rotateZ(-90 * ToolsMath.DEG_TO_RAD);
    assertTrue(e.equalsVector(c));
  }

}
 
View Full Code Here

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

    System.out.println(c.angleBetween(d) * ToolsMath.RAD_TO_DEG);
    assertTrue(c.angleBetween(d) * ToolsMath.RAD_TO_DEG == 90 );
   
    Vector3D e = new Vector3D(c);
    e.rotateZ(90 * ToolsMath.DEG_TO_RAD);
    e.rotateZ(-90 * ToolsMath.DEG_TO_RAD);
    assertTrue(e.equalsVector(c));
  }

}
 
View Full Code Here

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

      //Get control point of last QuadTo
      Vertex lastQuadControlPoint = cubicBezVertTOQuadricControlPoint.get(lastPoint);
      cubicBezVertTOQuadricControlPoint.remove(lastPoint);

      //Rotate that controlpoint around the end point of the last QuadTo
      lastQuadControlPoint.rotateZ(lastEndPoint, 180);

      //Put in startPoint = last QuadTo Endpoint of this smoothQuadTo, the calculated control point, and the endpoint of smoothQuadTo
      BezierVertex b5 = ToolsGeometry.getCubicFromQuadraticCurve(lastEndPoint, lastQuadControlPoint , new Vertex(x, y, 0));

      //Save last quad control point
View Full Code Here

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

      //Get control point of last QuadTo
      Vertex lastQuadControlPoint = cubicBezVertTOQuadricControlPoint.get(lastPoint);
      cubicBezVertTOQuadricControlPoint.remove(lastPoint);

      //Rotate that controlpoint around the end point of the last QuadTo
      lastQuadControlPoint.rotateZ(lastEndPoint, 180);

      //Put in startPoint = last QuadTo Endpoint of this smoothQuadTo, the calculated control point, and the endpoint of smoothQuadTo
      BezierVertex b5 = ToolsGeometry.getCubicFromQuadraticCurve(
          lastEndPoint,
          lastQuadControlPoint ,
View Full Code Here

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

    if (lastPoint instanceof BezierVertex){
      BezierVertex lastBez = (BezierVertex)lastPoint;

      Vertex lastConPointCopy = (Vertex)lastBez.getSecondCtrlPoint().getCopy();
      //reflect the last controlpoint at the current point
      lastConPointCopy.rotateZ(lastPoint, 180);
      BezierVertex b = new BezierVertex(lastConPointCopy.getX(),lastConPointCopy.getY(),0, x2,y2,0, x,y,0);

      pathPoints.add(b);
      currentSubPath.add(b);
    }else{
View Full Code Here

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

    if (lastPoint instanceof BezierVertex){
      BezierVertex lastBez = (BezierVertex)lastPoint;

      Vertex lastConPointCopy = (Vertex)lastBez.getSecondCtrlPoint().getCopy();
      //reflect the last controlpoint at the current point
      lastConPointCopy.rotateZ(lastPoint, 180);
     
      BezierVertex b = new BezierVertex(
          lastConPointCopy.getX()  ,  lastConPointCopy.getY()0,
          lastPoint.getX() + x2,    lastPoint.getY() + y2,    0,
          lastPoint.getX() + x,     lastPoint.getY() + y,      0);
View Full Code Here

Examples of processing.core.PMatrix3D.rotateZ()

      m.translate(bone.getXposition(), bone.getYposition(), bone.getZposition());
      m.translate(bone.getOffsetX(), bone.getOffsetY(), bone.getOffsetZ());
     
      m.rotateY(PApplet.radians(bone.getYrotation()));
      m.rotateX(PApplet.radians(bone.getXrotation()));
      m.rotateZ(PApplet.radians(bone.getZrotation()));
     
      bone.global_matrix = m;

      if (bone.getParent() != null && bone.getParent().global_matrix != null)
        m.preApply(bone.getParent().global_matrix);
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.