How does the parameters work for it and exactly what is mProjMatrix getting from the method?
Also why is 'float mProjMatrix = new float[16];` declared with 16, could I have used another number instead?
float mProjMatrix = new float[16];
Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
View frustum is just a visual representation of perspective projection that is used to convert 3D point in the world coordinate space to the 2D point on the screen.
There're multiple ways to define the projection matrix (at least that I used personally):
By specifying 6 clip planes
By specifying aspect ratio, far and near clipping planes, field of view angle
But in the end they all end up as a single 4x4 perspective transform matrix.
Here is a must read article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With