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
Type | Name | Description |
---|---|---|
string | meshIdStr |
bool GetMeshData
public bool GetMeshData(
in TrackableId meshId,
out Vector3 [] positions,
out Vector3 [] normals,
out float [] confidence
)
Parameters
Type | Name | Description |
---|---|---|
in TrackableId | meshId | |
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
Type | Name | Description |
---|---|---|
in MeshId | meshId | |
out Vector3 [] | positions | |
out Vector3 [] | normals | |
out float [] | confidence |
void GetMeshIds
public void GetMeshIds(
out TrackableId [] trackableIds
)
Parameters
Type | Name | Description |
---|---|---|
out TrackableId [] | trackableIds |
void GetMeshIds
public void GetMeshIds(
out MeshId [] meshIds
)
Parameters
Type | Name | Description |
---|---|---|
out MeshId [] | meshIds |
void InvalidateMeshes
public void InvalidateMeshes()
void SetMeshQueryBounds
public void SetMeshQueryBounds(
Vector3 position,
Vector3 scale,
Quaternion rotation
)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | |
Vector3 | scale | |
Quaternion | rotation |
void UpdateMeshQuerySettings
Update the query settings for the mesh generation
public void UpdateMeshQuerySettings(
in MeshingQuerySettings settings
)
Parameters
Type | Name | Description |
---|---|---|
in MeshingQuerySettings | settings |
Protected Methods
HookGetInstanceProcAddr
protected override IntPtr HookGetInstanceProcAddr(
IntPtr func
)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | func |
OnAppSpaceChange
protected override void OnAppSpaceChange(
ulong xrSpace
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSpace |
OnInstanceCreate
protected override bool OnInstanceCreate(
ulong xrInstance
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance |
OnInstanceDestroy
protected override void OnInstanceDestroy(
ulong xrInstance
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance |
OnSessionCreate
protected override void OnSessionCreate(
ulong xrSession
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
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;