API reference

Utilities Class

Provides utility functions for various operations within the MR Utility Kit.

Public Statics

static readonly float Sqrt2[Get]
static readonly float InvSqrt2[Get]

Static Member Functions

Retrieves the bounds of a prefab, calculating them if not already cached.
Parameters
prefab
The prefab GameObject to calculate bounds for.
Returns
The bounds of the prefab, or null if no Renderer is found.
Gets the name of an anchor based on its semantic classification.
Parameters
anchorData
The Data.AnchorData object representing the anchor.
Returns
The name of the anchor, or "UNDEFINED_ANCHOR" if no semantic classification is available.
Compares two lists for equality, checking if they contain the same elements in the same order.
This method replaces the LINQ dependency.
Others
T
The type of elements in the lists.
Parameters
list1
The first list to compare.
list2
The second list to compare.
Returns
True if the lists are equal, false otherwise.
Checks if a given position is inside a polygon defined by a list of vertices.
Parameters
position
The position to check.
polygon
The list of vertices defining the polygon.
Returns
True if the position is inside the polygon, false otherwise.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon