Package com.badlogic.gdx.math

Examples of com.badlogic.gdx.math.Matrix4


 
  /** Time step, DO NOT CHANGE MANUALLY */
  public float deltaTime, deltaTimeSqr;
 
  public ParticleController(){
    transform = new Matrix4();
    scale = new Vector3(1,1,1);
    influencers = new Array<Influencer>(true, 3, Influencer.class);
    setTimeStep(DEFAULT_TIME_STEP);
  }
View Full Code Here


  /** Calculates window scissor coordinates from local coordinates using the batch's current transformation matrix.
   * @see ScissorStack#calculateScissors(Camera, float, float, float, float, Matrix4, Rectangle, Rectangle) */
  public void calculateScissors (Rectangle localRect, Rectangle scissorRect) {
    viewport.calculateScissors(batch.getTransformMatrix(), localRect, scissorRect);
    Matrix4 transformMatrix;
    if (debugShapes != null && debugShapes.isDrawing())
      transformMatrix = debugShapes.getTransformMatrix();
    else
      transformMatrix = batch.getTransformMatrix();
    viewport.calculateScissors(transformMatrix, localRect, scissorRect);
View Full Code Here

    init();
  }

  private void init () {
    // create the isometric transform
    isoTransform = new Matrix4();
    isoTransform.idt();

    // isoTransform.translate(0, 32, 0);
    isoTransform.scale((float)(Math.sqrt(2.0) / 2.0), (float)(Math.sqrt(2.0) / 4.0), 1.0f);
    isoTransform.rotate(0.0f, 0.0f, 1.0f, -45);

    // ... and the inverse matrix
    invIsotransform = new Matrix4(isoTransform);
    invIsotransform.inv();
  }
View Full Code Here

    Vector2 d = new Vector2(vec.x - orig.x, -(vec.y - orig.y));
    return d.angle();
  }

  private Vector3 calculateDirection (float angle) {
    Matrix4 transform = new Matrix4();
    Vector3 dir = new Vector3(-1, 0, 1).nor();
    float rotAngle = (float)Math.toDegrees(Math.asin(Math.tan(Math.toRadians(angle))));
    transform.setToRotation(new Vector3(1, 0, 1).nor(), angle);
    dir.mul(transform).nor();
    return dir;
  }
View Full Code Here

  public void draw (SpriteBatch batch, float parentAlpha) {
    validate();

    NinePatch handle = style.handle;
    applyTransform(batch);
    Matrix4 transform = batch.getTransformMatrix();
    if (firstWidget != null) {
      ScissorStack.calculateScissors(stage.getCamera(), transform, firstWidgetBounds, firstScissors);
      if (ScissorStack.pushScissors(firstScissors)) {
        drawChild(firstWidget, batch, parentAlpha);
        ScissorStack.popScissors();
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.math.Matrix4

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.