Struct IVRInput

Source
#[repr(C)]
pub struct IVRInput { /* private fields */ }

Implementations§

Source§

impl IVRInput

Source

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.

Source

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.

Source

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.

Source

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

Source

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.

Source

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

Source

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

Source

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.

Source

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().

Source

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.

Source

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.

Source

pub fn SetDominantHand( self: Pin<&mut IVRInput>, eDominantHand: ETrackedControllerRole, ) -> EVRInputError

Sets the dominant hand for the user for this application.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

pub unsafe fn GetActionOrigins( self: Pin<&mut IVRInput>, actionSetHandle: u64, digitalActionHandle: u64, originsOut: *mut u64, originOutCount: u32, ) -> EVRInputError

Retrieve origin handles for an action

Source

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.

Source

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

Source

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

Source

pub fn ShowActionOrigins( self: Pin<&mut IVRInput>, actionSetHandle: u64, ulActionHandle: u64, ) -> EVRInputError

Shows the current binding for the action in-headset

Source

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

Source

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.

Source

pub fn IsUsingLegacyInput(self: Pin<&mut IVRInput>) -> bool

Source

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.

Source

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 Drop for IVRInput

Source§

fn drop(self: &mut IVRInput)

Synthesized destructor.

Source§

impl ExternType for IVRInput

Source§

type Kind = Opaque

Source§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

impl MakeCppStorage for IVRInput

Source§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut IVRInput

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
Source§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut IVRInput)

Frees a C++ allocation which has not yet had a constructor called. Read more
Source§

impl SharedPtrTarget for IVRInput

Source§

impl UniquePtrTarget for IVRInput

Source§

impl VectorElement for IVRInput

Source§

impl WeakPtrTarget for IVRInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.