Examples of Matrix4


Examples of cofh.repack.codechicken.lib.vec.Matrix4

    i++;
  }

  public static Matrix4 getRenderMatrix(Vector3 position, Rotation rotation, double scale) {

    return new Matrix4().translate(position).apply(new Scale(scale)).apply(rotation);
  }
View Full Code Here

Examples of com.ardor3d.math.Matrix4

        }

        // init palette
        _matrixPalette = new Matrix4[jointCount];
        for (int i = 0; i < jointCount; i++) {
            _matrixPalette[i] = new Matrix4();
        }

        // start off in bind pose.
        setToBindPose();
    }
View Full Code Here

Examples of com.badlogic.gdx.math.Matrix4

    if (child.visible) child.draw(batch, parentAlpha * color.a);
    if (transform) batch.flush();
  }

  protected void applyTransform (SpriteBatch batch) {
    Matrix4 newBatchTransform = updateTransform();
    batch.end();
    oldBatchTransform.set(batch.getTransformMatrix());
    batch.setTransformMatrix(newBatchTransform);
    batch.begin();
  }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Matrix4

               throw new IllegalArgumentException("Non-finite in CoordinateFrame constructor");
       }

       public CoordinateFrame(Vector3 origin, Quaternion rotation)
       {
           Matrix4 m = Matrix4.createFromQuaternion(rotation);

           this.origin = origin;
           xAxis = m.getAtAxis();
           yAxis = m.getLeftAxis();
           zAxis = m.getUpAxis();

           if (!IsFinite())
               throw new IllegalArgumentException("Non-finite in CoordinateFrame constructor");
       }
View Full Code Here

Examples of jinngine.math.Matrix4

    gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, proj, 0);
  }
 
 
  private Matrix4 getCameraMatrix() {
    return new Matrix4(camera);
  }
View Full Code Here

Examples of jinngine.math.Matrix4

  private Matrix4 getCameraMatrix() {
    return new Matrix4(camera);
  }

  private Matrix4 getProjectionMatrix() {   
    return new Matrix4(proj);
  }
View Full Code Here

Examples of jinngine.math.Matrix4

    // clipping planes
    Vector3 near = new Vector3(2*x/(double)width-1,-2*(y-((height-drawHeight)*0.5))/(double)drawHeight+1, 0.7);
    Vector3 far = new Vector3(2*x/(double)width-1,-2*(y-((height-drawHeight)*0.5))/(double)drawHeight+1, 0.9);

    //inverse transform
    Matrix4 T = getProjectionMatrix().multiply(getCameraMatrix()).inverse();
 
    Vector3 p1 = new Vector3();
    Vector3 p2 = new Vector3();
   
    Matrix4.multiply(T,near,p1);
View Full Code Here

Examples of jinngine.math.Matrix4

  }

   
  @Override
  public Matrix4 getTransform() {
    return Matrix4.multiply(body.getTransform(), localtransform4, new Matrix4());
  }
View Full Code Here

Examples of jinngine.math.Matrix4

        assertMatrixEquals(ref, val, 0.);
    }

    @Test
    public void testCtorZero() {
        final Matrix4 m = new Matrix4();
        assertMatrixEquals(new double[]{
                    0., 0., 0., 0.,
                    0., 0., 0., 0.,
                    0., 0., 0., 0.,
                    0., 0., 0., 0.,}, m);
View Full Code Here

Examples of jinngine.math.Matrix4

                    0., 0., 0., 0.,}, m);
    }

    @Test
    public void testAssignZero() {
        final Matrix4 m = new Matrix4(
                1., 2., 3., 4.,
                5., 6., 7., 8.,
                9., 10, 11, 12,
                13, 14, 15, 16);
        final Matrix4 r = m.assignZero();
        assertSame(r, m);//assert it return this
        //assert every value is 0.
        assertMatrixEquals(new double[]{
                    0., 0., 0., 0.,
                    0., 0., 0., 0.,
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.