CameraConverter

class CameraConverter(width: Int, height: Int)

Converts camera into OpenGL matrices used to render a 3D scene.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var camera: PinholeCamera?

Camera being converted.

Link copied to clipboard
var cameraCenter: Point3D?

Gets or sets camera center position.

Link copied to clipboard
var cameraIntrinsicParameters: PinholeCameraIntrinsicParameters?

Gets or sets camera intrinsic parameters.

Link copied to clipboard
var cameraRotation: Rotation3D?

Gets or sets camera rotation.

Link copied to clipboard

Far plane value. Any vertex further from the camera than this value is ignored and not drawn.

Link copied to clipboard
var height: Int

Height of the viewport expressed in pixels. Notice that OpenGL uses normalized coordinates between -1.0f and 1.0f, but this field contains the actual viewport height expressed in pixels.

Gets or sets flag indicating whether model view projection matrices must be computed when any value changes.

Link copied to clipboard

Gets or sets OpenGL model view matrix using current values.

Link copied to clipboard

Contains matrix defining full camera matrix to draw the scene as a 4x4 matrix following OpenGL format (which also encodes near and far planes.

Link copied to clipboard

Near plane value. Any vertex nearer to the camera than this value is ignored and not drawn.

Link copied to clipboard

Gets or sets orientation to compute a pinhole camera expressed in view coordinates. If orientation is unknown, view camera is not computed.

Link copied to clipboard

Gets or sets OpenGL projection matrix using current values.

Link copied to clipboard
var viewCamera: PinholeCamera?

Camera being converted expressed in Android view coordinates. This is only available or can only be set if orientation is defined (not unknown).

Link copied to clipboard
var viewCameraCenter: Point3D?

Gets or sets view camera center position.

Link copied to clipboard
var viewCameraIntrinsicParameters: PinholeCameraIntrinsicParameters?

Gets or sets view camera intrinsic parameters

Link copied to clipboard
var viewCameraRotation: Rotation3D?

Gets or sets view camera rotation.

Link copied to clipboard
var width: Int

Width of the viewport expressed in pixels. Notice that OpenGL uses normalized coordinates between -1.0f and 1.0f, but this field contains the actual viewport width expressed in pixels.

Functions

Link copied to clipboard
fun setNearFarPlanes(nearPlane: Float, farPlane: Float)

Sets near and far plane values. Any vertex nearer to the camera than the near plane, or any vertex further from the camera than the far plane is ignored and not drawn.

Link copied to clipboard
fun setValues(nearPlane: Float, farPlane: Float, width: Int, height: Int, camera: PinholeCamera)

Sets all required values to compute the scene camera matrix.

Link copied to clipboard
fun setViewportSize(width: Int, height: Int)

Sets size of viewport expressed in pixels. Notice that OpenGL uses normalized coordinates between -1.0f and 1.0f.