openxr-0.1: Bindings to the OpenXR API
Safe HaskellNone
LanguageHaskell2010

OpenXR.Extensions.XR_EXT_hand_tracking

Description

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

Documentation

createHandTrackerEXT Source #

Arguments

:: forall a io. (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) 
=> Session

session is an Session in which the hand tracker will be active.

-> HandTrackerCreateInfoEXT a

createInfo is the HandTrackerCreateInfoEXT used to specify the hand tracker.

-> io (Result, HandTrackerEXT) 

xrCreateHandTrackerEXT - Create a hand joints handle.

Valid Usage (Implicit)

Return Codes

Success
Failure

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

HandTrackerCreateInfoEXT, HandTrackerEXT, Session

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 #

Arguments

:: forall io. MonadIO io 
=> HandTrackerEXT

handTracker is an HandTrackerEXT previously created by createHandTrackerEXT.

-> io () 

xrDestroyHandTrackerEXT - Destroy a hand joints handle

Valid Usage (Implicit)

Thread Safety

  • Access to handTracker, and any child handles, must be externally synchronized

Return Codes

Success
Failure

See Also

HandTrackerEXT

locateHandJointsEXT Source #

Arguments

:: forall a io. (Extendss HandJointLocationsEXT a, PokeChain a, PeekChain a, MonadIO io) 
=> HandTrackerEXT

handTracker is an HandTrackerEXT previously created by createHandTrackerEXT.

-> HandJointsLocateInfoEXT

locateInfo is a pointer to HandJointsLocateInfoEXT describing information to locate hand joints.

-> io (Result, HandJointLocationsEXT a) 

xrLocateHandJointsEXT - Locate hand joint locations

Valid Usage (Implicit)

Return Codes

Success
Failure

See Also

HandJointLocationsEXT, HandJointsLocateInfoEXT, HandTrackerEXT

data SystemHandTrackingPropertiesEXT Source #

XrSystemHandTrackingPropertiesEXT - System property for hand tracking

Valid Usage (Implicit)

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

Constructors

SystemHandTrackingPropertiesEXT 

Fields

Instances

Instances details
Eq SystemHandTrackingPropertiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Show SystemHandTrackingPropertiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable SystemHandTrackingPropertiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero SystemHandTrackingPropertiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

ToCStruct SystemHandTrackingPropertiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

FromCStruct SystemHandTrackingPropertiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

data HandTrackerCreateInfoEXT (es :: [Type]) Source #

XrHandTrackerCreateInfoEXT - Information to create a hand joints handle

Valid Usage (Implicit)

See Also

HandEXT, HandJointSetEXT, StructureType, createHandTrackerEXT

Constructors

HandTrackerCreateInfoEXT 

Fields

  • next :: Chain es

    next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • hand :: HandEXT

    hand is an HandEXT which describes which hand the tracker is tracking.

  • handJointSet :: HandJointSetEXT

    handJointSet is an HandJointSetEXT describe the set of hand joints to retrieve.

Instances

Instances details
Extensible HandTrackerCreateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Methods

extensibleTypeName :: String Source #

getNext :: forall (es :: [Type]). HandTrackerCreateInfoEXT es -> Chain es Source #

setNext :: forall (ds :: [Type]) (es :: [Type]). HandTrackerCreateInfoEXT ds -> Chain es -> HandTrackerCreateInfoEXT es Source #

extends :: forall e b proxy. Typeable e => proxy e -> (Extends HandTrackerCreateInfoEXT e => b) -> Maybe b Source #

Show (Chain es) => Show (HandTrackerCreateInfoEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

es ~ ('[] :: [Type]) => Zero (HandTrackerCreateInfoEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

(Extendss HandTrackerCreateInfoEXT es, PokeChain es) => ToCStruct (HandTrackerCreateInfoEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

(Extendss HandTrackerCreateInfoEXT es, PeekChain es) => FromCStruct (HandTrackerCreateInfoEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

data HandJointsLocateInfoEXT Source #

XrHandJointsLocateInfoEXT - Describes the information to locate hand joints

Valid Usage (Implicit)

See Also

Space, StructureType, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrTime, locateHandJointsEXT

Constructors

HandJointsLocateInfoEXT 

Fields

Instances

Instances details
Eq HandJointsLocateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Show HandJointsLocateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandJointsLocateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandJointsLocateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

ToCStruct HandJointsLocateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

FromCStruct HandJointsLocateInfoEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

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)

See Also

HandJointLocationsEXT, Posef, SpaceLocationFlags

Constructors

HandJointLocationEXT 

Fields

  • locationFlags :: SpaceLocationFlags

    locationFlags is a bitfield, with bit masks defined in XrSpaceLocationFlagBits, to indicate which members contain valid data. If none of the bits are set, no other fields in this structure should be considered to be valid or meaningful.

  • pose :: Posef

    pose is an Posef defining the position and orientation of the origin of a hand joint within the reference frame of the corresponding HandJointsLocateInfoEXT::baseSpace.

  • radius :: Float

    radius is a float value radius of the corresponding joint in units of meters.

Instances

Instances details
Show HandJointLocationEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandJointLocationEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandJointLocationEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

ToCStruct HandJointLocationEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

FromCStruct HandJointLocationEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

data HandJointVelocityEXT Source #

XrHandJointVelocityEXT - Describes the velocity of a hand joint

Valid Usage (Implicit)

See Also

HandJointVelocitiesEXT, SpaceVelocityFlags, Vector3f

Constructors

HandJointVelocityEXT 

Fields

  • velocityFlags :: SpaceVelocityFlags

    velocityFlags is a bitfield, with bit masks defined in XrSpaceVelocityFlagBits, to indicate which members contain valid data. If none of the bits are set, no other fields in this structure should be considered to be valid or meaningful.

  • linearVelocity :: Vector3f

    linearVelocity is the relative linear velocity of the hand joint with respect to and expressed in the reference frame of the corresponding HandJointsLocateInfoEXT::baseSpace, in units of meters per second.

  • angularVelocity :: Vector3f

    angularVelocity is the relative angular velocity of the hand joint with respect to the corresponding HandJointsLocateInfoEXT::baseSpace. The vector’s direction is expressed in the reference frame of the corresponding HandJointsLocateInfoEXT::baseSpace and is parallel to the rotational axis of the hand joint. The vector’s magnitude is the relative angular speed of the hand joint in radians per second. The vector follows the right-hand rule for torque/rotation.

Instances

Instances details
Show HandJointVelocityEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandJointVelocityEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandJointVelocityEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

ToCStruct HandJointVelocityEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

FromCStruct HandJointVelocityEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

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)

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32, HandJointLocationEXT, StructureType, locateHandJointsEXT

Constructors

HandJointLocationsEXT 

Fields

Instances

Instances details
Extensible HandJointLocationsEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Methods

extensibleTypeName :: String Source #

getNext :: forall (es :: [Type]). HandJointLocationsEXT es -> Chain es Source #

setNext :: forall (ds :: [Type]) (es :: [Type]). HandJointLocationsEXT ds -> Chain es -> HandJointLocationsEXT es Source #

extends :: forall e b proxy. Typeable e => proxy e -> (Extends HandJointLocationsEXT e => b) -> Maybe b Source #

Show (Chain es) => Show (HandJointLocationsEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

es ~ ('[] :: [Type]) => Zero (HandJointLocationsEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

(Extendss HandJointLocationsEXT es, PokeChain es) => ToCStruct (HandJointLocationsEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

(Extendss HandJointLocationsEXT es, PeekChain es) => FromCStruct (HandJointLocationsEXT es) Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

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)

See Also

HandJointLocationsEXT, HandJointVelocityEXT, StructureType

Constructors

HandJointVelocitiesEXT 

Fields

Instances

Instances details
Eq HandJointVelocitiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Show HandJointVelocitiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandJointVelocitiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandJointVelocitiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

ToCStruct HandJointVelocitiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

FromCStruct HandJointVelocitiesEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

newtype HandEXT Source #

XrHandEXT - Describes which hand the tracker is tracking.

Enumerant Descriptions

See Also

HandTrackerCreateInfoEXT

Constructors

HandEXT Int32 

Bundled Patterns

pattern HAND_LEFT_EXT :: HandEXT

HAND_LEFT_EXT specifies the hand tracker will be tracking the user’s left hand.

pattern HAND_RIGHT_EXT :: HandEXT

HAND_RIGHT_EXT specifies the hand tracker will be tracking the user’s right hand.

Instances

Instances details
Eq HandEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Methods

(==) :: HandEXT -> HandEXT -> Bool #

(/=) :: HandEXT -> HandEXT -> Bool #

Ord HandEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Read HandEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Show HandEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Methods

zero :: HandEXT #

newtype HandJointEXT Source #

XrHandJointEXT - The name of hand joints that can be tracked

See Also

No cross-references are available

Constructors

HandJointEXT Int32 

Instances

Instances details
Eq HandJointEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Ord HandJointEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Read HandJointEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Show HandJointEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandJointEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandJointEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Methods

zero :: HandJointEXT #

newtype HandJointSetEXT Source #

XrHandJointSetEXT - The set of hand joints to track.

Enumerant Descriptions

See Also

HandTrackerCreateInfoEXT

Constructors

HandJointSetEXT Int32 

Bundled Patterns

pattern HAND_JOINT_SET_DEFAULT_EXT :: HandJointSetEXT

HAND_JOINT_SET_DEFAULT_EXT indicates that the created HandTrackerEXT tracks the set of hand joints described by HandJointEXT enum, i.e. the locateHandJointsEXT function returns an array of joint locations with the count of HAND_JOINT_COUNT_EXT and can be indexed using HandJointEXT.

Instances

Instances details
Eq HandJointSetEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Ord HandJointSetEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Read HandJointSetEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Show HandJointSetEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Storable HandJointSetEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

Zero HandJointSetEXT Source # 
Instance details

Defined in OpenXR.Extensions.XR_EXT_hand_tracking

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

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

See Also

HandJointEXT