openVR驱动接口之IServerDriverHost简介

来源:互联网 发布:行程助手软件 编辑:程序博客网 时间:2024/05/22 21:30

IServerDriverHost

这个接口由vrserver提供,用来允许驱动向系统发送通知事件.这些事件不能是修改序列号或设备的类型,因为这些值永久与设备相关联.
bool TrackedDeviceAdded( const char *pchDeviceSerialNumber )
告诉server一个追踪设备已经被添加.如果这个函数返回true,server将对这个设备调用activate.如果它返回错误,那么设备就不会执行activated.
void TrackedDevicePoseUpdated( uint32_t unWhichDevice, const DriverPose_t & newPose )
告诉server追踪设备的姿态已经更新.
void TrackedDevicePropertiesChanged( uint32_t unWhichDevice )
告诉server特定的设备的属性已经改变.
void VsyncEvent( double vsyncTimeOffsetSeconds )
告诉server设备的帧同步信号已经触发.HMD类型的设备才会允许触发这个事件
void TrackedDeviceButtonPressed( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset )
告诉server按键按下.
void TrackedDeviceButtonUnpressed( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset )
告诉server按键弹起.
void TrackedDeviceButtonTouched( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset )
告诉server按键按下.
void TrackedDeviceButtonUntouched( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset )
告诉server按键弹起(和上面区别,一个是控制板的触摸/放开,一个是按键的按下/弹起).
void TrackedDeviceAxisUpdated( uint32_t unWhichDevice, uint32_t unWhichAxis, const VRControllerAxis_t & axisState )
告诉server控制器轴(X,Y)的变化.
void MCImageUpdated()
告诉server MC图像已经更新,这个HMD类型的设备才允许上报此事件.
IVRSettings *GetSettings( const char *pchInterfaceVersion )
总是返回一个指向可用的IVRSettings接口.
void PhysicalIpdSet( uint32_t unWhichDevice, float fPhysicalIpdMeters
告诉server,HMD的物理IPD值已经变化.
void ProximitySensorState( uint32_t unWhichDevice, bool bProximitySensorTriggered )
告诉server,距离传感器的状态变化.
void VendorSpecificEvent( uint32_t unWhichDevice, vr::EVREventType eventType, const VREvent_Data_t & eventData, double eventTimeOffset )
发送一些厂商特定的事件(VREvent_VendorSpecific_Reserved_Start到VREvent_VendorSpecific_Reserved_End之间的事件).
bool IsExiting()
如果steamVR存在,则返回true.

0 0
原创粉丝点击