AndroidXRRuntimeImageLibrary

Constructs a RuntimeReferenceImageLibrary which stores reference images for QR Code trackng at Android XR devices.

Summary

Inheritance

Inherits from: RuntimeReferenceImageLibrary

Constructors and Destructors

AndroidXRRuntimeImageLibrary(XRReferenceImageLibrary library)
Constructs a AndroidXRRuntimeImageLibrary from a given XRReferenceImageLibrary

Public attributes

MarkerReferenceCount => _markerCount
int
Gets the count of marker reference images.
MarkerReferenceIndex => _markerIndex
int
Gets the index of the first marker reference image.
QrCodeReferenceIndex => _qrCodeIndex
int
Gets the index of QR Code reference image.
count => _images.Count
override int

Properties

QRCodeReference
XRReferenceImage
Gets QR Code reference image, or null if it's not found from the library.

Public static functions

IsMarkerReference(XRReferenceImage image)
bool
Determine if the given reference image is a marker reference.
IsQrCodeReference(XRReferenceImage image)
bool
Determine if the given reference image is a QR code reference.
ValidateMarker(IReferenceImageLibrary imageLibrary)
void
Validate marker configuration with a given XRReferenceImageLibrary.
ValidateQrCode(IReferenceImageLibrary imageLibrary)
void
Validate QR code configuration with a given XRReferenceImageLibrary.

Public attributes

MarkerReferenceCount

int MarkerReferenceCount => _markerCount

Gets the count of marker reference images.

It can be used to iterate all marker reference images starting from MarkerReferenceIndex.

MarkerReferenceIndex

int MarkerReferenceIndex => _markerIndex

Gets the index of the first marker reference image.

Or return -1 if it doesn't exist.

QrCodeReferenceIndex

int QrCodeReferenceIndex => _qrCodeIndex

Gets the index of QR Code reference image.

Or return -1 if it doesn't exist.

count

override int count => _images.Count

Properties

QRCodeReference

XRReferenceImage QRCodeReference

Gets QR Code reference image, or null if it's not found from the library.

Public functions

AndroidXRRuntimeImageLibrary

 AndroidXRRuntimeImageLibrary(
  XRReferenceImageLibrary library
)

Constructs a AndroidXRRuntimeImageLibrary from a given XRReferenceImageLibrary

Details
Parameters
library
The XRReferenceImageLibrary to collect images from.

Public static functions

IsMarkerReference

bool IsMarkerReference(
  XRReferenceImage image
)

Determine if the given reference image is a marker reference.

Details
Parameters
image
The reference image with marker name or generated from XRMarkerDatabase.
Returns
true, if it's a valid marker reference.

IsQrCodeReference

bool IsQrCodeReference(
  XRReferenceImage image
)

Determine if the given reference image is a QR code reference.

Details
Parameters
image
The reference image with QR code name.
Returns
true, if it's a valid QR code reference.

ValidateMarker

void ValidateMarker(
  IReferenceImageLibrary imageLibrary
)

Validate marker configuration with a given XRReferenceImageLibrary.

It may be updated through XRMarkerDatabase or manually added marker references where the XRReferenceImage.name matchs format "{}-{markId}".

Details
Parameters
imageLibrary

ValidateQrCode

void ValidateQrCode(
  IReferenceImageLibrary imageLibrary
)

Validate QR code configuration with a given XRReferenceImageLibrary.

Note: only one reference is needed for QR code tracking, where the XRReferenceImage.name starts with QRCode, case insensitive.

Details
Parameters
imageLibrary
The XRReferenceImageLibrary with QR code reference in it.