Skip to main content
Version: 14 Oct 2024

MagicLeapMeshingFeature

NameSpace: Meshing

Enables the Magic Leap OpenXR Loader for Android, and modifies the AndroidManifest to be compatible with ML2.

Inherits from:
MagicLeapOpenXRFeatureBase,
OpenXRFeature

Public Fields

MeshBoundsOrigin

The origin of the meshing volume bounds


public Vector3 MeshBoundsOrigin { get; set; }


MeshBoundsRotation

The rotation of the meshing bounds volume


public Quaternion MeshBoundsRotation { get; set; }


MeshBoundsScale

The scale of the meshing bounds volume


public Vector3 MeshBoundsScale { get; set; }


MeshDensity

The density of the meshes generated


public float MeshDensity { get; set; }


MeshRenderMode

The render mode of the generated mesh.


public MeshingMode MeshRenderMode { get; set; }


Public Methods

MeshId CreateMeshId

public MeshId CreateMeshId(
string meshIdStr
)

Parameters

TypeNameDescription
stringmeshIdStr

bool GetMeshData

public bool GetMeshData(
in TrackableId meshId,
out Vector3 [] positions,
out Vector3 [] normals,
out float [] confidence
)

Parameters

TypeNameDescription
in TrackableIdmeshId
out Vector3 []positions
out Vector3 []normals
out float []confidence

bool GetMeshData

public bool GetMeshData(
in MeshId meshId,
out Vector3 [] positions,
out Vector3 [] normals,
out float [] confidence
)

Parameters

TypeNameDescription
in MeshIdmeshId
out Vector3 []positions
out Vector3 []normals
out float []confidence

void GetMeshIds

public void GetMeshIds(
out TrackableId [] trackableIds
)

Parameters

TypeNameDescription
out TrackableId []trackableIds

void GetMeshIds

public void GetMeshIds(
out MeshId [] meshIds
)

Parameters

TypeNameDescription
out MeshId []meshIds

void InvalidateMeshes

public void InvalidateMeshes()

void SetMeshQueryBounds

public void SetMeshQueryBounds(
Vector3 position,
Vector3 scale,
Quaternion rotation
)

Parameters

TypeNameDescription
Vector3position
Vector3scale
Quaternionrotation

void UpdateMeshQuerySettings

Update the query settings for the mesh generation

public void UpdateMeshQuerySettings(
in MeshingQuerySettings settings
)

Parameters

TypeNameDescription
in MeshingQuerySettingssettings

Protected Methods

HookGetInstanceProcAddr

protected override IntPtr HookGetInstanceProcAddr(
IntPtr func
)

Parameters

TypeNameDescription
IntPtrfunc

OnAppSpaceChange

protected override void OnAppSpaceChange(
ulong xrSpace
)

Parameters

TypeNameDescription
ulongxrSpace

OnInstanceCreate

protected override bool OnInstanceCreate(
ulong xrInstance
)

Parameters

TypeNameDescription
ulongxrInstance

OnInstanceDestroy

protected override void OnInstanceDestroy(
ulong xrInstance
)

Parameters

TypeNameDescription
ulongxrInstance

OnSessionCreate

protected override void OnSessionCreate(
ulong xrSession
)

Parameters

TypeNameDescription
ulongxrSession

OnSubsystemCreate

protected override void OnSubsystemCreate()

OnSubsystemDestroy

protected override void OnSubsystemDestroy()

OnSubsystemStart

protected override void OnSubsystemStart()

OnSubsystemStop

protected override void OnSubsystemStop()

Public Attributes

FeatureId


public const string FeatureId = "com.magicleap.openxr.feature.ml2_mesh_detection";


Protected Attributes

UsesExperimentalExtensions


protected override bool UsesExperimentalExtensions => true;