Back to Filament

setCustomProjection

docs/android/dokka/filament-android/com.google.android.filament/-camera/set-custom-projection.md

1.75.03.0 KB
Original Source

//filament-android/com.google.android.filament/Camera/setCustomProjection

setCustomProjection

[main]
open fun setCustomProjection(inProjection: Array<Double>, near: Double, far: Double)

Sets a custom projection matrix.

The projection matrix must define an NDC system that must match the OpenGL convention, that is all 3 axis are mapped to [-1, 1].

Parameters

main

inProjectioncustom projection matrix for rendering and culling
neardistance in world units from the camera to the near plane. The near plane's position in view space is z = -near. Precondition: near>0 for PERSPECTIVE or near != far for ORTHO.
fardistance in world units from the camera to the far plane. The far plane's position in view space is z = -far. Precondition: far>nearfor PERSPECTIVE or far != nearfor ORTHO.

[main]
open fun setCustomProjection(inProjection: Array<Double>, inProjectionForCulling: Array<Double>, near: Double, far: Double)

Sets a custom projection matrix.

The projection matrices must define an NDC system that must match the OpenGL convention, that is all 3 axis are mapped to [-1, 1].

Parameters

main

inProjectioncustom projection matrix for rendering.
inProjectionForCullingcustom projection matrix for culling.
neardistance in world units from the camera to the near plane. The near plane's position in view space is z = -near. Precondition: near>0 for PERSPECTIVE or near != far for ORTHO.
fardistance in world units from the camera to the far plane. The far plane's position in view space is z = -far. Precondition: far>nearfor PERSPECTIVE or far != nearfor ORTHO.