Back to Filament

setLensProjection

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

1.75.01.4 KB
Original Source

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

setLensProjection

[main]
open fun setLensProjection(focalLength: Double, aspect: Double, near: Double, far: Double)

Sets the projection matrix from the focal length.

Parameters

main

focalLengthlens's focal length in millimeters. focalLength>0
aspectaspect ratio width/height. aspect>0
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.