Java Code Examples for org.joml.Matrix4f#setPerspective()

The following examples show how to use org.joml.Matrix4f#setPerspective() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Window.java    From lwjglbook with Apache License 2.0 4 votes vote down vote up
public static Matrix4f updateProjectionMatrix(Matrix4f matrix, int width, int height) {
    float aspectRatio = (float) width / (float) height;
    return matrix.setPerspective(FOV, aspectRatio, Z_NEAR, Z_FAR);
}
 
Example 2
Source File: Window.java    From lwjglbook with Apache License 2.0 4 votes vote down vote up
public static Matrix4f updateProjectionMatrix(Matrix4f matrix, int width, int height) {
    float aspectRatio = (float) width / (float) height;
    return matrix.setPerspective(FOV, aspectRatio, Z_NEAR, Z_FAR);
}
 
Example 3
Source File: Window.java    From lwjglbook with Apache License 2.0 4 votes vote down vote up
public static Matrix4f updateProjectionMatrix(Matrix4f matrix, int width, int height) {
    float aspectRatio = (float) width / (float) height;
    return matrix.setPerspective(FOV, aspectRatio, Z_NEAR, Z_FAR);
}
 
Example 4
Source File: Window.java    From lwjglbook with Apache License 2.0 4 votes vote down vote up
public static Matrix4f updateProjectionMatrix(Matrix4f matrix, int width, int height) {
    float aspectRatio = (float) width / (float) height;
    return matrix.setPerspective(FOV, aspectRatio, Z_NEAR, Z_FAR);
}