1 using System.Collections.Generic;
6 namespace droid.Runtime.Prototyping.Sensors.BoundingBox {
9 [SerializeField] Vector2 _observation_value = Vector2.zero;
12 [SerializeField]
UnityEngine.Camera _reference_camera = null;
14 [SerializeField]
bool _use_viewport =
true;
17 public override IEnumerable<float> FloatEnumerable {
18 get {
return new[] {this._observation_value.x, this.ObservationValue.y}; }
22 if (this._reference_camera) {
24 if (this._use_viewport) {
25 point = this._reference_camera.WorldToViewportPoint(this.transform.position);
27 point = this._reference_camera.WorldToScreenPoint(this.transform.position);
30 this._observation_value = point;
37 public Vector2 ObservationValue {
get {
return this._observation_value; } }
42 public Space2 DoubleSpace {
get {
return this._observation_space2_d; } }
override void UpdateObservation()