STRUCT
ArdkInputDataFlags
public struct ArdkInputDataFlags: OptionSet, CustomStringConvertible, @unchecked Sendable
Flags indicating which types of input data are required by ARDK.
ArdkInputDataFlags is an option set that specifies which data types
should be included in frames sent to ARDK. Use getRequestedDataInputs()
to determine which data is currently needed, then include only the
requested data types in your frame data for optimal performance.
Overview
ARDK features dynamically request different types of input data based on:
- Which features are active (VPS, WPS, scanning, mapping)
- Current processing state and requirements
- Device capabilities and available sensors
Example Usage
let requiredInputs = ardkSession.getRequestedDataInputs()
var frameData = ArdkFrameData()
if requiredInputs.contains(.pose) {
frameData.cameraTransform = currentPose
}
if requiredInputs.contains(.cameraImage) {
frameData.cameraPlane0 = cameraPlane
}
if requiredInputs.contains(.platformDepth) {
frameData.depthData = depthBuffer
}
ardkSession.sendFrame(frameData)
Properties
rawValue
public let rawValue: UInt32
The raw value representing the input data flags.
none
public static let none = ArdkInputDataFlags([])
No input data is required.
This indicates that ARDK doesn't currently need any input data, which may occur when all features are stopped or inactive.
pose
public static let pose = ArdkInputDataFlags(rawValue: 1 << 0)
Device pose (position and orientation) is required.
This includes the camera transform matrix that defines the device's position and orientation in world coordinate space.
deviceOrientation
public static let deviceOrientation = ArdkInputDataFlags(rawValue: 1 << 1)
Device screen orientation is required.
This indicates the physical orientation of the device screen, used for proper alignment of AR content.
trackingState
public static let trackingState = ArdkInputDataFlags(rawValue: 1 << 2)
ARKit tracking state is required.
This provides information about the quality and reliability of the device's pose tracking system.
cameraImage
public static let cameraImage = ArdkInputDataFlags(rawValue: 1 << 3)
Camera image data is required.
This includes the color camera image planes and associated metadata like intrinsics and timestamps.
gpsLocation
public static let gpsLocation = ArdkInputDataFlags(rawValue: 1 << 4)
GPS location data is required.
This includes latitude, longitude, altitude, and accuracy information from the device's location services.
compass
public static let compass = ArdkInputDataFlags(rawValue: 1 << 5)
Compass heading data is required.
This includes magnetic and true heading information from the device's magnetometer and compass.
platformDepth
public static let platformDepth = ArdkInputDataFlags(rawValue: 1 << 6)
Platform depth data is required.
This includes depth measurements and confidence data from LiDAR or structured light depth sensors.
description
public var description: String
Methods
init(rawValue:)
public init(rawValue: UInt32)
Creates input data flags with the specified raw value.
- Parameter rawValue: The raw flags value
Parameters
| Name | Description |
|---|---|
| rawValue | The raw flags value |