Class MSFTControllerModel
- java.lang.Object
-
- org.lwjgl.openxr.MSFTControllerModel
-
public class MSFTControllerModel extends java.lang.ObjectThe MSFT_controller_model extension.
-
-
Field Summary
Fields Modifier and Type Field Description static intXR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFTExtendsXrResult.static intXR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFTXR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFTstatic java.lang.StringXR_MSFT_CONTROLLER_MODEL_EXTENSION_NAMEThe extension name.static intXR_MSFT_controller_model_SPEC_VERSIONThe extension specification version.static longXR_NULL_CONTROLLER_MODEL_KEY_MSFTAPI Constantsstatic intXR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT
XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT
XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT
XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT
XR_TYPE_CONTROLLER_MODEL_STATE_MSFTExtendsXrStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnxrGetControllerModelKeyMSFT(XrSession session, long topLevelUserPath, long controllerModelKeyState)Unsafe version of:GetControllerModelKeyMSFTstatic intnxrGetControllerModelPropertiesMSFT(XrSession session, long modelKey, long properties)Unsafe version of:GetControllerModelPropertiesMSFTstatic intnxrGetControllerModelStateMSFT(XrSession session, long modelKey, long state)Unsafe version of:GetControllerModelStateMSFTstatic intnxrLoadControllerModelMSFT(XrSession session, long modelKey, int bufferCapacityInput, long bufferCountOutput, long buffer)Unsafe version of:LoadControllerModelMSFTstatic intxrGetControllerModelKeyMSFT(XrSession session, long topLevelUserPath, XrControllerModelKeyStateMSFT controllerModelKeyState)Retrieve the model key for the controller.static intxrGetControllerModelPropertiesMSFT(XrSession session, long modelKey, XrControllerModelPropertiesMSFT properties)Get controller model properties.static intxrGetControllerModelStateMSFT(XrSession session, long modelKey, XrControllerModelStateMSFT state)Get controller model state.static intxrLoadControllerModelMSFT(XrSession session, long modelKey, java.nio.IntBuffer bufferCountOutput, java.nio.ByteBuffer buffer)Load controller render model.
-
-
-
Field Detail
-
XR_MSFT_controller_model_SPEC_VERSION
The extension specification version.
-
XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME
The extension name.
-
XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT
XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT
-
XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT, XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT, XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT, XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT, XR_TYPE_CONTROLLER_MODEL_STATE_MSFT
-
XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT
ExtendsXrResult.
-
XR_NULL_CONTROLLER_MODEL_KEY_MSFT
API Constants
-
-
Method Detail
-
nxrGetControllerModelKeyMSFT
public static int nxrGetControllerModelKeyMSFT(XrSession session, long topLevelUserPath, long controllerModelKeyState)
Unsafe version of:GetControllerModelKeyMSFT
-
xrGetControllerModelKeyMSFT
public static int xrGetControllerModelKeyMSFT(XrSession session, long topLevelUserPath, XrControllerModelKeyStateMSFT controllerModelKeyState)
Retrieve the model key for the controller.C Specification
GetControllerModelKeyMSFTretrieves theXrControllerModelKeyMSFTfor a controller. This model key may later be used to retrieve the model data.The
GetControllerModelKeyMSFTfunction is defined as:XrResult xrGetControllerModelKeyMSFT( XrSession session, XrPath topLevelUserPath, XrControllerModelKeyStateMSFT* controllerModelKeyState);Valid Usage (Implicit)
- The
XR_MSFT_controller_modelextension must be enabled prior to callingGetControllerModelKeyMSFT sessionmust be a validXrSessionhandlecontrollerModelKeyStatemust be a pointer to anXrControllerModelKeyStateMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the specifiedXrSession.topLevelUserPath- the top level user path corresponding to the controller render model being queried (e.g. pathname:/user/hand/left or pathname:/user/hand/right).controllerModelKeyState- a pointer to theXrControllerModelKeyStateMSFTto write the model key state to.
- The
-
nxrLoadControllerModelMSFT
public static int nxrLoadControllerModelMSFT(XrSession session, long modelKey, int bufferCapacityInput, long bufferCountOutput, long buffer)
Unsafe version of:LoadControllerModelMSFT- Parameters:
bufferCapacityInput- the capacity of thebufferarray, or 0 to indicate a request to retrieve the required capacity.
-
xrLoadControllerModelMSFT
public static int xrLoadControllerModelMSFT(XrSession session, long modelKey, java.nio.IntBuffer bufferCountOutput, @Nullable java.nio.ByteBuffer buffer)
Load controller render model.C Specification
The
LoadControllerModelMSFTfunction loads the controller model as a byte buffer containing a binary form of glTF (a.k.a GLB file format) for the controller. The binary glTF data must conform to glTF 2.0 format defined at https://github.com/KhronosGroup/glTF/tree/master/specification/2.0.XrResult xrLoadControllerModelMSFT( XrSession session, XrControllerModelKeyMSFT modelKey, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, uint8_t* buffer);Description
The
LoadControllerModelMSFTfunction may be a slow operation and therefore should be invoked from a non-timing critical thread.If the input
modelKeyis invalid, i.e. it isNULL_CONTROLLER_MODEL_KEY_MSFTor not a key returned fromXrControllerModelKeyStateMSFT, the runtime must returnERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT.Valid Usage (Implicit)
- The
XR_MSFT_controller_modelextension must be enabled prior to callingLoadControllerModelMSFT sessionmust be a validXrSessionhandlebufferCountOutputmust be a pointer to auint32_tvalue- If
bufferCapacityInputis not 0,buffermust be a pointer to an array ofbufferCapacityInputuint8_tvalues
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- the specifiedXrSession.modelKey- the model key corresponding to the controller render model being queried.bufferCountOutput- filled in by the runtime with the count of elements inbufferarray, or returns the required capacity in the case thatbufferCapacityInputis 0.buffer- a pointer to an application-allocated array of the model for the device that will be filled with theuint8_tvalues by the runtime. It can beNULLifbufferCapacityInputis 0.
- The
-
nxrGetControllerModelPropertiesMSFT
public static int nxrGetControllerModelPropertiesMSFT(XrSession session, long modelKey, long properties)
Unsafe version of:GetControllerModelPropertiesMSFT
-
xrGetControllerModelPropertiesMSFT
public static int xrGetControllerModelPropertiesMSFT(XrSession session, long modelKey, XrControllerModelPropertiesMSFT properties)
Get controller model properties.C Specification
The
GetControllerModelPropertiesMSFTfunction returns the controller model properties for a givenmodelKey.XrResult xrGetControllerModelPropertiesMSFT( XrSession session, XrControllerModelKeyMSFT modelKey, XrControllerModelPropertiesMSFT* properties);Description
The runtime must return the same data in
XrControllerModelPropertiesMSFTfor a validmodelKey. Therefore, the application can cache the returnedXrControllerModelPropertiesMSFTusingmodelKeyand reuse the data for each frame.If the input
modelKeyis invalid, i.e. it isNULL_CONTROLLER_MODEL_KEY_MSFTor not a key returned fromXrControllerModelKeyStateMSFT, the runtime must returnERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT.Valid Usage (Implicit)
- The
XR_MSFT_controller_modelextension must be enabled prior to callingGetControllerModelPropertiesMSFT sessionmust be a validXrSessionhandlepropertiesmust be a pointer to anXrControllerModelPropertiesMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the specifiedXrSession.modelKey- a valid model key obtained fromXrControllerModelKeyStateMSFTproperties- anXrControllerModelPropertiesMSFTreturning the properties of the controller model
- The
-
nxrGetControllerModelStateMSFT
public static int nxrGetControllerModelStateMSFT(XrSession session, long modelKey, long state)
Unsafe version of:GetControllerModelStateMSFT
-
xrGetControllerModelStateMSFT
public static int xrGetControllerModelStateMSFT(XrSession session, long modelKey, XrControllerModelStateMSFT state)
Get controller model state.C Specification
The
GetControllerModelStateMSFTfunction returns the current state of the controller model representing user’s interaction to the controller, such as pressing a button or pulling a trigger.XrResult xrGetControllerModelStateMSFT( XrSession session, XrControllerModelKeyMSFT modelKey, XrControllerModelStateMSFT* state);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
modelKeyis invalid, i.e. it isNULL_CONTROLLER_MODEL_KEY_MSFTor not a key returned fromXrControllerModelKeyStateMSFT, the runtime must returnERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT.Valid Usage (Implicit)
- The
XR_MSFT_controller_modelextension must be enabled prior to callingGetControllerModelStateMSFT sessionmust be a validXrSessionhandlestatemust be a pointer to anXrControllerModelStateMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the specifiedXrSession.modelKey- the model key corresponding to the controller model being queried.state- a pointer toXrControllerModelNodeStateMSFTreturns the current controller model state.
- The
-
-