当前位置: 首页>>代码示例>>C#>>正文


C# VR.VREvent_t类代码示例

本文整理汇总了C#中Valve.VR.VREvent_t的典型用法代码示例。如果您正苦于以下问题:C# VREvent_t类的具体用法?C# VREvent_t怎么用?C# VREvent_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VREvent_t类属于Valve.VR命名空间,在下文中一共展示了VREvent_t类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OpenVREventArgs

 public OpenVREventArgs(VREvent_t rawEvent)
 {
     EventType = (EVREventType)rawEvent.eventType;
     DeviceIndex = (int)rawEvent.trackedDeviceIndex;
     Age = rawEvent.eventAgeSeconds;
     EventData = rawEvent.data;
 }
开发者ID:domisterwoozy,项目名称:LabBox,代码行数:7,代码来源:OpenVRInputObservable.cs

示例2: PollNextEvent

    public bool PollNextEvent(ref VREvent_t pEvent)
    {
        var overlay = OpenVR.Overlay;
        if (overlay == null)
            return false;

        var size = (uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(Valve.VR.VREvent_t));
        return overlay.PollNextOverlayEvent(handle, ref pEvent, size);
    }
开发者ID:taotetek,项目名称:HeadlessOverlayToolkit,代码行数:9,代码来源:SteamVR_Overlay.cs

示例3: PollNextEvent

 public bool PollNextEvent(ref VREvent_t pEvent)
 {
     CVROverlay overlay = OpenVR.Overlay;
     if (overlay == null)
     {
         return false;
     }
     uint uncbVREvent = (uint)Marshal.SizeOf(typeof(VREvent_t));
     return overlay.PollNextOverlayEvent(this.handle, ref pEvent, uncbVREvent);
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:10,代码来源:SteamVR_Overlay.cs

示例4: PollNextOverlayEvent

	public abstract bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent);
开发者ID:Black4Blade,项目名称:NewtonVR,代码行数:1,代码来源:openvr_api.cs

示例5: PollNextEventWithPose

	public abstract bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,ref TrackedDevicePose_t pTrackedDevicePose);
开发者ID:Black4Blade,项目名称:NewtonVR,代码行数:1,代码来源:openvr_api.cs

示例6: PollNextEvent

	public abstract bool PollNextEvent(ref VREvent_t pEvent);
开发者ID:Black4Blade,项目名称:NewtonVR,代码行数:1,代码来源:openvr_api.cs

示例7: VR_IVROverlay_PollNextOverlayEvent

	internal static extern bool VR_IVROverlay_PollNextOverlayEvent(IntPtr instancePtr, ulong ulOverlayHandle, ref VREvent_t pEvent);
开发者ID:Black4Blade,项目名称:NewtonVR,代码行数:1,代码来源:openvr_api.cs

示例8: PollNextOverlayEvent

	public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
	{
		bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent);
		return result;
	}
开发者ID:apekshadarbari,项目名称:PokerFace,代码行数:5,代码来源:openvr_api.cs

示例9: PollNextEventWithPose

	public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose)
	{
		bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose);
		return result;
	}
开发者ID:apekshadarbari,项目名称:PokerFace,代码行数:5,代码来源:openvr_api.cs

示例10: PollNextEvent

	public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
	{
		bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
		return result;
	}
开发者ID:apekshadarbari,项目名称:PokerFace,代码行数:5,代码来源:openvr_api.cs

示例11: PollOverlayEvents

 static void PollOverlayEvents(ulong handle)
 {
     if (m_cvrOverlay.HandleControllerOverlayInteractionAsMouse(handle, m_controller2ID))
     {
         //controller points to the overlay and event was generated. Unsure if the call above must be called every tick to generate event
         VREvent_t oEvent=new VREvent_t();
         uint oEventSize=(uint)Marshal.SizeOf(oEvent);
         while( m_cvrOverlay.PollNextOverlayEvent(handle,ref oEvent, oEventSize))
         {
             Log.WriteLineAndConsole("OVERLAY event (#"+oEvent.trackedDeviceIndex+"): " + oEvent.eventType.ToString() + " " + Enum.GetName(typeof(EVREventType), oEvent.eventType));
             switch(oEvent.eventType)
             {
                 case (uint)EVREventType.VREvent_MouseMove:
                     if (oEvent.trackedDeviceIndex==m_controller2ID)
                         Log.WriteLineAndConsole("  " + oEvent.data.mouse.x + "," + oEvent.data.mouse.y);
                     break;
             }
         }
     };
 }
开发者ID:ChristianHeinz71,项目名称:SpaceEngineers,代码行数:20,代码来源:MyOpenVR.cs

示例12: PollNextEvent

 public bool PollNextEvent(ref VREvent_t pEvent)
 {
     var vr = SteamVR.instance;
     return vr.overlay.PollNextOverlayEvent(handle, ref pEvent);
 }
开发者ID:asmccormick,项目名称:vive-catch,代码行数:5,代码来源:SteamVR_Overlay.cs

示例13: VR_IVRSystem_PollNextEvent

	internal static extern bool VR_IVRSystem_PollNextEvent(IntPtr instancePtr, ref VREvent_t pEvent);
开发者ID:Black4Blade,项目名称:NewtonVR,代码行数:1,代码来源:openvr_api.cs

示例14: Update

    void Update()
    {
        if (cameras.Length == 0)
        {
            enabled = false;
            return;
        }

        // Force controller update in case no one else called this frame to ensure prevState gets updated.
        SteamVR_Controller.Update();

        // Dispatch any OpenVR events.
        var vr = SteamVR.instance;
        var vrEvent = new VREvent_t();
        for (int i = 0; i < 64; i++)
        {
            if (!vr.hmd.PollNextEvent(ref vrEvent))
                break;

            switch ((EVREventType)vrEvent.eventType)
            {
                case EVREventType.VREvent_InputFocusCaptured: // another app has taken focus (likely dashboard)
                    SteamVR_Utils.Event.Send("input_focus", false);
                    break;
                case EVREventType.VREvent_InputFocusReleased: // that app has released input focus
                    SteamVR_Utils.Event.Send("input_focus", true);
                    break;
                default:
                    var name = System.Enum.GetName(typeof(EVREventType), vrEvent.eventType);
                    if (name != null)
                        SteamVR_Utils.Event.Send(name.Substring(8) /*strip VREvent_*/, vrEvent);
                    break;
            }
        }

        // Ensure various settings to minimize latency.
        Application.targetFrameRate = -1;
        Application.runInBackground = true; // don't require companion window focus
        QualitySettings.maxQueuedFrames = -1;
        QualitySettings.vSyncCount = 0; // this applies to the companion window
        Time.fixedDeltaTime = 1.0f / vr.hmd_DisplayFrequency;
    }
开发者ID:nyu-vr-research,项目名称:vive-holojam,代码行数:42,代码来源:SteamVR_Render.cs

示例15: VR_IVRSystem_PollNextEventWithPose

	internal static extern bool VR_IVRSystem_PollNextEventWithPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, ref TrackedDevicePose_t pTrackedDevicePose);
开发者ID:Black4Blade,项目名称:NewtonVR,代码行数:1,代码来源:openvr_api.cs


注:本文中的Valve.VR.VREvent_t类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。