toViewCoordinatesCamera

fun toViewCoordinatesCamera(context: Context, cameraId: String, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Parameters

context

Android context.

cameraId

A camera id.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(context: Context, characteristics: CameraCharacteristics, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Parameters

context

Android context.

characteristics

Information about the camera.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(orientation: CameraToDisplayOrientation, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Parameters

orientation

amount of rotation between display and camera sensor. CameraToDisplayOrientation.ORIENTATION_UNKNOWN indicates that orientation is unknown and must be ignored (Y coordinates are not reversed either).

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(rotation: Rotation2D?, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Parameters

rotation

counter-clockwise rotation indicating the amount of display rotation respect the camera sensor.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(context: Context, cameraId: String, pivot: Point2D, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Parameters

context

Android context.

cameraId

A camera id.

pivot

point to use as pivot for rotation.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(context: Context, characteristics: CameraCharacteristics, pivot: Point2D, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Parameters

context

Android context.

characteristics

Information about the camera.

pivot

point to use as pivot for rotation.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(orientation: CameraToDisplayOrientation, pivot: Point2D, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Parameters

orientation

amount of rotation between display and camera sensor. CameraToDisplayOrientation.ORIENTATION_UNKNOWN indicates that orientation is unknown and must be ignored (Y coordinates are not reversed either).

pivot

point to use as pivot for rotation.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(rotation: Rotation2D?, pivot: Point2D, input: PinholeCamera, result: PinholeCamera)

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Parameters

rotation

counter-clockwise rotation indicating the amount of display rotation respect the camera sensor.

pivot

point to use as pivot for rotation.

input

camera to be transformed.

result

instance where transformed camera will be stored.


fun toViewCoordinatesCamera(context: Context, cameraId: String, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Return

transformed camera.

Parameters

context

Android context.

cameraId

A camera id.

input

camera to be transformed.


fun toViewCoordinatesCamera(context: Context, characteristics: CameraCharacteristics, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Return

transformed camera.

Parameters

context

Android context.

characteristics

Information about the camera.

input

camera to be transformed.


fun toViewCoordinatesCamera(orientation: CameraToDisplayOrientation, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Return

transformed camera.

Parameters

orientation

amount of rotation between display and camera sensor. CameraToDisplayOrientation.ORIENTATION_UNKNOWN indicates that orientation is unknown and must be ignored (Y coordinates are not reversed either).

input

camera to be transformed.


fun toViewCoordinatesCamera(rotation: Rotation2D?, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Return

transformed camera.

Parameters

rotation

counter-clockwise rotation indicating the amount of display rotation respect the camera sensor.

input

camera to be transformed.


fun toViewCoordinatesCamera(context: Context, cameraId: String, pivot: Point2D, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Return

transformed camera.

Parameters

context

Android context.

cameraId

A camera id.

pivot

point to use as pivot for rotation.

input

camera to be transformed.


fun toViewCoordinatesCamera(context: Context, characteristics: CameraCharacteristics, pivot: Point2D, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

This method takes into account current display and camera orientation.

Return

transformed camera.

Parameters

context

Android context.

characteristics

Information about the camera.

pivot

point to use as pivot for rotation.

input

camera to be transformed.


fun toViewCoordinatesCamera(orientation: CameraToDisplayOrientation, pivot: Point2D, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Return

transformed camera.

Parameters

orientation

amount of rotation between display and camera sensor. CameraToDisplayOrientation.ORIENTATION_UNKNOWN indicates that orientation is unknown and must be ignored (Y coordinates are not reversed either).

pivot

point to use as pivot for rotation.

input

camera to be transformed.


fun toViewCoordinatesCamera(rotation: Rotation2D?, pivot: Point2D, input: PinholeCamera): PinholeCamera

Converts camera from OpenGL coordinates to Android view coordinates.

It must be noticed that OpenGL uses a right handed coordinate system where y coordinates increase upwards, whereas Android uses y coordinates that increase downwards and takes into account screen and camera sensor orientation.

Return

transformed camera.

Parameters

rotation

counter-clockwise rotation indicating the amount of display rotation respect the camera sensor.

pivot

point to use as pivot for rotation.

input

camera to be transformed.