PixelSensor
NameSpace: PixelSensors
Public Fields
Status
public PixelSensorStatus Status { get; set; }
Type | Description |
---|---|
PixelSensorStatus | The status of a sensor |
StreamCount
public uint StreamCount { get; set; }
Public Methods
void ApplySensorConfig
public void ApplySensorConfig(
PixelSensorConfigData configData
)
Parameters
Type | Name | Description |
---|---|---|
PixelSensorConfigData | configData | Represents a configuration to be applied for a sensor |
void ClearAllAppliedConfigs
public void ClearAllAppliedConfigs()
void ClearAppliedConfig
public void ClearAppliedConfig(
PixelSensorCapabilityType capabilityType,
uint streamIndex
)
Parameters
Type | Name | Description |
---|---|---|
PixelSensorCapabilityType | capabilityType | The configurable capability types of a pixel sensor |
uint | streamIndex |
PixelSensorAsyncOperationResult ConfigureSensor
public PixelSensorAsyncOperationResult ConfigureSensor(
IEnumerable< uint > streams
)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable< uint > | streams |
bool CreatePixelSensor
public bool CreatePixelSensor()
bool DestroyPixelSensor
public bool DestroyPixelSensor()
bool EnumeratePixelSensorMetadata
public bool EnumeratePixelSensorMetadata(
uint streamIndex,
out PixelSensorMetaDataType [] metaDataTypes
)
Parameters
Type | Name | Description |
---|---|---|
uint | streamIndex | |
out PixelSensorMetaDataType [] | metaDataTypes | The metadata types that can be supported by a sensor |
void EnumerateSensorCapabilities
public void EnumerateSensorCapabilities(
uint streamIndex,
out PixelSensorCapability [] capabilities
)
Parameters
Type | Name | Description |
---|---|---|
uint | streamIndex | |
out PixelSensorCapability [] | capabilities | Represents the capability data's type |
bool GetAppliedConfigForCapability
public bool GetAppliedConfigForCapability(
uint streamIndex,
PixelSensorCapabilityType capabilityType,
out PixelSensorConfigData configData
)
Parameters
Type | Name | Description |
---|---|---|
uint | streamIndex | |
PixelSensorCapabilityType | capabilityType | The configurable capability types of a pixel sensor |
out PixelSensorConfigData | configData | Represents a configuration to be applied for a sensor |
unsafe bool GetSensorData
public unsafe bool GetSensorData(
uint streamIndex,
out XrPixelSensorFrame * sensorFrame,
out PixelSensorMetaData [] metaData,
Allocator allocator,
long timeout,
bool shouldFlipTexture
)
Parameters
Type | Name | Description |
---|---|---|
uint | streamIndex | |
out XrPixelSensorFrame * | sensorFrame | |
out PixelSensorMetaData [] | metaData | The base class for all metadata types. PixelSensors.MagicLeapPixelSensorFeature.GetSensorData will return an array of instances of the base class type Use the MetadataType to determine and cast to the corresponding metadata needed |
Allocator | allocator | |
long | timeout | |
bool | shouldFlipTexture |
Pose GetSensorPose
public Pose GetSensorPose(
Pose offset
)
Parameters
Type | Name | Description |
---|---|---|
Pose | offset |
uint GetStreamCount
public uint GetStreamCount()
bool IsMetaDataTypeSupported
public bool IsMetaDataTypeSupported(
PixelSensorMetaDataType metaDataType,
uint streamIndex
)
Parameters
Type | Name | Description |
---|---|---|
PixelSensorMetaDataType | metaDataType | The metadata types that can be supported by a sensor |
uint | streamIndex |
PixelSensor
public PixelSensor(
ulong path,
PixelSensorId sensorType,
PixelSensorNativeFunctions nativeFunctions,
MagicLeapPixelSensorFeature pixelSensorFeature
)
Parameters
Type | Name | Description |
---|---|---|
ulong | path | |
PixelSensorId | sensorType | A Pixel Sensor Identifier |
PixelSensorNativeFunctions | nativeFunctions | |
MagicLeapPixelSensorFeature | pixelSensorFeature | Enables the Magic Leap OpenXR Loader for Android, and modifies the AndroidManifest to be compatible with ML2. |
void PollSensorStatus
public void PollSensorStatus()
bool QuerySensorCapability
public bool QuerySensorCapability(
PixelSensorCapabilityType capabilityType,
uint streamIndex,
out PixelSensorCapabilityRange capabilityRange
)
Parameters
Type | Name | Description |
---|---|---|
PixelSensorCapabilityType | capabilityType | The configurable capability types of a pixel sensor |
uint | streamIndex | |
out PixelSensorCapabilityRange | capabilityRange | The capability range for a sensor capability |
PixelSensorAsyncOperationResult StartSensor
public PixelSensorAsyncOperationResult StartSensor(
IEnumerable< uint > streams,
Dictionary< uint, PixelSensorMetaDataType[]> metaDataTypes
)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable< uint > | streams | |
Dictionary< uint, PixelSensorMetaDataType[]> | metaDataTypes | The metadata types that can be supported by a sensor |
PixelSensorAsyncOperationResult StopSensor
public PixelSensorAsyncOperationResult StopSensor(
IEnumerable< uint > streams
)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable< uint > | streams |
Public Attributes
PixelSensorCapabilityRangeType
public PixelSensorCapabilityRangeType;
ShouldPoll
public bool ShouldPoll => activeOperations.Count > 0 || queuedOperations.Count > 0;