コード例 #1
0
    // Use this for initialization
    void Start()
    {
        Application.targetFrameRate = TargetFrameRate;
        if (OculusCamera == null)       //Try to find OVRCameraRig component
        {
            OculusCamera = GameObject.FindObjectOfType <OVRCameraRig> ();
        }

        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        if (Configuration == null)
        {
            _customConfigurations = true;
            Configuration         = gameObject.AddComponent <TELUBeeConfiguration> ();
        }
        else
        {
            _customConfigurations = false;
        }

        Init();

        if (Debugger != null)
        {
            //		Debugger.AddDebugElement(new DebugCameraSettings(Configuration));
        }


        RobotConnector.AddDependencyNode(this);

        //	GStreamerCore.Ref ();
    }
コード例 #2
0
 void StartRobot(RobotConnectionComponent r)
 {
     if(!r.IsRobotStarted())
         r.StartUpdate();
     else
         r.EndUpdate();
 }
コード例 #3
0
ファイル: TxKitEyes.cs プロジェクト: red-pencil/ISWC18
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        if (Configuration == null)
        {
            _customConfigurations = true;
            Configuration         = gameObject.AddComponent <TELUBeeConfiguration> ();
        }
        else
        {
            _customConfigurations = false;
        }

        Init();

        if (Debugger != null)
        {
            //		Debugger.AddDebugElement(new DebugCameraSettings(Configuration));
        }


        RobotConnector.AddDependencyNode(this);

        //	GStreamerCore.Ref ();
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     _impl = new ImplSinHeadController();
     Robot = GetComponent <RobotConnectionComponent> ();
     Body  = GetComponent <TxKitBody> ();
     Robot.AddDependencyNode(this);
 }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     _manager = GameObject.FindObjectOfType <PresenceLayerManagerComponent> ();
     _robot   = GetComponent <RobotConnectionComponent> ();
     _robot.AddDependencyNode(this);
     _body = _robot.gameObject.GetComponent <TxKitBody> ();
 }
コード例 #6
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent>();
        }
        _isConnected = false;
        _handsPort   = 7010;
        //if (HandRenderer == null)
        //	HandRenderer = GetComponent<LeapMotionRenderer> ();
        RobotConnector.AddDependencyNode(this);

        if (RobotConnector.IsRobotStarted())
        {
            OnRobotConnected(RobotConnector.Robot, RobotConnector.Ports);
        }

        if (SourceImage == null)
        {
            SourceImage = Utilities.WhiteTexture;
        }

        _imageGrabber = new GstUnityImageGrabber();
        //         _textureSource = new WebCamTexture(1280,720);
        //         _textureSource.Play();
    }
コード例 #7
0
 public override void OnInputDisconnected(NodeBase src, string srcSlotName, string targetSlotName)
 {
     base.OnInputDisconnected(src, srcSlotName, targetSlotName);
     if (targetSlotName == "set_Robot")
     {
         Robot = null;
     }
 }
コード例 #8
0
ファイル: TxKitEars.cs プロジェクト: mrayy/TxKit
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        RobotConnector.AddDependencyNode(this);
    }
コード例 #9
0
 void StartRobot(RobotConnectionComponent r)
 {
     if (!r.IsRobotStarted())
     {
         r.StartUpdate(false);
     }
     else
     {
         r.EndUpdate();
     }
 }
コード例 #10
0
 void Connect(RobotConnectionComponent r)
 {
     if (!r.IsConnected)
     {
         r.ConnectRobot();
     }
     else
     {
         r.DisconnectRobot();
     }
 }
コード例 #11
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        switch (HeadControllerType)
        {
        case AppManager.HeadControllerType.Oculus:
            HeadController = new OculusHeadController();
            break;

                        #if STEAMVR_ENABLED
        case AppManager.HeadControllerType.SteamVR:
            HeadController = new SteamVRHeadController();
            break;
                        #endif
        case AppManager.HeadControllerType.Keyboard:
            HeadController = new KeyboardHeadController();
            break;

        case AppManager.HeadControllerType.Custom:
            break;

        default:
            HeadController = new OculusHeadController();
            break;
        }
        switch (BaseControllerType)
        {
        case AppManager.BaseControllerType.None:
            BaseController = null;
            break;

        case AppManager.BaseControllerType.Oculus:
        default:
            BaseController = new OculusBaseController();
            break;
        }


        RobotConnector.AddDependencyNode(this);
    }
コード例 #12
0
 public DebugRobotStatus(RobotConnectionComponent r)
 {
     Robot = r;
 }
コード例 #13
0
 public DebugRobotStatus(RobotConnectionComponent r)
 {
     Robot = r;
     Body  = r.GetComponent <TxKitBody> ();
 }
コード例 #14
0
 void Connect(RobotConnectionComponent r)
 {
     if(!r.IsConnected)
         r.ConnectRobot();
     else r.DisconnectRobot();
 }