Skip to main content

Auki::ConjureKit::Manna::Util

Utility class for screen and device-related operations.

Public Functions​

Name
voidSetConfigCameraOffsets(Dictionary< string, float[]> cameraOffsetsFromConfig)
Sets the camera offsets from a configuration dictionary.
floatGetScreenDPI()
Gets the screen DPI (dots per inch) of the current device's screen.
floatGetQRCodeSafeMarginInInches()
Gets the safe margin in inches for rendering QR codes on the screen.
Vector3GetCameraOffsetInMetersFromScreenTopRight()
Gets the camera offset in meters from the screen's top-right corner.
floatGetScreenWidthInMeters()
Gets the screen width in meters based on screen resolution.
floatGetScreenHeightInMeters()
Gets the screen height in meters based on screen resolution.
Vector3GetScreenTopRightInMetersFromScreenTopLeft()
Gets the position in meters from the screen's top-left corner to the top-right corner.
Vector3GetCameraOffsetInMetersFromScreenTopLeft()
Gets the camera offset in meters from the screen's top-left corner.

Public Attributes​

Name
const floatInchesPerMeter
The number of inches in a meter.
const floatMetersPerInch
The number of meters in an inch.

Public Functions Documentation​

function SetConfigCameraOffsets​

static void SetConfigCameraOffsets(
Dictionary< string, float[]> cameraOffsetsFromConfig
)

Sets the camera offsets from a configuration dictionary.

Parameters:

  • cameraOffsetsFromConfig A dictionary containing camera offsets for different device models.

function GetScreenDPI​

static float GetScreenDPI()

Gets the screen DPI (dots per inch) of the current device's screen.

Return: The screen DPI value.

function GetQRCodeSafeMarginInInches​

static float GetQRCodeSafeMarginInInches()

Gets the safe margin in inches for rendering QR codes on the screen.

Return: The safe margin in inches.

function GetCameraOffsetInMetersFromScreenTopRight​

static Vector3 GetCameraOffsetInMetersFromScreenTopRight()

Gets the camera offset in meters from the screen's top-right corner.

Return: The camera offset in meters.

function GetScreenWidthInMeters​

static float GetScreenWidthInMeters()

Gets the screen width in meters based on screen resolution.

Return: The screen width in meters.

function GetScreenHeightInMeters​

static float GetScreenHeightInMeters()

Gets the screen height in meters based on screen resolution.

Return: The screen height in meters.

function GetScreenTopRightInMetersFromScreenTopLeft​

static Vector3 GetScreenTopRightInMetersFromScreenTopLeft()

Gets the position in meters from the screen's top-left corner to the top-right corner.

Return: The position vector in meters.

function GetCameraOffsetInMetersFromScreenTopLeft​

static Vector3 GetCameraOffsetInMetersFromScreenTopLeft()

Gets the camera offset in meters from the screen's top-left corner.

Return: The camera offset in meters.

Public Attributes Documentation​

variable InchesPerMeter​

static const float InchesPerMeter = 39.3700787f;

The number of inches in a meter.

variable MetersPerInch​

static const float MetersPerInch = 1 / InchesPerMeter;

The number of meters in an inch.