Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
XR_EXT_hand_tracking - instance extension
Specification
See XR_EXT_hand_tracking in the main specification for complete information.
Registered Extension Number
52
Revision
2
Extension and Version Dependencies
- Requires OpenXR 1.0
See Also
HAND_JOINT_COUNT_EXT
, HandEXT
,
HandJointEXT
, HandJointLocationEXT
, HandJointLocationsEXT
,
HandJointSetEXT
, HandJointVelocitiesEXT
, HandJointVelocityEXT
,
HandJointsLocateInfoEXT
, HandTrackerCreateInfoEXT
,
SystemHandTrackingPropertiesEXT
, createHandTrackerEXT
,
destroyHandTrackerEXT
, locateHandJointsEXT
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
- createHandTrackerEXT :: forall a io. (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) => Session -> HandTrackerCreateInfoEXT a -> io (Result, HandTrackerEXT)
- withHandTrackerEXT :: forall a io r. (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) => Session -> HandTrackerCreateInfoEXT a -> (io (Result, HandTrackerEXT) -> ((Result, HandTrackerEXT) -> io ()) -> r) -> r
- destroyHandTrackerEXT :: forall io. MonadIO io => HandTrackerEXT -> io ()
- locateHandJointsEXT :: forall a io. (Extendss HandJointLocationsEXT a, PokeChain a, PeekChain a, MonadIO io) => HandTrackerEXT -> HandJointsLocateInfoEXT -> io (Result, HandJointLocationsEXT a)
- data SystemHandTrackingPropertiesEXT = SystemHandTrackingPropertiesEXT {}
- data HandTrackerCreateInfoEXT (es :: [Type]) = HandTrackerCreateInfoEXT {
- next :: Chain es
- hand :: HandEXT
- handJointSet :: HandJointSetEXT
- data HandJointsLocateInfoEXT = HandJointsLocateInfoEXT {}
- data HandJointLocationEXT = HandJointLocationEXT {}
- data HandJointVelocityEXT = HandJointVelocityEXT {}
- data HandJointLocationsEXT (es :: [Type]) = HandJointLocationsEXT {
- next :: Chain es
- isActive :: Bool
- jointCount :: Word32
- jointLocations :: Ptr HandJointLocationEXT
- data HandJointVelocitiesEXT = HandJointVelocitiesEXT {}
- newtype HandEXT where
- HandEXT Int32
- pattern HAND_LEFT_EXT :: HandEXT
- pattern HAND_RIGHT_EXT :: HandEXT
- newtype HandJointEXT where
- HandJointEXT Int32
- pattern HAND_JOINT_PALM_EXT :: HandJointEXT
- pattern HAND_JOINT_WRIST_EXT :: HandJointEXT
- pattern HAND_JOINT_THUMB_METACARPAL_EXT :: HandJointEXT
- pattern HAND_JOINT_THUMB_PROXIMAL_EXT :: HandJointEXT
- pattern HAND_JOINT_THUMB_DISTAL_EXT :: HandJointEXT
- pattern HAND_JOINT_THUMB_TIP_EXT :: HandJointEXT
- pattern HAND_JOINT_INDEX_METACARPAL_EXT :: HandJointEXT
- pattern HAND_JOINT_INDEX_PROXIMAL_EXT :: HandJointEXT
- pattern HAND_JOINT_INDEX_INTERMEDIATE_EXT :: HandJointEXT
- pattern HAND_JOINT_INDEX_DISTAL_EXT :: HandJointEXT
- pattern HAND_JOINT_INDEX_TIP_EXT :: HandJointEXT
- pattern HAND_JOINT_MIDDLE_METACARPAL_EXT :: HandJointEXT
- pattern HAND_JOINT_MIDDLE_PROXIMAL_EXT :: HandJointEXT
- pattern HAND_JOINT_MIDDLE_INTERMEDIATE_EXT :: HandJointEXT
- pattern HAND_JOINT_MIDDLE_DISTAL_EXT :: HandJointEXT
- pattern HAND_JOINT_MIDDLE_TIP_EXT :: HandJointEXT
- pattern HAND_JOINT_RING_METACARPAL_EXT :: HandJointEXT
- pattern HAND_JOINT_RING_PROXIMAL_EXT :: HandJointEXT
- pattern HAND_JOINT_RING_INTERMEDIATE_EXT :: HandJointEXT
- pattern HAND_JOINT_RING_DISTAL_EXT :: HandJointEXT
- pattern HAND_JOINT_RING_TIP_EXT :: HandJointEXT
- pattern HAND_JOINT_LITTLE_METACARPAL_EXT :: HandJointEXT
- pattern HAND_JOINT_LITTLE_PROXIMAL_EXT :: HandJointEXT
- pattern HAND_JOINT_LITTLE_INTERMEDIATE_EXT :: HandJointEXT
- pattern HAND_JOINT_LITTLE_DISTAL_EXT :: HandJointEXT
- pattern HAND_JOINT_LITTLE_TIP_EXT :: HandJointEXT
- newtype HandJointSetEXT where
- type EXT_hand_tracking_SPEC_VERSION = 2
- pattern EXT_hand_tracking_SPEC_VERSION :: forall a. Integral a => a
- type EXT_HAND_TRACKING_EXTENSION_NAME = "XR_EXT_hand_tracking"
- pattern EXT_HAND_TRACKING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data HandTrackerEXT = HandTrackerEXT {}
- type HAND_JOINT_COUNT_EXT = 26
- pattern HAND_JOINT_COUNT_EXT :: forall a. Integral a => a
Documentation
:: forall a io. (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) | |
=> Session |
|
-> HandTrackerCreateInfoEXT a |
|
-> io (Result, HandTrackerEXT) |
xrCreateHandTrackerEXT - Create a hand joints handle.
Valid Usage (Implicit)
- The @@ extension
must be enabled prior to calling
createHandTrackerEXT
-
session
must be a validSession
handle -
createInfo
must be a pointer to a validHandTrackerCreateInfoEXT
structure -
handTracker
must be a pointer to anHandTrackerEXT
handle
Return Codes
If the system does not support hand tracking, runtime must return
ERROR_FEATURE_UNSUPPORTED
from
createHandTrackerEXT
. In this case, the runtime must return
FALSE
for supportsHandTracking
in
SystemHandTrackingPropertiesEXT
when the function
getSystemProperties
is called, so that the
application can avoid creating a hand tracker.
See Also
withHandTrackerEXT :: forall a io r. (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) => Session -> HandTrackerCreateInfoEXT a -> (io (Result, HandTrackerEXT) -> ((Result, HandTrackerEXT) -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createHandTrackerEXT
and destroyHandTrackerEXT
To ensure that destroyHandTrackerEXT
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.
destroyHandTrackerEXT Source #
:: forall io. MonadIO io | |
=> HandTrackerEXT |
|
-> io () |
xrDestroyHandTrackerEXT - Destroy a hand joints handle
Valid Usage (Implicit)
- The @@ extension
must be enabled prior to calling
destroyHandTrackerEXT
-
handTracker
must be a validHandTrackerEXT
handle
Thread Safety
- Access to
handTracker
, and any child handles, must be externally synchronized
Return Codes
See Also
:: forall a io. (Extendss HandJointLocationsEXT a, PokeChain a, PeekChain a, MonadIO io) | |
=> HandTrackerEXT |
|
-> HandJointsLocateInfoEXT |
|
-> io (Result, HandJointLocationsEXT a) |
xrLocateHandJointsEXT - Locate hand joint locations
Valid Usage (Implicit)
- The @@ extension
must be enabled prior to calling
locateHandJointsEXT
-
handTracker
must be a validHandTrackerEXT
handle -
locateInfo
must be a pointer to a validHandJointsLocateInfoEXT
structure -
locations
must be a pointer to anHandJointLocationsEXT
structure
Return Codes
See Also
HandJointLocationsEXT
, HandJointsLocateInfoEXT
,
HandTrackerEXT
data SystemHandTrackingPropertiesEXT Source #
XrSystemHandTrackingPropertiesEXT - System property for hand tracking
Valid Usage (Implicit)
- The @@
extension must be enabled prior to using
SystemHandTrackingPropertiesEXT
-
type
must beTYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain
If a runtime returns FALSE
for
supportsHandTracking
, the runtime must return
ERROR_FEATURE_UNSUPPORTED
from
createHandTrackerEXT
.
See Also
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32,
StructureType
SystemHandTrackingPropertiesEXT | |
|
Instances
data HandTrackerCreateInfoEXT (es :: [Type]) Source #
XrHandTrackerCreateInfoEXT - Information to create a hand joints handle
Valid Usage (Implicit)
- The @@
extension must be enabled prior to using
HandTrackerCreateInfoEXT
-
type
must beTYPE_HAND_TRACKER_CREATE_INFO_EXT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain. See also:HandPoseTypeInfoMSFT
-
hand
must be a validHandEXT
value -
handJointSet
must be a validHandJointSetEXT
value
See Also
HandEXT
, HandJointSetEXT
,
StructureType
,
createHandTrackerEXT
HandTrackerCreateInfoEXT | |
|
Instances
data HandJointsLocateInfoEXT Source #
XrHandJointsLocateInfoEXT - Describes the information to locate hand joints
Valid Usage (Implicit)
- The @@
extension must be enabled prior to using
HandJointsLocateInfoEXT
-
type
must beTYPE_HAND_JOINTS_LOCATE_INFO_EXT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain -
baseSpace
must be a validSpace
handle
See Also
Space
,
StructureType
,
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrTime,
locateHandJointsEXT
Instances
data HandJointLocationEXT Source #
XrHandJointLocationEXT - Describes the location and radius of a hand joint
Member Descriptions
Description
If the returned locationFlags
has
XR_SPACE_LOCATION_POSITION_VALID_BIT
set, the returned radius must
be a positive value.
If the returned locationFlags
has
XR_SPACE_LOCATION_POSITION_VALID_BIT
unset, the returned radius value
is undefined and should be avoided.
Valid Usage (Implicit)
- The @@ extension
must be enabled prior to using
HandJointLocationEXT
-
locationFlags
must be a valid combination of XrSpaceLocationFlagBits values -
locationFlags
must not be0
See Also
HandJointLocationEXT | |
|
Instances
data HandJointVelocityEXT Source #
XrHandJointVelocityEXT - Describes the velocity of a hand joint
Valid Usage (Implicit)
- The @@ extension
must be enabled prior to using
HandJointVelocityEXT
-
velocityFlags
must be a valid combination of XrSpaceVelocityFlagBits values -
velocityFlags
must not be0
See Also
HandJointVelocityEXT | |
|
Instances
data HandJointLocationsEXT (es :: [Type]) Source #
XrHandJointLocationsEXT - Returns the hand joint locations
Member Descriptions
Description
The application must allocate the memory for the output array
jointLocations
that can contain at least jointCount
of
HandJointLocationEXT
.
The application must set jointCount
as described by the
HandJointSetEXT
when creating the
HandTrackerEXT
otherwise the runtime must
return ERROR_VALIDATION_FAILURE
.
The runtime must update the jointLocations
array ordered so that the
application can index elements using the corresponding hand joint enum
(e.g. HandJointEXT
) as described by HandJointSetEXT
when creating
the HandTrackerEXT
. For example, when the
HandTrackerEXT
is created with
HAND_JOINT_SET_DEFAULT_EXT
, the application must set the
jointCount
to HAND_JOINT_COUNT_EXT
, and
the runtime must fill the jointLocations
array ordered so that it
may be indexed by the HandJointEXT
enum.
If the returned isActive
is true, the runtime must return all joint
locations with both XR_SPACE_LOCATION_POSITION_VALID_BIT
and
XR_SPACE_LOCATION_ORIENTATION_VALID_BIT
set. Although, in this case,
some joint space locations may be untracked (i.e.
XR_SPACE_LOCATION_POSITION_TRACKED_BIT
or
XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT
is unset).
If the returned isActive
is false, it indicates the hand tracker did
not detect the hand input or the application lost input focus. In this
case, the runtime must return all jointLocations
with neither
XR_SPACE_LOCATION_POSITION_VALID_BIT
nor
XR_SPACE_LOCATION_ORIENTATION_VALID_BIT
set.
Valid Usage (Implicit)
- The @@ extension
must be enabled prior to using
HandJointLocationsEXT
-
type
must beTYPE_HAND_JOINT_LOCATIONS_EXT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain. See also:HandJointVelocitiesEXT
-
jointLocations
must be a pointer to an array ofjointCount
HandJointLocationEXT
structures - The
jointCount
parameter must be greater than0
See Also
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32,
HandJointLocationEXT
,
StructureType
, locateHandJointsEXT
HandJointLocationsEXT | |
|
Instances
data HandJointVelocitiesEXT Source #
XrHandJointVelocitiesEXT - Returns the hand joint velocities
Member Descriptions
Description
The application must allocate the memory for the output array
jointVelocities
that can contain at least jointCount
of
HandJointVelocityEXT
.
The application must input jointCount
as described by the
HandJointSetEXT
when creating the
HandTrackerEXT
. Otherwise, the runtime
must return ERROR_VALIDATION_FAILURE
.
The runtime must update the jointVelocities
array in the order so
that the application can index elements using the corresponding hand
joint enum (e.g. HandJointEXT
) as described by the HandJointSetEXT
when creating the HandTrackerEXT
. For
example, when the HandTrackerEXT
is created
with HAND_JOINT_SET_DEFAULT_EXT
, the application must set the
jointCount
to HAND_JOINT_COUNT_EXT
, and
the returned jointVelocities
array must be ordered to be indexed by
enum HandJointEXT
enum.
If the returned HandJointLocationsEXT
::isActive
is false, it
indicates the hand tracker did not detect a hand input or the
application lost input focus. In this case, the runtime must return
all jointVelocities
with neither XR_SPACE_VELOCITY_LINEAR_VALID_BIT
nor XR_SPACE_VELOCITY_ANGULAR_VALID_BIT
set.
If an HandJointVelocitiesEXT
structure is chained to
HandJointLocationsEXT
::next
, the returned
HandJointLocationsEXT
::isActive
is true, and the velocity is
observed or can be calculated by the runtime, the runtime must fill in
the linear velocity of each hand joint within the reference frame of
baseSpace
and set the XR_SPACE_VELOCITY_LINEAR_VALID_BIT
. Similarly,
if an HandJointVelocitiesEXT
structure is chained to
HandJointLocationsEXT
::next
, the returned
HandJointLocationsEXT
::isActive
is true, and the angular velocity
is observed or can be calculated by the runtime, the runtime must fill
in the angular velocity of each joint within the reference frame of
baseSpace
and set the XR_SPACE_VELOCITY_ANGULAR_VALID_BIT
.
Valid Usage (Implicit)
- The @@
extension must be enabled prior to using
HandJointVelocitiesEXT
-
type
must beTYPE_HAND_JOINT_VELOCITIES_EXT
-
next
must beNULL
or a valid pointer to the next structure in a structure chain -
jointVelocities
must be a pointer to an array ofjointCount
HandJointVelocityEXT
structures - The
jointCount
parameter must be greater than0
See Also
HandJointVelocitiesEXT | |
|
Instances
XrHandEXT - Describes which hand the tracker is tracking.
Enumerant Descriptions
See Also
pattern HAND_LEFT_EXT :: HandEXT |
|
pattern HAND_RIGHT_EXT :: HandEXT |
|
Instances
Eq HandEXT Source # | |
Ord HandEXT Source # | |
Defined in OpenXR.Extensions.XR_EXT_hand_tracking | |
Read HandEXT Source # | |
Show HandEXT Source # | |
Storable HandEXT Source # | |
Zero HandEXT Source # | |
Defined in OpenXR.Extensions.XR_EXT_hand_tracking |
newtype HandJointEXT Source #
XrHandJointEXT - The name of hand joints that can be tracked
See Also
No cross-references are available
Instances
newtype HandJointSetEXT Source #
XrHandJointSetEXT - The set of hand joints to track.
Enumerant Descriptions
See Also
pattern HAND_JOINT_SET_DEFAULT_EXT :: HandJointSetEXT |
|
Instances
type EXT_hand_tracking_SPEC_VERSION = 2 Source #
pattern EXT_hand_tracking_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_HAND_TRACKING_EXTENSION_NAME = "XR_EXT_hand_tracking" Source #
pattern EXT_HAND_TRACKING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data HandTrackerEXT Source #
XrHandTrackerEXT - Represents a tracker for a hand joints.
Description
An application creates separate HandTrackerEXT
handles for left and
right hands. This handle can be used to locate hand joints using
locateHandJointsEXT
function.
A hand tracker provides accurate fidelity to the user’s actual hand shape. When the hand tracking input requires the user to be holding a controller in their hand, the hand tracking input will appear as the user holding the controller. This input can be used to render the hand shape together with rendering the controller in the hand.
See Also
createHandMeshSpaceMSFT
,
createHandTrackerEXT
,
destroyHandTrackerEXT
,
locateHandJointsEXT
,
updateHandMeshMSFT
Instances
Eq HandTrackerEXT Source # | |
Defined in OpenXR.Extensions.Handles (==) :: HandTrackerEXT -> HandTrackerEXT -> Bool # (/=) :: HandTrackerEXT -> HandTrackerEXT -> Bool # | |
Show HandTrackerEXT Source # | |
Defined in OpenXR.Extensions.Handles showsPrec :: Int -> HandTrackerEXT -> ShowS # show :: HandTrackerEXT -> String # showList :: [HandTrackerEXT] -> ShowS # | |
Zero HandTrackerEXT Source # | |
Defined in OpenXR.Extensions.Handles zero :: HandTrackerEXT # | |
HasObjectType HandTrackerEXT Source # | |
Defined in OpenXR.Extensions.Handles objectTypeAndHandle :: HandTrackerEXT -> (ObjectType, Word64) Source # | |
IsHandle HandTrackerEXT Source # | |
Defined in OpenXR.Extensions.Handles |
type HAND_JOINT_COUNT_EXT = 26 Source #
pattern HAND_JOINT_COUNT_EXT :: forall a. Integral a => a Source #
XR_HAND_JOINT_COUNT_EXT - The number of hand joint enums defined in XrHandJointEXT
Description
HAND_JOINT_COUNT_EXT
defines the number of hand joint enumerants
defined in HandJointEXT