// Use this for initialization public void Init(LiveController b, LiveControllerUI u) { liveController = b; liveUI = u; systemInfoText.text = ""; canRecordCPU = System.Environment.ProcessorCount >= 4; }
public void Init(LiveController b, LiveControllerUI panel) { liveController = b; controlPanel = panel; ETListener.Get(StartHololensSpectatorView.gameObject).onClick = OnStartHololensConnect; }
public void Init(LiveController b, LiveControllerUI panel) { liveController = b; controlPanel = panel; ETListener.Get(buttonStart.gameObject).onClick = OnStartClick; ETListener.Get(buttonStop.gameObject).onClick = OnStopClick; ETListener.Get(DownloadAnchor.gameObject).onClick = OnDownloadAnchorClick; ETListener.Get(DownloadSpatial.gameObject).onClick = OnDownloadSpatialClick; ETListener.Get(buttonOpenStatus.gameObject).onClick = OnOpenStatusPanel; ETListener.Get(buttonCloseStatus.gameObject).onClick = OnCloseStatusPanel; waitingText.text = ""; statusText.text = "Hololens offline"; statusText.color = new Color(1f, 0.5f, 0.5f); anchorLocatedText.gameObject.SetActive(false); buttonOpenStatus.gameObject.SetActive(true); buttonCloseStatus.gameObject.SetActive(false); statusPanel.gameObject.SetActive(false); hasInit = true; }
// Use this for initialization public void Init(LiveController b, LiveControllerUI u) { liveController = b; liveUI = u; EventTriggerListener.Get(MoveAnchor.gameObject).onClick = OnMoveAnchor; EventTriggerListener.Get(StartCapture.gameObject).onClick = OnStartCapture; EventTriggerListener.Get(StopCapture.gameObject).onClick = OnStopCapture; EventTriggerListener.Get(TakeSnap.gameObject).onClick = OnTakeSnap; EventTriggerListener.Get(ClosePreview.gameObject).onClick = OnShowHidePreview; EventTriggerListener.Get(FullScreen.gameObject).onClick = OnFullScreen; RefreshInput(); alphaSlider.onValueChanged.AddListener(OnAlphaSliderChange); frameOffsetInput.onValueChanged.AddListener(OnFrameOffsetInput); soundSlider.onValueChanged.AddListener(OnSoundSliderChange); antiShakeBefore.onValueChanged.AddListener(OnAntiShakeBeforeChange); antiShakeAfter.onValueChanged.AddListener(OnAntiShakeAfterChange); systemInfoText.text = ""; canRecordCPU = System.Environment.ProcessorCount >= 4; }
public void Init(LiveController b, LiveControllerUI p) { liveController = b; panel = p; }
public override void Init(LiveController b, LiveControllerUI pannel) { liveController = b; OnStartHololensConnect(); hasInit = true; }
protected override void _TurnOn() { // 加载Live配置文件 AppConfig config = AppConfig.Instance; config.LoadConfig(MEHoloConstant.LiveConfigFile); listenPort = int.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Live_Port", "8099")); listenPortUDP = int.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Live_Port_UDP", "8098")); useUDP = bool.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Use_UDP", "TRUE")); outputPath = AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Out_Put_Path", "C:\\HologramCapture"); config.LoadConfig(MEHoloConstant.CalibrationConfigFile); holoServerHost = config.GetConfigByFileName(MEHoloConstant.NetworkConfigFile, "Server_Host", "127.0.0.1"); outputPath = config.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Out_Put_Path", "./"); if (!outputPath.EndsWith("/") && !outputPath.EndsWith("\\")) { outputPath += "/"; } // 读取参数设置 if (!LiveParam.LoadParam()) { LiveParam.SoundVolume = AudioListener.volume; LiveParam.SaveParam(); } // 读取本地位置存储文件 LoadTransformByFile(); // 初始化并启动UI GameObject uiObj = PrefabUtils.CreateGameObjectToParent(this.gameObject, uiPrefab); liveUI = uiObj.GetComponent <LiveControllerUI>(); liveUI.Init(this, (float)GetFrameWidth() / (float)GetFrameHeight()); liveUI.TurnOn(); // 初始化Windows device protocal wdpController.Init(this, liveUI); // 启动Lilve摄像机 GameObject cameraObj = PrefabUtils.CreateGameObjectToParent(this.gameObject, holoCameraPrefab); holoCamera = cameraObj.GetComponent <HolographicCameraManager>(); calibrationManager = holoCamera.gameObject.AddComponent <CalibrationManager>(); calibrationManager.Init(); // 延迟启动全息摄影机 StartCoroutine(StartHoloCamera()); // Log logManager = LogManager.Instance; // 关闭主摄影机的显示 oldCameraMask = mainCamera.cullingMask; //mainCamera.cullingMask = 0; // 设置一下frameoffset SetFrameOffset(0.5f); // 停止input操作 /* * if (inputManager != null) * { * inputManager.StopCapture(); * } */ }
protected override void _TurnOn() { // 加载Live配置文件 AppConfig config = AppConfig.Instance; config.LoadConfig(MEHoloConstant.LiveConfigFile); listenPort = int.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Live_Port", "8099")); listenPortUDP = int.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Live_Port_UDP", "8098")); useUDP = bool.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Use_UDP", "TRUE")); outputPath = AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Out_Put_Path", "C:\\HologramCapture"); frameRate = int.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Frame_Rate", "60")); config.LoadConfig(MEHoloConstant.CalibrationConfigFile); holoServerHost = config.GetConfigByFileName(MEHoloConstant.NetworkConfigFile, "Server_Host", "127.0.0.1"); int.TryParse(config.GetConfigByFileName(MEHoloConstant.NetworkConfigFile, "Server_Port", "8848"), out holoServerPort); outputPath = config.GetConfigByFileName(MEHoloConstant.LiveConfigFile, "Out_Put_Path", "./"); if (!outputPath.EndsWith("/") && !outputPath.EndsWith("\\")) { outputPath += "/"; } // 读取参数设置 if (!LiveParam.LoadParam()) { LiveParam.SoundVolume = AudioListener.volume; LiveParam.SaveParam(); } // 读取本地位置存储文件 LoadTransformByFile(LoadTransType.CameraAndAnchor); // 初始化并启动UI GameObject uiObj = PrefabUtils.CreateGameObjectToParent(this.gameObject, uiPrefab); liveUI = uiObj.GetComponent <LiveControllerUI>(); liveUI.Init(this, (float)GetFrameWidth() / (float)GetFrameHeight()); liveUI.TurnOn(); // 初始化Windows device protocal wdpController.Init(this, liveUI); calibrationManager = holoCamera.gameObject.AddComponent <CalibrationManager>(); calibrationManager.Init(); // 刷新显示 // liveUI.mainPanel.RefreshFOVInput(); // 延迟启动全息摄影机 StartHoloCamera(); // Log logManager = LogManager.Instance; // 关闭主摄影机的显示 oldCameraMask = mainCamera.cullingMask; //mainCamera.cullingMask = 0; // 设置一下frameoffset SetFrameOffset(0f); // 停止input操作 /* * if (inputManager != null) * { * inputManager.StopCapture(); * } */ // 绑定Anchor回调 anchorController.AddCallbackTurnOn(OnAnchorTurnOn); anchorController.AddCallbackTurnOff(OnAnchorTurnOff); StartCoroutine(WaitForSetAlpha()); StartCoroutine(WaitForSetFilter()); }
public virtual void Init(LiveController b, LiveControllerUI ui) { }