| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
OpenXR.Extensions.XR_MSFT_perception_anchor_interop
Description
Name
XR_MSFT_perception_anchor_interop - instance extension
Specification
See XR_MSFT_perception_anchor_interop in the main specification for complete information.
Registered Extension Number
57
Revision
1
Extension and Version Dependencies
- Requires OpenXR 1.0
 
- Requires @@
 
See Also
createSpatialAnchorFromPerceptionAnchorMSFT,
 tryGetPerceptionAnchorFromSpatialAnchorMSFT
Document Notes
For more information, see the OpenXR Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- createSpatialAnchorFromPerceptionAnchorMSFT :: forall io. MonadIO io => Session -> ("perceptionAnchor" ::: Ptr IUnknown) -> io SpatialAnchorMSFT
 - withSpatialAnchorFromPerceptionAnchorMSFT :: forall io r. MonadIO io => Session -> Ptr IUnknown -> (io SpatialAnchorMSFT -> (SpatialAnchorMSFT -> io ()) -> r) -> r
 - tryGetPerceptionAnchorFromSpatialAnchorMSFT :: forall io. MonadIO io => Session -> SpatialAnchorMSFT -> io ("perceptionAnchor" ::: Ptr IUnknown)
 - type MSFT_perception_anchor_interop_SPEC_VERSION = 1
 - pattern MSFT_perception_anchor_interop_SPEC_VERSION :: forall a. Integral a => a
 - type MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAME = "XR_MSFT_perception_anchor_interop"
 - pattern MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
 - data IUnknown
 - data SpatialAnchorMSFT = SpatialAnchorMSFT {}
 - destroySpatialAnchorMSFT :: forall io. MonadIO io => SpatialAnchorMSFT -> io ()
 
Documentation
createSpatialAnchorFromPerceptionAnchorMSFT Source #
Arguments
| :: forall io. MonadIO io | |
| => Session | 
  | 
| -> ("perceptionAnchor" ::: Ptr IUnknown) | 
  | 
| -> io SpatialAnchorMSFT | 
xrCreateSpatialAnchorFromPerceptionAnchorMSFT - Create a
 SpatialAnchorMSFT from a Windows
 SpatialAnchor pointer
Parameter Descriptions
Description
The input perceptionAnchor must support successful QueryInterface
 to
 Windows.Perception.Spatial.SpatialAnchor
 , otherwise the runtime must return
 ERROR_VALIDATION_FAILURE.
If the function successfully returned, the output anchor must be a
 valid handle. This also increments the refcount of the
 perceptionAnchor object.
When application is done with the anchor handle, it can be destroyed
 using
 destroySpatialAnchorMSFT
 function. This also decrements the refcount of underlying windows
 perception anchor object.
Valid Usage (Implicit)
- 
     The @@ extension must be enabled prior to calling
     
createSpatialAnchorFromPerceptionAnchorMSFT 
- 
     
sessionmust be a validSessionhandle - 
     
perceptionAnchormust be a pointer to anIUnknownvalue - 
     
anchormust be a pointer to anSpatialAnchorMSFThandle 
Return Codes
See Also
withSpatialAnchorFromPerceptionAnchorMSFT :: forall io r. MonadIO io => Session -> Ptr IUnknown -> (io SpatialAnchorMSFT -> (SpatialAnchorMSFT -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
 createSpatialAnchorFromPerceptionAnchorMSFT and
 destroySpatialAnchorMSFT
To ensure that destroySpatialAnchorMSFT is always called: pass
 bracket (or the allocate function from your
 favourite resource management library) as the last argument.
 To just extract the pair pass (,) as the last argument.
tryGetPerceptionAnchorFromSpatialAnchorMSFT Source #
Arguments
| :: forall io. MonadIO io | |
| => Session | 
  | 
| -> SpatialAnchorMSFT | 
  | 
| -> io ("perceptionAnchor" ::: Ptr IUnknown) | 
xrTryGetPerceptionAnchorFromSpatialAnchorMSFT - Convert a
 SpatialAnchorMSFT to a Windows SpatialAnchor
Parameter Descriptions
Description
If the runtime can convert the anchor to a
 Windows.Perception.Spatial.SpatialAnchor
 object, this function must return
 SUCCESS, and the output IUnknown in the
 pointer of perceptionAnchor must be not NULL. This also increments
 the refcount of the object. The application can then use
 QueryInterface to get the pointer for
 Windows.Perception.Spatial.SpatialAnchor
 object. The application should release the COM pointer after done with
 the object, or attach it to a smart COM pointer such as
 winrt::com_ptr.
If the runtime cannot convert the anchor to a
 Windows.Perception.Spatial.SpatialAnchor
 object, the function must return SUCCESS,
 and the output IUnknown in the pointer of perceptionAnchor must be
 NULL.
Valid Usage (Implicit)
- 
     The @@ extension must be enabled prior to calling
     
tryGetPerceptionAnchorFromSpatialAnchorMSFT 
- 
     
sessionmust be a validSessionhandle - 
     
anchormust be a validSpatialAnchorMSFThandle - 
     
perceptionAnchormust be a pointer to a pointer to anIUnknownvalue - 
     
anchormust have been created, allocated, or retrieved fromsession 
Return Codes
See Also
pattern MSFT_perception_anchor_interop_SPEC_VERSION :: forall a. Integral a => a Source #
type MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAME = "XR_MSFT_perception_anchor_interop" Source #
pattern MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data SpatialAnchorMSFT Source #
XrSpatialAnchorMSFT - Represents a spatial anchor
Description
Spatial anchors are often used in combination with an UNBOUNDED_MSFT
 reference space. UNBOUNDED_MSFT reference spaces adjust their origin
 as necessary to keep the viewer’s coordinates relative to the space’s
 origin stable. Such adjustments maintain the visual stability of content
 currently near the viewer, but may cause content placed far from the
 viewer to drift in its alignment to the real world by the time the user
 moves close again. By creating an SpatialAnchorMSFT where a piece of
 content is placed and then always rendering that content relative to its
 anchor’s space, an application can ensure that each piece of content
 stays at a fixed location in the environment.
See Also
SpatialAnchorSpaceCreateInfoMSFT,
 createSpatialAnchorFromPerceptionAnchorMSFT,
 createSpatialAnchorMSFT,
 destroySpatialAnchorMSFT,
 tryGetPerceptionAnchorFromSpatialAnchorMSFT
Constructors
| SpatialAnchorMSFT | |
Instances
| Eq SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles Methods (==) :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool # (/=) :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool #  | |
| Show SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles Methods showsPrec :: Int -> SpatialAnchorMSFT -> ShowS # show :: SpatialAnchorMSFT -> String # showList :: [SpatialAnchorMSFT] -> ShowS #  | |
| Zero SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles Methods  | |
| HasObjectType SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles Methods objectTypeAndHandle :: SpatialAnchorMSFT -> (ObjectType, Word64) Source #  | |
| IsHandle SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles  | |
destroySpatialAnchorMSFT Source #
Arguments
| :: forall io. MonadIO io | |
| => SpatialAnchorMSFT | 
  | 
| -> io () | 
xrDestroySpatialAnchorMSFT - Destroys a spatial anchor
Parameter Descriptions
Description
SpatialAnchorMSFT handles are destroyed
 using destroySpatialAnchorMSFT. By destroying an anchor, the runtime
 can stop spending resources used to maintain tracking for that
 anchor’s origin.
Valid Usage (Implicit)
-  The @@
     extension must be enabled prior to calling
     
destroySpatialAnchorMSFT 
-  
anchormust be a validSpatialAnchorMSFThandle