docs/android/dokka/filament-android/com.google.android.filament/-camera/set-projection.md
//filament-android/com.google.android.filament/Camera/setProjection
[main]
open fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)
Sets the projection matrix from a frustum defined by six planes.
main
| projection | type of projection to use |
| left | distance in world units from the camera to the left plane, at the near plane. Precondition: left != right |
| right | distance in world units from the camera to the right plane, at the near plane. Precondition: left != right |
| bottom | distance in world units from the camera to the bottom plane, at the near plane. Precondition: bottom != top |
| top | distance in world units from the camera to the top plane, at the near plane. Precondition: bottom != top |
| near | distance 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. |
| far | distance 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. |
| These parameters are silently modified to meet the preconditions above. |
| Camera.Projection |
[main]
open fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)
Sets the projection matrix from the field-of-view.
main
| fovInDegrees | full field-of-view in degrees. 0 <fovInDegrees<180 |
| aspect | aspect ratio width/height. aspect>0 |
| near | distance 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. |
| far | distance 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. |
| direction | direction of the field-of-view parameter. |
| These parameters are silently modified to meet the preconditions above. |
| Camera.Fov |