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

OpenXR.Extensions.XR_MSFT_controller_model

Description

Name

XR_MSFT_controller_model - instance extension

Specification

See XR_MSFT_controller_model in the main specification for complete information.

Registered Extension Number

56

Revision

2

Extension and Version Dependencies

  • Requires OpenXR 1.0

See Also

MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT, NULL_CONTROLLER_MODEL_KEY_MSFT, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrControllerModelKeyMSFT, ControllerModelKeyStateMSFT, ControllerModelNodePropertiesMSFT, ControllerModelNodeStateMSFT, ControllerModelPropertiesMSFT, ControllerModelStateMSFT, getControllerModelKeyMSFT, getControllerModelPropertiesMSFT, getControllerModelStateMSFT, loadControllerModelMSFT

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

getControllerModelKeyMSFT Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the specified Session.

-> ("topLevelUserPath" ::: Path)

topLevelUserPath is the top level user path corresponding to the controller render model being queried (e.g. /user/hand/left or /user/hand/right).

-> io ControllerModelKeyStateMSFT 

loadControllerModelMSFT :: forall io. MonadIO io => Session -> ControllerModelKeyMSFT -> io ("buffer" ::: Vector Word8) Source #

xrLoadControllerModelMSFT - Load controller render model

Parameter Descriptions

  • modelKey is the model key corresponding to the controller render model being queried.
  • bufferCapacityInput is the capacity of the buffer array, or 0 to indicate a request to retrieve the required capacity.
  • bufferCountOutput filled in by the runtime with the count of elements in buffer array, or returns the required capacity in the case that bufferCapacityInput is 0.
  • buffer is a pointer to an application-allocated array of the model for the device that will be filled with the uint8_t values by the runtime. It can be NULL if bufferCapacityInput is 0.
  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

The loadControllerModelMSFT function may be a slow operation and therefore should be invoked from a non-timing critical thread.

If the input modelKey is invalid, i.e. it is NULL_CONTROLLER_MODEL_KEY_MSFT or not a key returned from ControllerModelKeyStateMSFT, the runtime must return ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT.

Valid Usage (Implicit)

  • session must be a valid Session handle
  • bufferCountOutput must be a pointer to a uint32_t value
  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput uint8_t values

Return Codes

Success
Failure

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrControllerModelKeyMSFT, Session

getControllerModelPropertiesMSFT Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the specified Session.

-> ControllerModelKeyMSFT

modelKey is a valid model key obtained from ControllerModelKeyStateMSFT

-> io ControllerModelPropertiesMSFT 

xrGetControllerModelPropertiesMSFT - Get controller model properties

Parameter Descriptions

Description

The runtime must return the same data in ControllerModelPropertiesMSFT for a valid modelKey. Therefore, the application can cache the returned ControllerModelPropertiesMSFT using modelKey and reuse the data for each frame.

If the input modelKey is invalid, i.e. it is NULL_CONTROLLER_MODEL_KEY_MSFT or not a key returned from ControllerModelKeyStateMSFT, the runtime must return ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT.

Valid Usage (Implicit)

Return Codes

Success
Failure

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrControllerModelKeyMSFT, ControllerModelPropertiesMSFT, Session

getControllerModelStateMSFT Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the specified Session.

-> ControllerModelKeyMSFT

modelKey is the model key corresponding to the controller model being queried.

-> io ControllerModelStateMSFT 

xrGetControllerModelStateMSFT - Get controller model state

Parameter Descriptions

Description

The runtime may return different state for a model key after each call to syncActions, which represents the latest state of the user interactions.

If the input modelKey is invalid, i.e. it is NULL_CONTROLLER_MODEL_KEY_MSFT or not a key returned from ControllerModelKeyStateMSFT, the runtime must return ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT.

Valid Usage (Implicit)

Return Codes

Success
Failure

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrControllerModelKeyMSFT, ControllerModelStateMSFT, Session

newtype ControllerModelKeyMSFT Source #

XrControllerModelKeyMSFT - Controller renderable model key

Description

The controller model key used to retrieve the data for the renderable controller model and associated properties and state.

See Also

NULL_CONTROLLER_MODEL_KEY_MSFT, ControllerModelKeyStateMSFT, getControllerModelPropertiesMSFT, getControllerModelStateMSFT, loadControllerModelMSFT

Instances

Instances details
Eq ControllerModelKeyMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Ord ControllerModelKeyMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Show ControllerModelKeyMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Storable ControllerModelKeyMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Zero ControllerModelKeyMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

data ControllerModelKeyStateMSFT Source #

XrControllerModelKeyStateMSFT - The model key state for a controller

Parameter Descriptions

Description

The modelKey value for the session represents a unique controller model that can be retrieved from loadControllerModelMSFT function. Therefore, the application can use modelKey to cache the returned data from loadControllerModelMSFT for the session.

A modelKey value of NULL_CONTROLLER_MODEL_KEY_MSFT, represents an invalid model key and indicates there is no controller model yet available. The application should keep calling getControllerModelKeyMSFT because the model may become available at a later point.

Valid Usage (Implicit)

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrControllerModelKeyMSFT, StructureType, getControllerModelKeyMSFT

Constructors

ControllerModelKeyStateMSFT 

Fields

Instances

Instances details
Eq ControllerModelKeyStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Show ControllerModelKeyStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Storable ControllerModelKeyStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Zero ControllerModelKeyStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

ToCStruct ControllerModelKeyStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

FromCStruct ControllerModelKeyStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

data ControllerModelNodePropertiesMSFT Source #

XrControllerModelNodePropertiesMSFT - Describes the controller model node properties

Parameter Descriptions

Description

The node can be located in the glTF node hierarchy by finding the node(s) with the matching node name and parent node name. If the parentNodeName is empty, the matching will be solely based on the nodeName.

If there are multiple nodes in the glTF file matches the condition above, the first matching node using depth-first traversal in the glTF scene should be animated and the rest should be ignored.

The runtime must not return any nodeName or parentName that doesn’t match any gltTF nodes in the corresponding controller model.

Valid Usage (Implicit)

  • type must be TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT
  • next must be NULL or a valid pointer to the next structure in a structure chain
  • parentNodeName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT
  • nodeName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT

See Also

ControllerModelPropertiesMSFT, StructureType, getControllerModelPropertiesMSFT, loadControllerModelMSFT

Constructors

ControllerModelNodePropertiesMSFT 

Fields

  • parentNodeName :: ByteString

    parentNodeName is the name of the parent node in the provided glTF file. The parent name may be empty if it should not be used to locate this node.

  • nodeName :: ByteString

    nodeName is the name of this node in the provided glTF file.

Instances

Instances details
Show ControllerModelNodePropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Storable ControllerModelNodePropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Zero ControllerModelNodePropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

ToCStruct ControllerModelNodePropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

FromCStruct ControllerModelNodePropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

data ControllerModelPropertiesMSFT Source #

XrControllerModelPropertiesMSFT - Describes the properties of a controller model

Parameter Descriptions

  • next is NULL or a pointer to the next structure in a structure chain.
  • nodeCapacityInput is the capacity of the nodeProperties array, or 0 to indicate a request to retrieve the required capacity.
  • nodeCountOutput filled in by the runtime with the count of elements in nodeProperties array, or returns the required capacity in the case that nodeCapacityInput is 0.
  • nodeProperties is a pointer to an application-allocated array that will be filled with the ControllerModelNodePropertiesMSFT values. It can be NULL if nodeCapacityInput is 0.
  • See Buffer Size Parameters chapter for a detailed description of retrieving the required nodeProperties size.

Valid Usage (Implicit)

See Also

ControllerModelNodePropertiesMSFT, StructureType, getControllerModelPropertiesMSFT, loadControllerModelMSFT

Instances

Instances details
Eq ControllerModelPropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Show ControllerModelPropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Storable ControllerModelPropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Zero ControllerModelPropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

ToCStruct ControllerModelPropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

FromCStruct ControllerModelPropertiesMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

data ControllerModelNodeStateMSFT Source #

XrControllerModelNodeStateMSFT - Describes the state of a node in a controller model

Parameter Descriptions

Description

The state is corresponding to the glTF node identified by the nodeName and nodeParentName of the node property at the same array index in the nodeProperties in ControllerModelPropertiesMSFT.

The nodePose is based on the user’s interaction on the controller at the latest syncActions, represented as the Posef of the node in it’s parent node space.

Valid Usage (Implicit)

See Also

ControllerModelStateMSFT, Posef, StructureType, getControllerModelStateMSFT

Constructors

ControllerModelNodeStateMSFT 

Fields

Instances

Instances details
Show ControllerModelNodeStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Storable ControllerModelNodeStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Zero ControllerModelNodeStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

ToCStruct ControllerModelNodeStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

FromCStruct ControllerModelNodeStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

data ControllerModelStateMSFT Source #

XrControllerModelStateMSFT - Describes the state of a controller model

Parameter Descriptions

  • next is NULL or a pointer to the next structure in a structure chain.
  • nodeCapacityInput is the capacity of the nodeStates array, or 0 to indicate a request to retrieve the required capacity.
  • nodeCountOutput filled in by the runtime with the count of elements in nodeStates array, or returns the required capacity in the case that nodeCapacityInput is 0.
  • nodeStates is a pointer to an application-allocated array that will be filled with the ControllerModelNodeStateMSFT values. It can be NULL if sourceCapacityInput is 0.
  • See Buffer Size Parameters chapter for a detailed description of retrieving the required nodeStates size.

Valid Usage (Implicit)

See Also

ControllerModelNodeStateMSFT, StructureType, getControllerModelStateMSFT

Instances

Instances details
Eq ControllerModelStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Show ControllerModelStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Storable ControllerModelStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

Zero ControllerModelStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

ToCStruct ControllerModelStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

FromCStruct ControllerModelStateMSFT Source # 
Instance details

Defined in OpenXR.Extensions.XR_MSFT_controller_model

type MSFT_CONTROLLER_MODEL_EXTENSION_NAME = "XR_MSFT_controller_model" Source #

pattern MSFT_CONTROLLER_MODEL_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #

pattern NULL_CONTROLLER_MODEL_KEY_MSFT :: forall a. Integral a => a Source #

XR_NULL_CONTROLLER_MODEL_KEY_MSFT - The value representing an invalid model key

Description

NULL_CONTROLLER_MODEL_KEY_MSFT defines an invalid model key value.

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrControllerModelKeyMSFT