#[repr(C)]pub struct IVRInput { /* private fields */ }
Implementations§
Source§impl IVRInput
impl IVRInput
Sourcepub unsafe fn SetActionManifestPath(
self: Pin<&mut IVRInput>,
pchActionManifestPath: *const c_char,
) -> EVRInputError
pub unsafe fn SetActionManifestPath( self: Pin<&mut IVRInput>, pchActionManifestPath: *const c_char, ) -> EVRInputError
Sets the path to the action manifest JSON file that is used by this application. If this information was set on the Steam partner site, calls to this function are ignored. If the Steam partner site setting and the path provided by this call are different, VRInputError_MismatchedActionManifest is returned. This call must be made before the first call to UpdateActionState or IVRSystem::PollNextEvent.
Sourcepub unsafe fn GetActionSetHandle(
self: Pin<&mut IVRInput>,
pchActionSetName: *const c_char,
pHandle: *mut u64,
) -> EVRInputError
pub unsafe fn GetActionSetHandle( self: Pin<&mut IVRInput>, pchActionSetName: *const c_char, pHandle: *mut u64, ) -> EVRInputError
Returns a handle for an action set. This handle is used for all performance-sensitive calls.
Sourcepub unsafe fn GetActionHandle(
self: Pin<&mut IVRInput>,
pchActionName: *const c_char,
pHandle: *mut u64,
) -> EVRInputError
pub unsafe fn GetActionHandle( self: Pin<&mut IVRInput>, pchActionName: *const c_char, pHandle: *mut u64, ) -> EVRInputError
Returns a handle for an action. This handle is used for all performance-sensitive calls.
Sourcepub unsafe fn GetInputSourceHandle(
self: Pin<&mut IVRInput>,
pchInputSourcePath: *const c_char,
pHandle: *mut u64,
) -> EVRInputError
pub unsafe fn GetInputSourceHandle( self: Pin<&mut IVRInput>, pchInputSourcePath: *const c_char, pHandle: *mut u64, ) -> EVRInputError
Returns a handle for any path in the input system. E.g. /user/hand/right
Sourcepub unsafe fn UpdateActionState(
self: Pin<&mut IVRInput>,
pSets: *mut VRActiveActionSet_t,
unSizeOfVRSelectedActionSet_t: u32,
unSetCount: u32,
) -> EVRInputError
pub unsafe fn UpdateActionState( self: Pin<&mut IVRInput>, pSets: *mut VRActiveActionSet_t, unSizeOfVRSelectedActionSet_t: u32, unSetCount: u32, ) -> EVRInputError
Reads the current state into all actions. After this call, the results of Get*Action calls will be the same until the next call to UpdateActionState.
Sourcepub unsafe fn GetDigitalActionData(
self: Pin<&mut IVRInput>,
action: u64,
pActionData: *mut InputDigitalActionData_t,
unActionDataSize: u32,
ulRestrictToDevice: u64,
) -> EVRInputError
pub unsafe fn GetDigitalActionData( self: Pin<&mut IVRInput>, action: u64, pActionData: *mut InputDigitalActionData_t, unActionDataSize: u32, ulRestrictToDevice: u64, ) -> EVRInputError
Reads the state of a digital action given its handle. This will return VRInputError_WrongType if the type of action is something other than digital
Sourcepub unsafe fn GetAnalogActionData(
self: Pin<&mut IVRInput>,
action: u64,
pActionData: *mut InputAnalogActionData_t,
unActionDataSize: u32,
ulRestrictToDevice: u64,
) -> EVRInputError
pub unsafe fn GetAnalogActionData( self: Pin<&mut IVRInput>, action: u64, pActionData: *mut InputAnalogActionData_t, unActionDataSize: u32, ulRestrictToDevice: u64, ) -> EVRInputError
Reads the state of an analog action given its handle. This will return VRInputError_WrongType if the type of action is something other than analog
Sourcepub unsafe fn GetPoseActionDataRelativeToNow(
self: Pin<&mut IVRInput>,
action: u64,
eOrigin: ETrackingUniverseOrigin,
fPredictedSecondsFromNow: f32,
pActionData: *mut InputPoseActionData_t,
unActionDataSize: u32,
ulRestrictToDevice: u64,
) -> EVRInputError
pub unsafe fn GetPoseActionDataRelativeToNow( self: Pin<&mut IVRInput>, action: u64, eOrigin: ETrackingUniverseOrigin, fPredictedSecondsFromNow: f32, pActionData: *mut InputPoseActionData_t, unActionDataSize: u32, ulRestrictToDevice: u64, ) -> EVRInputError
Reads the state of a pose action given its handle for the number of seconds relative to now. This will generally be called with negative times from the fUpdateTime fields in other actions.
Sourcepub unsafe fn GetPoseActionDataForNextFrame(
self: Pin<&mut IVRInput>,
action: u64,
eOrigin: ETrackingUniverseOrigin,
pActionData: *mut InputPoseActionData_t,
unActionDataSize: u32,
ulRestrictToDevice: u64,
) -> EVRInputError
pub unsafe fn GetPoseActionDataForNextFrame( self: Pin<&mut IVRInput>, action: u64, eOrigin: ETrackingUniverseOrigin, pActionData: *mut InputPoseActionData_t, unActionDataSize: u32, ulRestrictToDevice: u64, ) -> EVRInputError
Reads the state of a pose action given its handle. The returned values will match the values returned by the last call to IVRCompositor::WaitGetPoses().
Sourcepub unsafe fn GetSkeletalActionData(
self: Pin<&mut IVRInput>,
action: u64,
pActionData: *mut InputSkeletalActionData_t,
unActionDataSize: u32,
) -> EVRInputError
pub unsafe fn GetSkeletalActionData( self: Pin<&mut IVRInput>, action: u64, pActionData: *mut InputSkeletalActionData_t, unActionDataSize: u32, ) -> EVRInputError
Reads the state of a skeletal action given its handle.
Sourcepub unsafe fn GetDominantHand(
self: Pin<&mut IVRInput>,
peDominantHand: *mut ETrackedControllerRole,
) -> EVRInputError
pub unsafe fn GetDominantHand( self: Pin<&mut IVRInput>, peDominantHand: *mut ETrackedControllerRole, ) -> EVRInputError
Returns the current dominant hand for the user for this application. This function will only return success for applications which include “supports_dominant_hand_setting”: true in their action manifests. The dominant hand will only change after a call to UpdateActionState, and the action data returned after that point will use the new dominant hand.
Sourcepub fn SetDominantHand(
self: Pin<&mut IVRInput>,
eDominantHand: ETrackedControllerRole,
) -> EVRInputError
pub fn SetDominantHand( self: Pin<&mut IVRInput>, eDominantHand: ETrackedControllerRole, ) -> EVRInputError
Sets the dominant hand for the user for this application.
Sourcepub unsafe fn GetBoneCount(
self: Pin<&mut IVRInput>,
action: u64,
pBoneCount: *mut u32,
) -> EVRInputError
pub unsafe fn GetBoneCount( self: Pin<&mut IVRInput>, action: u64, pBoneCount: *mut u32, ) -> EVRInputError
Reads the number of bones in skeleton associated with the given action
Sourcepub unsafe fn GetBoneHierarchy(
self: Pin<&mut IVRInput>,
action: u64,
pParentIndices: *mut i32,
unIndexArayCount: u32,
) -> EVRInputError
pub unsafe fn GetBoneHierarchy( self: Pin<&mut IVRInput>, action: u64, pParentIndices: *mut i32, unIndexArayCount: u32, ) -> EVRInputError
Fills the given array with the index of each bone’s parent in the skeleton associated with the given action
Sourcepub unsafe fn GetBoneName(
self: Pin<&mut IVRInput>,
action: u64,
nBoneIndex: i32,
pchBoneName: *mut c_char,
unNameBufferSize: u32,
) -> EVRInputError
pub unsafe fn GetBoneName( self: Pin<&mut IVRInput>, action: u64, nBoneIndex: i32, pchBoneName: *mut c_char, unNameBufferSize: u32, ) -> EVRInputError
Fills the given buffer with the name of the bone at the given index in the skeleton associated with the given action
Sourcepub unsafe fn GetSkeletalReferenceTransforms(
self: Pin<&mut IVRInput>,
action: u64,
eTransformSpace: EVRSkeletalTransformSpace,
eReferencePose: EVRSkeletalReferencePose,
pTransformArray: *mut VRBoneTransform_t,
unTransformArrayCount: u32,
) -> EVRInputError
pub unsafe fn GetSkeletalReferenceTransforms( self: Pin<&mut IVRInput>, action: u64, eTransformSpace: EVRSkeletalTransformSpace, eReferencePose: EVRSkeletalReferencePose, pTransformArray: *mut VRBoneTransform_t, unTransformArrayCount: u32, ) -> EVRInputError
Fills the given buffer with the transforms for a specific static skeletal reference pose
Sourcepub unsafe fn GetSkeletalTrackingLevel(
self: Pin<&mut IVRInput>,
action: u64,
pSkeletalTrackingLevel: *mut EVRSkeletalTrackingLevel,
) -> EVRInputError
pub unsafe fn GetSkeletalTrackingLevel( self: Pin<&mut IVRInput>, action: u64, pSkeletalTrackingLevel: *mut EVRSkeletalTrackingLevel, ) -> EVRInputError
Reads the level of accuracy to which the controller is able to track the user to recreate a skeletal pose
Sourcepub unsafe fn GetSkeletalBoneData(
self: Pin<&mut IVRInput>,
action: u64,
eTransformSpace: EVRSkeletalTransformSpace,
eMotionRange: EVRSkeletalMotionRange,
pTransformArray: *mut VRBoneTransform_t,
unTransformArrayCount: u32,
) -> EVRInputError
pub unsafe fn GetSkeletalBoneData( self: Pin<&mut IVRInput>, action: u64, eTransformSpace: EVRSkeletalTransformSpace, eMotionRange: EVRSkeletalMotionRange, pTransformArray: *mut VRBoneTransform_t, unTransformArrayCount: u32, ) -> EVRInputError
Reads the state of the skeletal bone data associated with this action and copies it into the given buffer.
Sourcepub unsafe fn GetSkeletalSummaryData(
self: Pin<&mut IVRInput>,
action: u64,
eSummaryType: EVRSummaryType,
pSkeletalSummaryData: *mut VRSkeletalSummaryData_t,
) -> EVRInputError
pub unsafe fn GetSkeletalSummaryData( self: Pin<&mut IVRInput>, action: u64, eSummaryType: EVRSummaryType, pSkeletalSummaryData: *mut VRSkeletalSummaryData_t, ) -> EVRInputError
Reads summary information about the current pose of the skeleton associated with the given action.
Sourcepub unsafe fn GetSkeletalBoneDataCompressed(
self: Pin<&mut IVRInput>,
action: u64,
eMotionRange: EVRSkeletalMotionRange,
pvCompressedData: *mut c_void,
unCompressedSize: u32,
punRequiredCompressedSize: *mut u32,
) -> EVRInputError
pub unsafe fn GetSkeletalBoneDataCompressed( self: Pin<&mut IVRInput>, action: u64, eMotionRange: EVRSkeletalMotionRange, pvCompressedData: *mut c_void, unCompressedSize: u32, punRequiredCompressedSize: *mut u32, ) -> EVRInputError
Reads the state of the skeletal bone data in a compressed form that is suitable for sending over the network. The required buffer size will never exceed ( sizeof(VR_BoneTransform_t)*boneCount + 2). Usually the size will be much smaller.
Sourcepub unsafe fn DecompressSkeletalBoneData(
self: Pin<&mut IVRInput>,
pvCompressedBuffer: *const c_void,
unCompressedBufferSize: u32,
eTransformSpace: EVRSkeletalTransformSpace,
pTransformArray: *mut VRBoneTransform_t,
unTransformArrayCount: u32,
) -> EVRInputError
pub unsafe fn DecompressSkeletalBoneData( self: Pin<&mut IVRInput>, pvCompressedBuffer: *const c_void, unCompressedBufferSize: u32, eTransformSpace: EVRSkeletalTransformSpace, pTransformArray: *mut VRBoneTransform_t, unTransformArrayCount: u32, ) -> EVRInputError
Turns a compressed buffer from GetSkeletalBoneDataCompressed and turns it back into a bone transform array.
Sourcepub fn TriggerHapticVibrationAction(
self: Pin<&mut IVRInput>,
action: u64,
fStartSecondsFromNow: f32,
fDurationSeconds: f32,
fFrequency: f32,
fAmplitude: f32,
ulRestrictToDevice: u64,
) -> EVRInputError
pub fn TriggerHapticVibrationAction( self: Pin<&mut IVRInput>, action: u64, fStartSecondsFromNow: f32, fDurationSeconds: f32, fFrequency: f32, fAmplitude: f32, ulRestrictToDevice: u64, ) -> EVRInputError
Triggers a haptic event as described by the specified action
Sourcepub unsafe fn GetActionOrigins(
self: Pin<&mut IVRInput>,
actionSetHandle: u64,
digitalActionHandle: u64,
originsOut: *mut u64,
originOutCount: u32,
) -> EVRInputError
pub unsafe fn GetActionOrigins( self: Pin<&mut IVRInput>, actionSetHandle: u64, digitalActionHandle: u64, originsOut: *mut u64, originOutCount: u32, ) -> EVRInputError
Retrieve origin handles for an action
Sourcepub unsafe fn GetOriginLocalizedName(
self: Pin<&mut IVRInput>,
origin: u64,
pchNameArray: *mut c_char,
unNameArraySize: u32,
unStringSectionsToInclude: i32,
) -> EVRInputError
pub unsafe fn GetOriginLocalizedName( self: Pin<&mut IVRInput>, origin: u64, pchNameArray: *mut c_char, unNameArraySize: u32, unStringSectionsToInclude: i32, ) -> EVRInputError
Retrieves the name of the origin in the current language. unStringSectionsToInclude is a bitfield of values in EVRInputStringBits that allows the application to specify which parts of the origin’s information it wants a string for.
Sourcepub unsafe fn GetOriginTrackedDeviceInfo(
self: Pin<&mut IVRInput>,
origin: u64,
pOriginInfo: *mut InputOriginInfo_t,
unOriginInfoSize: u32,
) -> EVRInputError
pub unsafe fn GetOriginTrackedDeviceInfo( self: Pin<&mut IVRInput>, origin: u64, pOriginInfo: *mut InputOriginInfo_t, unOriginInfoSize: u32, ) -> EVRInputError
Retrieves useful information for the origin of this action
Sourcepub unsafe fn GetActionBindingInfo(
self: Pin<&mut IVRInput>,
action: u64,
pOriginInfo: *mut InputBindingInfo_t,
unBindingInfoSize: u32,
unBindingInfoCount: u32,
punReturnedBindingInfoCount: *mut u32,
) -> EVRInputError
pub unsafe fn GetActionBindingInfo( self: Pin<&mut IVRInput>, action: u64, pOriginInfo: *mut InputBindingInfo_t, unBindingInfoSize: u32, unBindingInfoCount: u32, punReturnedBindingInfoCount: *mut u32, ) -> EVRInputError
Retrieves useful information about the bindings for an action
Sourcepub fn ShowActionOrigins(
self: Pin<&mut IVRInput>,
actionSetHandle: u64,
ulActionHandle: u64,
) -> EVRInputError
pub fn ShowActionOrigins( self: Pin<&mut IVRInput>, actionSetHandle: u64, ulActionHandle: u64, ) -> EVRInputError
Shows the current binding for the action in-headset
Sourcepub unsafe fn ShowBindingsForActionSet(
self: Pin<&mut IVRInput>,
pSets: *mut VRActiveActionSet_t,
unSizeOfVRSelectedActionSet_t: u32,
unSetCount: u32,
originToHighlight: u64,
) -> EVRInputError
pub unsafe fn ShowBindingsForActionSet( self: Pin<&mut IVRInput>, pSets: *mut VRActiveActionSet_t, unSizeOfVRSelectedActionSet_t: u32, unSetCount: u32, originToHighlight: u64, ) -> EVRInputError
Shows the current binding all the actions in the specified action sets
Sourcepub unsafe fn GetComponentStateForBinding(
self: Pin<&mut IVRInput>,
pchRenderModelName: *const c_char,
pchComponentName: *const c_char,
pOriginInfo: *const InputBindingInfo_t,
unBindingInfoSize: u32,
unBindingInfoCount: u32,
pComponentState: *mut RenderModel_ComponentState_t,
) -> EVRInputError
pub unsafe fn GetComponentStateForBinding( self: Pin<&mut IVRInput>, pchRenderModelName: *const c_char, pchComponentName: *const c_char, pOriginInfo: *const InputBindingInfo_t, unBindingInfoSize: u32, unBindingInfoCount: u32, pComponentState: *mut RenderModel_ComponentState_t, ) -> EVRInputError
Use this to query what action on the component returned by GetOriginTrackedDeviceInfo would trigger this binding.
pub fn IsUsingLegacyInput(self: Pin<&mut IVRInput>) -> bool
Sourcepub unsafe fn OpenBindingUI(
self: Pin<&mut IVRInput>,
pchAppKey: *const c_char,
ulActionSetHandle: u64,
ulDeviceHandle: u64,
bShowOnDesktop: bool,
) -> EVRInputError
pub unsafe fn OpenBindingUI( self: Pin<&mut IVRInput>, pchAppKey: *const c_char, ulActionSetHandle: u64, ulDeviceHandle: u64, bShowOnDesktop: bool, ) -> EVRInputError
Opens the binding user interface. If no app key is provided it will use the key from the calling process. If no set is provided it will open to the root of the app binding page.
Sourcepub unsafe fn GetBindingVariant(
self: Pin<&mut IVRInput>,
ulDevicePath: u64,
pchVariantArray: *mut c_char,
unVariantArraySize: u32,
) -> EVRInputError
pub unsafe fn GetBindingVariant( self: Pin<&mut IVRInput>, ulDevicePath: u64, pchVariantArray: *mut c_char, unVariantArraySize: u32, ) -> EVRInputError
Returns the variant set in the current bindings. If the binding doesn’t include a variant setting, this function will return an empty string
Trait Implementations§
Source§impl ExternType for IVRInput
impl ExternType for IVRInput
Source§impl MakeCppStorage for IVRInput
impl MakeCppStorage for IVRInput
impl UniquePtrTarget for IVRInput
impl VectorElement for IVRInput
impl WeakPtrTarget for IVRInput
Auto Trait Implementations§
impl !Freeze for IVRInput
impl RefUnwindSafe for IVRInput
impl !Send for IVRInput
impl !Sync for IVRInput
impl !Unpin for IVRInput
impl UnwindSafe for IVRInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.