Пример #1
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._mesh_str);
 }
Пример #2
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        protected override void RegisterComponent()
        {
            this._x = this.Identifier + "X_";
            this._y = this.Identifier + "Y_";
            this._z = this.Identifier + "Z_";
            if (this._Angular_Actuators)
            {
                this._x = this.Identifier + "RotX_";
                this._y = this.Identifier + "RotY_";
                this._z = this.Identifier + "RotZ_";
            }

            this.Parent =
                NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                                this,
                                                                this._x);
            this.Parent =
                NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                                this,
                                                                this._y);
            this.Parent =
                NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                                this,
                                                                this._z);
        }
Пример #3
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._x);
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._y);
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._z);
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._rot_x);
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._rot_y);
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._rot_z);
 }
Пример #4
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._shadow_strength);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._color_r);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._color_b);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._color_g);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._intensity);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._indirect_multiplier);
 }
Пример #5
0
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._quality_level);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._target_frame_rate);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._width);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._height);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._fullscreen);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._time_scale);
 }
Пример #6
0
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._vel_x);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._vel_y);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._vel_z);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._ang_x);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._ang_y);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._ang_z);
 }
Пример #7
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     if (this.SimulationManager != null)
     {
         this.SimulationManager =
             NeodroidRegistrationUtilities.RegisterComponent((NeodroidManager)this.SimulationManager, this);
     }
 }
Пример #8
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        protected override void RegisterComponent()
        {
            this.ParentEnvironment =
                NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment, this, this.Identifier);

            this.ParentEnvironment =
                NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment, this, this._colors);
        }
Пример #9
0
        public override void RemotePostSetup()
        {
            if (!this._area)
            {
                this._area = FindObjectOfType <Sensor>().gameObject.GetComponent <Collider>();
            }

            if (!this._actor)
            {
                this._actor = FindObjectOfType <Actor>().gameObject.GetComponent <Collider>();
            }

            if (this._obstructions.Length <= 0)
            {
                this._obstructions = FindObjectsOfType <Obstruction>();
            }

            if (!this._playable_area)
            {
                this._playable_area = FindObjectOfType <BoundingBox>();
            }

            NeodroidRegistrationUtilities
            .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(this,
                                                                                                      this
                                                                                                      ._area
                                                                                                      .transform,
                                                                                                      this
                                                                                                      .OnCollisionEnterChild,
                                                                                                      this
                                                                                                      .OnTriggerEnterChild,
                                                                                                      this
                                                                                                      .OnCollisionExitChild,
                                                                                                      this
                                                                                                      .OnTriggerExitChild,
                                                                                                      this
                                                                                                      .OnCollisionStayChild,
                                                                                                      this
                                                                                                      .OnTriggerStayChild);

            NeodroidRegistrationUtilities
            .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(this,
                                                                                                      this
                                                                                                      ._actor
                                                                                                      .transform,
                                                                                                      this
                                                                                                      .OnCollisionEnterChild,
                                                                                                      this
                                                                                                      .OnTriggerEnterChild,
                                                                                                      this
                                                                                                      .OnCollisionExitChild,
                                                                                                      this
                                                                                                      .OnTriggerExitChild,
                                                                                                      this
                                                                                                      .OnCollisionStayChild,
                                                                                                      this
                                                                                                      .OnTriggerStayChild);
        }
Пример #10
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment, this, this._x);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment, this, this._y);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment, this, this._z);
 }
Пример #11
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._movement);
     this.Parent =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent,
                                                         (Actuator)this,
                                                         this._turn);
 }
Пример #12
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        protected override void RegisterComponent()
        {
            this._Parent_Environment =
                NeodroidRegistrationUtilities.RegisterComponent(this._Parent_Environment, this);

            if (this._Parent_Environment != null)
            {
                this._Parent_Environment.PreStepEvent  += this.PreStep;
                this._Parent_Environment.StepEvent     += this.Step;
                this._Parent_Environment.PostStepEvent += this.PostStep;
            }
        }
Пример #13
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        protected override void RegisterComponent()
        {
            this._x = this.Identifier + "RotX_";

            this._z = this.Identifier + "RotZ_";

            this.Parent =
                NeodroidRegistrationUtilities.RegisterComponent(r: (IHasRegister <IActuator>) this.Parent,
                                                                c: this,
                                                                identifier: this._x);
            this.Parent =
                NeodroidRegistrationUtilities.RegisterComponent(r: (IHasRegister <IActuator>) this.Parent,
                                                                c: this,
                                                                identifier: this._z);
        }
Пример #14
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        public override void Setup()
        {
            this._grid = new int[this._width, this._height];

            var k = 0;

            for (var i = 0; i < this._width; i++)
            {
                for (var j = 0; j < this._height; j++)
                {
                    this._grid[i, j] = k++;
                }
            }

            this._time_simulation_manager =
                NeodroidRegistrationUtilities.RegisterComponent((AbstractNeodroidManager)this
                                                                ._time_simulation_manager,
                                                                this);
        }
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._r);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._g);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._b);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._a);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._reflection);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._smoothness);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._offset_x);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._offset_y);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._tiling_x);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._tiling_y);
 }
Пример #16
0
 void SetupEnvironment()
 {
     NeodroidRegistrationUtilities
     .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(caller: this,
                                                                                               parent: this
                                                                                               .transform,
                                                                                               on_collision_enter_child: this
                                                                                               .OnCollisionEnterChild,
                                                                                               on_trigger_enter_child: this
                                                                                               .OnTriggerEnterChild,
                                                                                               on_collision_exit_child: this
                                                                                               .OnCollisionExitChild,
                                                                                               on_trigger_exit_child: this
                                                                                               .OnTriggerExitChild,
                                                                                               on_collision_stay_child: this
                                                                                               .OnCollisionStayChild,
                                                                                               on_trigger_stay_child: this
                                                                                               .OnTriggerStayChild,
                                                                                               debug: this
                                                                                               ._debugging);
 }
Пример #17
0
        // Use this for initialization
        void Start()
        {
            if (!this._graspable_object)
            {
                this._graspable_object = this.GetComponent <GraspableObject>();
            }

            if (!this._grasping)
            {
                this._grasping = FindObjectOfType <ScriptedGrasping>();
            }

            this._grasp        = this._graspable_object.GetOptimalGrasp(grasping: this._grasping).Item1;
            this._rigid_body   = this._grasp.GetComponentInParent <Rigidbody>();
            this._rigid_bodies = this._graspable_object.GetComponentsInChildren <Rigidbody>();
            var transform1 = this._rigid_body.transform;

            this._initial_position = transform1.position;
            this._initial_rotation = transform1.rotation;

            NeodroidRegistrationUtilities
            .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(caller: this,
                                                                                                      parent: this
                                                                                                      .transform,
                                                                                                      on_collision_enter_child: this
                                                                                                      .OnCollisionEnterChild,
                                                                                                      on_trigger_enter_child: this
                                                                                                      .OnTriggerEnterChild,
                                                                                                      on_collision_exit_child: this
                                                                                                      .OnCollisionExitChild,
                                                                                                      on_trigger_exit_child: this
                                                                                                      .OnTriggerExitChild,
                                                                                                      on_collision_stay_child: this
                                                                                                      .OnCollisionStayChild,
                                                                                                      on_trigger_stay_child: this
                                                                                                      .OnTriggerStayChild,
                                                                                                      debug: this
                                                                                                      ._debugging);
        }
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._color_r);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._color_b);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._color_g);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._intensity);
     this.ParentEnvironment =
         NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                         (Configurable)this,
                                                         this._reflection_intensity);
 }
Пример #19
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     if (!this._camera.usePhysicalProperties)
     {
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._fov_str);
     }
     else
     {
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._focal_str);
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._sensor_width_str);
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._sensor_height_str);
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._lens_shift_x_str);
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._lens_shift_y_str);
         this.ParentEnvironment =
             NeodroidRegistrationUtilities.RegisterComponent(this.ParentEnvironment,
                                                             (Configurable)this,
                                                             this._gate_fit_str);
     }
 }
Пример #20
0
        /// <summary>
        ///
        /// </summary>
        public override void RemotePostSetup()
        {
            if (!this._goal)
            {
                this._goal = FindObjectOfType <EmptyCell>();
            }

            if (!this._actor)
            {
                this._actor = FindObjectOfType <Actor>();
            }

            if (this._goal)
            {
                NeodroidRegistrationUtilities
                .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(this,
                                                                                                          this
                                                                                                          ._goal
                                                                                                          .transform,
                                                                                                          null,
                                                                                                          this
                                                                                                          .OnTriggerEnterChild);
            }

            if (this._actor)
            {
                NeodroidRegistrationUtilities
                .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(this,
                                                                                                          this
                                                                                                          ._actor
                                                                                                          .transform,
                                                                                                          null,
                                                                                                          this
                                                                                                          .OnTriggerEnterChild);
            }
        }
Пример #21
0
 /// <inheritdoc />
 /// <summary>
 /// </summary>
 protected override void RegisterComponent()
 {
     this._overriden = false;
     this.Parent     =
         NeodroidRegistrationUtilities.RegisterComponent((IHasRegister <IActuator>) this.Parent, this, true);
 }