Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
XR_MSFT_spatial_anchor - instance extension
Specification
See XR_MSFT_spatial_anchor in the main specification for complete information.
Registered Extension Number
40
Revision
1
Extension and Version Dependencies
- Requires OpenXR 1.0
See Also
createSpatialAnchorMSFT
, createSpatialAnchorSpaceMSFT
,
destroySpatialAnchorMSFT
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
- createSpatialAnchorMSFT :: forall io. MonadIO io => Session -> SpatialAnchorCreateInfoMSFT -> io SpatialAnchorMSFT
- withSpatialAnchorMSFT :: forall io r. MonadIO io => Session -> SpatialAnchorCreateInfoMSFT -> (io SpatialAnchorMSFT -> (SpatialAnchorMSFT -> io ()) -> r) -> r
- createSpatialAnchorSpaceMSFT :: forall io. MonadIO io => Session -> SpatialAnchorSpaceCreateInfoMSFT -> io Space
- withSpatialAnchorSpaceMSFT :: forall io r. MonadIO io => Session -> SpatialAnchorSpaceCreateInfoMSFT -> (io Space -> (Space -> io ()) -> r) -> r
- destroySpatialAnchorMSFT :: forall io. MonadIO io => SpatialAnchorMSFT -> io ()
- data SpatialAnchorCreateInfoMSFT = SpatialAnchorCreateInfoMSFT {}
- data SpatialAnchorSpaceCreateInfoMSFT = SpatialAnchorSpaceCreateInfoMSFT {}
- type MSFT_spatial_anchor_SPEC_VERSION = 1
- pattern MSFT_spatial_anchor_SPEC_VERSION :: forall a. Integral a => a
- type MSFT_SPATIAL_ANCHOR_EXTENSION_NAME = "XR_MSFT_spatial_anchor"
- pattern MSFT_SPATIAL_ANCHOR_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data SpatialAnchorMSFT = SpatialAnchorMSFT {}
Documentation
createSpatialAnchorMSFT Source #
:: forall io. MonadIO io | |
=> Session |
|
-> SpatialAnchorCreateInfoMSFT |
|
-> io SpatialAnchorMSFT |
xrCreateSpatialAnchorMSFT - Creates a spatial anchor
Parameter Descriptions
Description
Creates an SpatialAnchorMSFT
handle
representing a spatial anchor that will track a fixed location in the
physical world over time. That real-world location is specified by the
position and orientation of the specified pose
within space
at
time
.
If space
cannot be located relative to the environment at the moment
of the call to createSpatialAnchorMSFT
, the runtime must return
ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT
.
After the anchor is created, the runtime should then adjust its
position and orientation over time relative to other spaces so as to
maintain maximum alignment to its original real-world location, even if
that changes the anchor’s relationship to the original space
used to
initialize it.
Valid Usage (Implicit)
- The @@
extension must be enabled prior to calling
createSpatialAnchorMSFT
-
session
must be a validSession
handle -
createInfo
must be a pointer to a validSpatialAnchorCreateInfoMSFT
structure -
anchor
must be a pointer to anSpatialAnchorMSFT
handle
Return Codes
See Also
withSpatialAnchorMSFT :: forall io r. MonadIO io => Session -> SpatialAnchorCreateInfoMSFT -> (io SpatialAnchorMSFT -> (SpatialAnchorMSFT -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createSpatialAnchorMSFT
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.
createSpatialAnchorSpaceMSFT Source #
:: forall io. MonadIO io | |
=> Session |
|
-> SpatialAnchorSpaceCreateInfoMSFT |
|
-> io Space |
xrCreateSpatialAnchorSpaceMSFT - Creates a space from a spatial anchor
Parameter Descriptions
Description
Creates an Space
handle based on a spatial
anchor. Application can provide an Posef
to
define the position and orientation of the new space’s origin relative
to the anchor’s natural origin.
Multiple Space
handles may exist for a given
SpatialAnchorMSFT
simultaneously, up to some
limit imposed by the runtime. The Space
handle
must be eventually freed via the destroySpace
function or by destroying the parent
SpatialAnchorMSFT
handle.
Valid Usage (Implicit)
- The @@
extension must be enabled prior to calling
createSpatialAnchorSpaceMSFT
-
session
must be a validSession
handle -
createInfo
must be a pointer to a validSpatialAnchorSpaceCreateInfoMSFT
structure -
space
must be a pointer to anSpace
handle
Return Codes
See Also
Session
, Space
,
SpatialAnchorMSFT
,
SpatialAnchorSpaceCreateInfoMSFT
withSpatialAnchorSpaceMSFT :: forall io r. MonadIO io => Session -> SpatialAnchorSpaceCreateInfoMSFT -> (io Space -> (Space -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createSpatialAnchorSpaceMSFT
and destroySpace
To ensure that destroySpace
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.
destroySpatialAnchorMSFT Source #
:: 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
-
anchor
must be a validSpatialAnchorMSFT
handle
Return Codes
See Also
data SpatialAnchorCreateInfoMSFT Source #
XrSpatialAnchorCreateInfoMSFT - Information to create a spatial anchor
Valid Usage (Implicit)
- The @@
extension must be enabled prior to using
SpatialAnchorCreateInfoMSFT
-
type
must beTYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain -
space
must be a validSpace
handle
See Also
Posef
, Space
,
SpatialAnchorMSFT
,
StructureType
,
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrTime,
createSpatialAnchorMSFT
SpatialAnchorCreateInfoMSFT | |
|
Instances
data SpatialAnchorSpaceCreateInfoMSFT Source #
XrSpatialAnchorSpaceCreateInfoMSFT - Information to create a space from a spatial anchor
Valid Usage (Implicit)
- The
@@ extension must be enabled prior to using
SpatialAnchorSpaceCreateInfoMSFT
-
type
must beTYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain -
anchor
must be a validSpatialAnchorMSFT
handle
See Also
Posef
, Space
,
SpatialAnchorMSFT
,
StructureType
,
createSpatialAnchorSpaceMSFT
SpatialAnchorSpaceCreateInfoMSFT | |
|
Instances
type MSFT_spatial_anchor_SPEC_VERSION = 1 Source #
pattern MSFT_spatial_anchor_SPEC_VERSION :: forall a. Integral a => a Source #
type MSFT_SPATIAL_ANCHOR_EXTENSION_NAME = "XR_MSFT_spatial_anchor" Source #
pattern MSFT_SPATIAL_ANCHOR_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
Instances
Eq SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles (==) :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool # (/=) :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool # | |
Show SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles showsPrec :: Int -> SpatialAnchorMSFT -> ShowS # show :: SpatialAnchorMSFT -> String # showList :: [SpatialAnchorMSFT] -> ShowS # | |
Zero SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles | |
HasObjectType SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles | |
IsHandle SpatialAnchorMSFT Source # | |
Defined in OpenXR.Extensions.Handles |