docs/android/dokka/filament-android/com.google.android.filament/-camera/set-scaling.md
//filament-android/com.google.android.filament/Camera/setScaling
[main]
open fun setScaling(xscaling: Double, yscaling: Double)
Sets an additional matrix that scales the projection matrix.
This is useful to adjust the aspect ratio of the camera independent from its projection. First, pass an aspect of 1.0 to setProjection. Then set the scaling with the desired aspect ratio:` double aspect = width / height;
// with Fov.HORIZONTAL passed to setProjection:
camera.setScaling(1.0, aspect);
// with Fov.VERTICAL passed to setProjection:
camera.setScaling(1.0 / aspect, 1.0);
` By default, this is an identity matrix.
main
| xscaling | horizontal scaling to be applied after the projection matrix. |
| yscaling | vertical scaling to be applied after the projection matrix. |
| com.google.android.filament.Camera |
[main]
open fun setScaling(inScaling: Array<Double>)
Sets an additional matrix that scales the projection matrix.
This is useful to adjust the aspect ratio of the camera independent from its projection. First, pass an aspect of 1.0 to setProjection. Then set the scaling with the desired aspect ratio:` double aspect = width / height;
// with Fov.HORIZONTAL passed to setProjection:
double[] s = {1.0, aspect, 1.0, 1.0};
camera.setScaling(s);
// with Fov.VERTICAL passed to setProjection:
double[] s = {1.0 / aspect, 1.0, 1.0, 1.0};
camera.setScaling(s);
` By default, this is an identity matrix.
use setScaling
main
| inScaling | diagonal of the scaling matrix to be applied after the projection matrix. |
| com.google.android.filament.Camera |