MagicLeapFeature
NameSpace: Features
Enables the Magic Leap OpenXR Loader for Android, and modifies the AndroidManifest to be compatible with ML2.
Inherits from:
MagicLeapOpenXRFeatureWithInterception< Features.MagicLeapFeature >,
MagicLeapOpenXRFeatureBase,
OpenXRFeature
Public Fields
EnablePerceptionSnapshots
public bool EnablePerceptionSnapshots { get; set; }
Public Methods
void ApplyNearClip
public void ApplyNearClip(
ref float zNear
)
Parameters
Type | Name | Description |
---|---|---|
ref float | zNear |
void ApplyToCamera
public void ApplyToCamera(
Camera camera,
bool warnIfNearClipChanged =true
)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | |
bool | warnIfNearClipChanged |
long ConvertSystemTimeToXrTime
public long ConvertSystemTimeToXrTime(
long systemTime
)
Parameters
Type | Name | Description |
---|---|---|
long | systemTime |
long ConvertXrTimeToSystemTime
public long ConvertXrTimeToSystemTime(
long xrTime
)
Parameters
Type | Name | Description |
---|---|---|
long | xrTime |
void SetNearClipPolicy
public void SetNearClipPolicy(
NearClipMode mode
)
Parameters
Type | Name | Description |
---|---|---|
NearClipMode | mode |
Protected Methods
HookGetInstanceProcAddr
protected override IntPtr HookGetInstanceProcAddr(
IntPtr func
)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | func |
MarkFunctionsToIntercept
protected virtual override void MarkFunctionsToIntercept()
Reimplements: MarkFunctionsToIntercept
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 |
OnSessionBegin
protected override void OnSessionBegin(
ulong xrSession
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
OnSessionCreate
protected override void OnSessionCreate(
ulong xrSession
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
OnSessionDestroy
protected override void OnSessionDestroy(
ulong xrSession
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
OnSessionEnd
protected override void OnSessionEnd(
ulong xrSession
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
OnSessionStateChange
protected override void OnSessionStateChange(
int oldState,
int newState
)
Parameters
Type | Name | Description |
---|---|---|
int | oldState | |
int | newState |
OnSubsystemCreate
protected override void OnSubsystemCreate()
OnSubsystemDestroy
protected override void OnSubsystemDestroy()
Public Attributes
FarClipPolicy
public FarClipMode FarClipPolicy => farClipPolicy;
FeatureId
The feature id string. This is used to give the feature a well known id for reference.
public const string FeatureId = "com.magicleap.openxr.feature.ml2";
MaxFarZ
public float MaxFarZ => viewConfigurationDepthRange.MaxFarZ;
MinNearZ
public float MinNearZ => viewConfigurationDepthRange.MinNearZ;
NearClipPolicy
public NearClipMode NearClipPolicy => nearClipPolicy;
RecommendedFarZ
public float RecommendedFarZ => viewConfigurationDepthRange.RecommendedFarZ;
RecommendedNearZ
public float RecommendedNearZ => viewConfigurationDepthRange.RecommendedNearZ;
Public Enums
FarClipMode
Enumerator | Value | Description |
---|---|---|
None | Do not restrict the Camera's far clip plane distance. | |
Maximum | Restrict the Camera's far clip plane distance to no more than the maximum allowed by the device. | |
Recommended | Restrict the Camera's far clip plane to no more than the distance recommended by Magic Leap. |
NearClipMode
Enumerator | Value | Description |
---|---|---|
Minimum | Restrict the Camera's near clip plane to no less than the absolute minimum allowed (25cm). | |
Recommended | Restrict the Camera's near clip plane to no less than the distance configured in the system's settings. |