setProjection

actual fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)

Set the projection matrix from six frustum planes.

The near and far planes' positions in view space are z = -near and z = -far.

Parameters

projection

PERSPECTIVE or ORTHO

left

Distance from camera to left plane at near plane

right

Distance from camera to right plane at near plane

bottom

Distance from camera to bottom plane at near plane

top

Distance from camera to top plane at near plane

near

Distance from camera to near plane (> 0 for PERSPECTIVE, != far for ORTHO)

far

Distance from camera to far plane (> near for PERSPECTIVE, != near for ORTHO)


actual fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)

Set the projection matrix from field-of-view and aspect ratio.

Helper method to set a standard perspective or orthographic projection.

Parameters

fovInDegrees

Full field-of-view in degrees (0 < fov < 180)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

direction

Axis on which fovInDegrees is measured (VERTICAL or HORIZONTAL)

expect fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)

Set the projection matrix from six frustum planes.

The near and far planes' positions in view space are z = -near and z = -far.

Parameters

projection

PERSPECTIVE or ORTHO

left

Distance from camera to left plane at near plane

right

Distance from camera to right plane at near plane

bottom

Distance from camera to bottom plane at near plane

top

Distance from camera to top plane at near plane

near

Distance from camera to near plane (> 0 for PERSPECTIVE, != far for ORTHO)

far

Distance from camera to far plane (> near for PERSPECTIVE, != near for ORTHO)


expect fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)

Set the projection matrix from field-of-view and aspect ratio.

Helper method to set a standard perspective or orthographic projection.

Parameters

fovInDegrees

Full field-of-view in degrees (0 < fov < 180)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

direction

Axis on which fovInDegrees is measured (VERTICAL or HORIZONTAL)

actual fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)

Set the projection matrix from six frustum planes.

The near and far planes' positions in view space are z = -near and z = -far.

Parameters

projection

PERSPECTIVE or ORTHO

left

Distance from camera to left plane at near plane

right

Distance from camera to right plane at near plane

bottom

Distance from camera to bottom plane at near plane

top

Distance from camera to top plane at near plane

near

Distance from camera to near plane (> 0 for PERSPECTIVE, != far for ORTHO)

far

Distance from camera to far plane (> near for PERSPECTIVE, != near for ORTHO)


actual fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)

Set the projection matrix from field-of-view and aspect ratio.

Helper method to set a standard perspective or orthographic projection.

Parameters

fovInDegrees

Full field-of-view in degrees (0 < fov < 180)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

direction

Axis on which fovInDegrees is measured (VERTICAL or HORIZONTAL)

actual fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)

Set the projection matrix from six frustum planes.

The near and far planes' positions in view space are z = -near and z = -far.

Parameters

projection

PERSPECTIVE or ORTHO

left

Distance from camera to left plane at near plane

right

Distance from camera to right plane at near plane

bottom

Distance from camera to bottom plane at near plane

top

Distance from camera to top plane at near plane

near

Distance from camera to near plane (> 0 for PERSPECTIVE, != far for ORTHO)

far

Distance from camera to far plane (> near for PERSPECTIVE, != near for ORTHO)


actual fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)

Set the projection matrix from field-of-view and aspect ratio.

Helper method to set a standard perspective or orthographic projection.

Parameters

fovInDegrees

Full field-of-view in degrees (0 < fov < 180)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

direction

Axis on which fovInDegrees is measured (VERTICAL or HORIZONTAL)

actual fun setProjection(projection: Camera.Projection, left: Double, right: Double, bottom: Double, top: Double, near: Double, far: Double)

Set the projection matrix from six frustum planes.

The near and far planes' positions in view space are z = -near and z = -far.

Parameters

projection

PERSPECTIVE or ORTHO

left

Distance from camera to left plane at near plane

right

Distance from camera to right plane at near plane

bottom

Distance from camera to bottom plane at near plane

top

Distance from camera to top plane at near plane

near

Distance from camera to near plane (> 0 for PERSPECTIVE, != far for ORTHO)

far

Distance from camera to far plane (> near for PERSPECTIVE, != near for ORTHO)


actual fun setProjection(fovInDegrees: Double, aspect: Double, near: Double, far: Double, direction: Camera.Fov)

Set the projection matrix from field-of-view and aspect ratio.

Helper method to set a standard perspective or orthographic projection.

Parameters

fovInDegrees

Full field-of-view in degrees (0 < fov < 180)

aspect

Aspect ratio (width / height)

near

Distance to near plane (> 0)

far

Distance to far plane (> near)

direction

Axis on which fovInDegrees is measured (VERTICAL or HORIZONTAL)