Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
PlayAreaMode
XRInterface.swift:77enum PlayAreaMode
Cases
case unknown
Play area mode not set or not available.
case xrPlayArea3dof
Play area only supports orientation tracking, no positional tracking, area will center around player.
case sitting
Player is in seated position, limited positional tracking, fixed guardian around player.
case roomscale
Player is free to move around, full positional tracking.
case stage
Same as .xrPlayAreaRoomscale but origin point is fixed to the center of the physical space,
centerOnHmd(rotationMode:keepHeight:)
disabled.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (30) members.
Types
Type members
Instance members
var arIsAnchorDetectionEnabled: Bool
On an AR interface,
true
if anchor detection is enabled.var environmentBlendMode: XRInterface.EnvironmentBlendMode
Specify how XR should blend in the environment. This is specific to certain AR and passthrough devices where camera images are blended in by the XR compositor.
var interfaceIsPrimary: Bool
true
if this is the primary interface.var playAreaChanged: Signal1
Emitted when the play area is changed. This can be a result of the player resetting the boundary or entering a new play area, the player changing the play area mode, the world scale changing or the player resetting their headset orientation.
var xrPlayAreaMode: XRInterface.PlayAreaMode
The play area mode for this interface.
func getCameraFeedId(
) -> Int32 If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the
CameraServer
for this interface.func getCapabilities(
) -> UInt32 Returns a combination of
Capabilities
flags providing information about the capabilities of this interface.func getName(
) -> StringName Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc).
func getPlayArea(
) -> PackedVector3Array Returns an array of vectors that denotes the physical play area mapped to the virtual space around the
XROrigin3D
point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available.func getProjectionForView(UInt32, aspect: Double, near: Double, far: Double
) -> Projection Returns the projection matrix for a view/eye.
func getRenderTargetSize(
) -> Vector2 Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
func getSupportedEnvironmentBlendModes(
) -> GArray Returns the an array of supported environment blend modes, see
XRInterface.EnvironmentBlendMode
.func getSystemInfo(
) -> GDictionary Returns a
GDictionary
with extra system info. Interfaces are expected to returnXRRuntimeName
andXRRuntimeVersion
providing info about the used XR runtime. Additional entries may be provided specific to an interface.func getTrackingStatus(
) -> XRInterface.TrackingStatus If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
func getTransformForView(UInt32, camTransform: Transform3D
) -> Transform3D Returns the transform for a view/eye.
func getViewCount(
) -> UInt32 Returns the number of views that need to be rendered for this device. 1 for Monoscopic, 2 for Stereoscopic.
func initialize(
) -> Bool Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
func isInitialized(
) -> Bool Is
true
if this interface has been initialized.func isPassthroughEnabled(
) -> Bool Is
true
if passthrough is enabled.func isPassthroughSupported(
) -> Bool Is
true
if this interface supports passthrough.func startPassthrough(
) -> Bool Starts passthrough, will return
false
if passthrough couldn’t be started.func stopPassthrough(
) Stops passthrough.
func supportsPlayAreaMode(XRInterface.PlayAreaMode
) -> Bool Call this to find out if a given play area mode is supported by this interface.
func triggerHapticPulse(actionName: String, trackerName: StringName, frequency: Double, amplitude: Double, durationSec: Double, delaySec: Double
) Triggers a haptic pulse on a device associated with this interface.
func uninitialize(
) Turns the interface off.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.