Example #1
0
 public void START_TP(TelepresenceSystemConfiguration TP_config)
 {
     using (TP_program = new TelepresenceSystem(TP_config))
     {
         TP_program.Run();
         END_TPsettings();
     }
 }
Example #2
0
        public void INIT_TelepresenceConfigAndPrepareGui()
        {
            lsLogSrcSelction.UnselectAll();
            //LOG_filterIn(e_LogMsgSource.oculus);
            LOG_filterIn(e_LogMsgSource.oculus_err);

            TP_config = new TelepresenceSystemConfiguration()
            {
                ReadCameraStream = cbReadCameraStream.IsChecked.Value,

                WRITE_dataToMotors  = cbWriteMotorData.IsChecked.Value,
                READ_dataFromMotors = cbReadMotorData.IsChecked.Value,
                hud = new C_HUD()
                {
                    time         = cbHudTime.IsChecked.Value,
                    compas       = cbHudCompas.IsChecked.Value,
                    motorPosture = cbHudMotorPosture.IsChecked.Value,

                    helpMenu  = cbHudHelpMenu.IsChecked.Value,
                    toolStrip = cbHudToolStrip.IsChecked.Value,


                    gazeMark = new C_gazeMark()
                    {
                        Oculus           = cbDrawOculusGaze.IsChecked.Value,
                        MotorPostureSent = cbDrawMotorPostureSent.IsChecked.Value,
                        MotorPostureSeen = cbDrawMotorPostureSeen.IsChecked.Value,
                    }
                },

                draw = new C_SceneDraw()
                {
                    SkySurface = cbTelepresence_SkySurface.IsChecked.Value,
                    RoboticArm = cbTelepresence_RoboticArm.IsChecked.Value
                },

                cameraControl = new BaslerCameraControl()

                                //hmdType = HMDType.DK1,
            };

            if (cbStickToCameraData.IsChecked.Value == true)
            {
                TP_config.player.PositionLockActive = true;
                TP_config.player.PositionLock       = e_positionLock.cameraSensor;
            }

            TP_config.hud.time = true;

            KILL_allNotNeededGui();
        }
Example #3
0
        //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


        /// <summary>
        /// Initializes a new instance of the <see cref="TelepresenceSystem" /> class.
        /// </summary>
        public TelepresenceSystem(TelepresenceSystemConfiguration _configuration)
        {
            // configuration
            config = _configuration;
            Constructor_BaslerCamera();

            // Creates a graphics manager. This is mandatory.
            graphicsDeviceManager = new GraphicsDeviceManager(this);

            // Force no vsync and use real timestep to print actual FPS
            graphicsDeviceManager.SynchronizeWithVerticalRetrace = false;
            IsFixedTimeStep = false;


            Constructor_FPS();
            fpsClock = new Stopwatch(); // readonly


            // Input Constructor
            // all initial components should be created in game constructor
            keyboardManager = new KeyboardManager(this); // readonly
            mouseManager    = new MouseManager(this);
            Constructor_Input();

            Constructor_Sound();

            // Setup the relative directory to the executable directory
            // for loading contents with the ContentManager
            Content.RootDirectory = @"Content\Demo";

            // Initialize OVR Library
            OVR.Initialize();

            // Create our HMD
            hmd = OVR.HmdCreate(0) ?? OVR.HmdCreateDebug(HMDType.DK1);

            // Match back buffer size with HMD resolution
            graphicsDeviceManager.PreferredBackBufferWidth  = hmd.Resolution.Width;
            graphicsDeviceManager.PreferredBackBufferHeight = hmd.Resolution.Height;
        }