Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.opengl.Matrix;

public class Main {
    private static void setPerspectiveM(float[] m, int offset, double fovy, double aspect, double zNear,
            double zFar) {
        Matrix.setIdentityM(m, offset);
        double ymax = zNear * Math.tan(fovy * Math.PI / 360.0);
        double ymin = -ymax;
        double xmin = ymin * aspect;
        double xmax = ymax * aspect;
        Matrix.frustumM(m, offset, (float) xmin, (float) xmax, (float) ymin, (float) ymax, (float) zNear,
                (float) zFar);
    }
}