MagicLeapMeshingFeature
NameSpace: MagicLeapSupport
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
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 |
void GetMeshIds
public void GetMeshIds(
out TrackableId [] trackableIds
)
Parameters
Type | Name | Description |
---|---|---|
out TrackableId [] | trackableIds |
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
GetFeatureId
protected virtual override string GetFeatureId()
Reimplements: GetFeatureId
OnInstanceCreate
protected override bool OnInstanceCreate(
ulong xrInstance
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance |
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";
Public Enums
MeshDetectorFlags
The flags to represent the generated mesh's properties
Enumerator | Value | Description |
---|---|---|
ComputeNormals | 1 << 1 | Whether to compute the normals of the mesh |
ComputeConfidence | 1 << 2 | Whether to compute the confidence data for the mesh |
Planarize | 1 << 3 | Whether to planarize the generated mesh |
MeshSkirt | 1 << 4 | When enabled, the mesh skirt (overlapping area between two mesh blocks) will be removed. This field is only valid when the mesh is not a point cloud. |
MeshingMode
Enumerator | Value | Description |
---|---|---|
Triangles | ||
PointCloud |