AndroidXRRuntimeImageLibrary

Constructs a RuntimeReferenceImageLibrary which stores reference images

for Marker Tracking and QR Code tracking 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 => _markerReferenceCount
int
The number of marker references in the library.
MarkerReferenceIndex => _markerReferenceIndex
int
The index of the first marker reference in the library, or -1 if no marker was added.
QRCodeReference => _qrCodeReference
XRReferenceImage
The QR CodeXRReferenceImage, or null if it's not found from the library.
QrCodeReferenceCount => _qrCodeReferenceCount
int
The number of QR Code references in the library.
QrCodeReferenceIndex => _qrCodeReferenceIndex
int
The index of the QR Code reference in the library, or -1 if no QR Code was added.
count => _qrCodeReferenceCount + _markerReferenceCount
override int

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 => _markerReferenceCount

The number of marker references in the library.

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

MarkerReferenceIndex

int MarkerReferenceIndex => _markerReferenceIndex

The index of the first marker reference in the library, or -1 if no marker was added.

QRCodeReference

XRReferenceImage QRCodeReference => _qrCodeReference

The QR CodeXRReferenceImage, or null if it's not found from the library.

QrCodeReferenceCount

int QrCodeReferenceCount => _qrCodeReferenceCount

The number of QR Code references in the library.

QrCodeReferenceIndex

int QrCodeReferenceIndex => _qrCodeReferenceIndex

The index of the QR Code reference in the library, or -1 if no QR Code was added.

count

override int count => _qrCodeReferenceCount + _markerReferenceCount

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 matches 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.