Exemplo n.º 1
0
        /// <summary>
        /// Allows to execute custom logic during the initialization of this instance.
        /// </summary>
        /// <exception cref="System.Exception">Invalid configure rendering</exception>
        protected override void Initialize()
        {
            base.Initialize();

            this.mixedRealityService = WaveServices.GetService <MixedRealityService>();
            this.spatialInputService = WaveServices.GetService <SpatialInputService>();
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            base.Initialize();

            _hololensService     = WaveServices.GetService <HololensService>();
            _spatialInputManager = WaveServices.GetService <SpatialInputService>();
        }
Exemplo n.º 3
0
        protected override void Initialize()
        {
            base.Initialize();

            this.hololensService = WaveServices.GetService<HololensService>();
            this.spatialInputManager = WaveServices.GetService<SpatialInputService>();

            this.PlaceEntity();
        }
Exemplo n.º 4
0
        protected override void Initialize()
        {
            base.Initialize();

            this.hololensService     = WaveServices.GetService <HololensService>();
            this.spatialInputManager = WaveServices.GetService <SpatialInputService>();

            this.PlaceEntity();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Resolved dependencies method
        /// </summary>
        protected override void ResolveDependencies()
        {
            base.ResolveDependencies();

            this.Owner.RemoveChild("Undetected");
            this.Owner.RemoveChild("Ready");
            this.Owner.RemoveChild("AirTap");

            if (!string.IsNullOrEmpty(this.UndetectedPrefab))
            {
                this.UndetectedEntity = this.EntityManager.Instantiate(this.UndetectedPrefab);
                this.UndetectedEntity.IsSerializable = false;
                this.Owner.AddChild(this.UndetectedEntity);
            }

            if (!string.IsNullOrEmpty(this.ReadyPrefab))
            {
                this.ReadyEntity = this.EntityManager.Instantiate(this.ReadyPrefab);
                this.ReadyEntity.IsSerializable = false;
                this.Owner.AddChild(this.ReadyEntity);
            }

            if (!string.IsNullOrEmpty(this.AirTapPrefab))
            {
                this.AirTapEntity = this.EntityManager.Instantiate(this.AirTapPrefab);
                this.AirTapEntity.IsSerializable = false;
                this.Owner.AddChild(this.AirTapEntity);
            }

            this.spatialInputService = WaveServices.GetService <SpatialInputService>();
            if (this.spatialInputService == null)
            {
                Debug.WriteLine("You need to register the SpatialInputServices before to use the cursor");
            }

            this.collisioner = this.Owner.FindComponent <GazeCollision>();
            this.stabilizer  = this.Owner.FindComponent <GazeStabilizer>();
            this.indicator   = this.Owner.FindComponent <GazeIndicator>();
        }
Exemplo n.º 6
0
        /// <summary>
        /// Resolved dependencies method
        /// </summary>
        protected override void ResolveDependencies()
        {
            base.ResolveDependencies();

            this.Owner.RemoveChild("Undetected");
            this.Owner.RemoveChild("Ready");
            this.Owner.RemoveChild("AirTap");

            if (!string.IsNullOrEmpty(this.UndetectedPrefab))
            {
                this.UndetectedEntity = this.EntityManager.Instantiate(this.UndetectedPrefab);
                this.UndetectedEntity.IsSerializable = false;
                this.Owner.AddChild(this.UndetectedEntity);
            }

            if (!string.IsNullOrEmpty(this.ReadyPrefab))
            {
                this.ReadyEntity = this.EntityManager.Instantiate(this.ReadyPrefab);
                this.ReadyEntity.IsSerializable = false;
                this.Owner.AddChild(this.ReadyEntity);
            }

            if (!string.IsNullOrEmpty(this.AirTapPrefab))
            {
                this.AirTapEntity = this.EntityManager.Instantiate(this.AirTapPrefab);
                this.AirTapEntity.IsSerializable = false;
                this.Owner.AddChild(this.AirTapEntity);
            }

            this.spatialInputService = WaveServices.GetService<SpatialInputService>();
            if (this.spatialInputService == null)
            {
                Debug.WriteLine("You need to register the SpatialInputServices before to use the cursor");
            }

            this.collisioner = this.Owner.FindComponent<GazeCollision>();
            this.stabilizer = this.Owner.FindComponent<GazeStabilizer>();
            this.indicator = this.Owner.FindComponent<GazeIndicator>();
        }