XRMarkerDatabaseEntry

Represents an entry in an XRMarkerDatabase with the specialized information that can be converted into a marker XRReferenceImage, then used at ARTrackedImageManager.referenceLibrary for runtime configuration.

Summary

Inheritance

Inherits from: IEquatable< XRMarkerDatabaseEntry >, IComparable< XRMarkerDatabaseEntry >

Constructors and Destructors

XRMarkerDatabaseEntry(XRMarkerDictionary dictionary)
Constructs a XRMarkerDatabaseEntry which represents all markers from a given XRMarkerDictionary.
XRMarkerDatabaseEntry(XRMarkerDictionary dictionary, bool allMarkers, uint markerId, float physicalEdge)
Constructs a XRMarkerDatabaseEntry which contains the specialized information for the conversion with a marker XRReferenceImage.

Public attributes

AllMarkers => _allMarkers
bool
Gets a bool indicating whether this entry reprents all markers from Dictionary.
Dictionary => _dictionary
Gets the XRMarkerDictionary in which this entry belongs to.
MarkerId => _markerId
uint
Gets the marker Id.
Name => _allMarkers ? _dictionary.ToString() : $"{_dictionary}-{MarkerId}"
string
Convert to the name of a XRReferenceImage which represents a marker reference of XRMarkerDatabaseEntry.
PhysicalEdge => _physcialEdge
float
Gets the physical edege in meter.

Public functions

CompareTo(XRMarkerDatabaseEntry other)
int
Equals(object obj)
override bool
Equals(XRMarkerDatabaseEntry other)
bool
Tests for equality.
GetHashCode()
override int
ToString()
override string

Public static functions

TryParse(string name, out XRMarkerDatabaseEntry entry)
bool
Converts the string representation of a marker reference to an equivalent XRMarkerDatabaseEntry object.
TryParse(string name, float edge, out XRMarkerDatabaseEntry entry)
bool
Converts the string representation of a marker reference to an equivalent XRMarkerDatabaseEntry object.

Public attributes

AllMarkers

bool Google::XR::Extensions::XRMarkerDatabaseEntry::AllMarkers => _allMarkers

Gets a bool indicating whether this entry reprents all markers from Dictionary.

Dictionary

XRMarkerDictionary Google::XR::Extensions::XRMarkerDatabaseEntry::Dictionary => _dictionary

Gets the XRMarkerDictionary in which this entry belongs to.

MarkerId

uint Google::XR::Extensions::XRMarkerDatabaseEntry::MarkerId => _markerId

Gets the marker Id.

Note: It only takes effect when AllMarkers is not set.

Name

string Google::XR::Extensions::XRMarkerDatabaseEntry::Name => _allMarkers ? _dictionary.ToString() : $"{_dictionary}-{MarkerId}"

Convert to the name of a XRReferenceImage which represents a marker reference of XRMarkerDatabaseEntry.

PhysicalEdge

float Google::XR::Extensions::XRMarkerDatabaseEntry::PhysicalEdge => _physcialEdge

Gets the physical edege in meter.

Note: it only takes effect when AllMarkers is not set.

Public functions

CompareTo

int Google::XR::Extensions::XRMarkerDatabaseEntry::CompareTo(
  XRMarkerDatabaseEntry other
)

Equals

override bool Google::XR::Extensions::XRMarkerDatabaseEntry::Equals(
  object obj
)

Equals

bool Google::XR::Extensions::XRMarkerDatabaseEntry::Equals(
  XRMarkerDatabaseEntry other
)

Tests for equality.

Details
Parameters
other
The other XRMarkerDatabaseEntry to compare against.
Returns
true if the entries are equal.

GetHashCode

override int Google::XR::Extensions::XRMarkerDatabaseEntry::GetHashCode()

ToString

override string Google::XR::Extensions::XRMarkerDatabaseEntry::ToString()

XRMarkerDatabaseEntry

 Google::XR::Extensions::XRMarkerDatabaseEntry::XRMarkerDatabaseEntry(
  XRMarkerDictionary dictionary
)

Constructs a XRMarkerDatabaseEntry which represents all markers from a given XRMarkerDictionary.

It can be converted to a marker XRReferenceImage and used by ARTrackedImageManager.referenceLibrary for runtime configuration.

Details
Parameters
dictionary
A predefined XRMarkerDictionary in which this entry belongs to.

XRMarkerDatabaseEntry

 Google::XR::Extensions::XRMarkerDatabaseEntry::XRMarkerDatabaseEntry(
  XRMarkerDictionary dictionary,
  bool allMarkers,
  uint markerId,
  float physicalEdge
)

Constructs a XRMarkerDatabaseEntry which contains the specialized information for the conversion with a marker XRReferenceImage.

Details
Parameters
dictionary
A predefined XRMarkerDictionary in which this entry belongs to.
allMarkers
A bool indicating whether to track all markers from the dictionary .
markerId
When allMarkers is not set, specify the marker id from the dictionary .
physicalEdge
When allMarkers is not set, specify the physical Edge (meters).

Public static functions

TryParse

bool Google::XR::Extensions::XRMarkerDatabaseEntry::TryParse(
  string name,
  out XRMarkerDatabaseEntry entry
)

Converts the string representation of a marker reference to an equivalent XRMarkerDatabaseEntry object.

Details
Parameters
name
The name of the marker reference to use for parsing.
entry
When this method returns true, contains an XRMarkerDatabaseEntry object that represents the parsed value.
Returns
Returns true if the conversion succeeded; false otherwise.

TryParse

bool Google::XR::Extensions::XRMarkerDatabaseEntry::TryParse(
  string name,
  float edge,
  out XRMarkerDatabaseEntry entry
)

Converts the string representation of a marker reference to an equivalent XRMarkerDatabaseEntry object.

edge The physical edge in meters of the output.

Details
Parameters
name
The name of the marker reference to use for parsing.

Details
Parameters
entry
When this method returns true, contains an XRMarkerDatabaseEntry object that represents the parsed value.
Returns
Returns true if the conversion succeeded; false otherwise.