AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
Polar.cs
1 /************************************************/
2 /* */
3 /* Copyright (c) 2018 - 2021 monitor1394 */
4 /* https://github.com/monitor1394 */
5 /* */
6 /************************************************/
7 
8 using System;
9 using UnityEngine;
10 
11 namespace XCharts
12 {
20  [Serializable]
21  public class Polar : MainComponent
22  {
23  [SerializeField] private bool m_Show = true;
24  [SerializeField] private float[] m_Center = new float[2] { 0.5f, 0.5f };
25  [SerializeField] private float m_Radius = 100;
26  [SerializeField] private Color m_BackgroundColor;
27 
28 
33  public bool show
34  {
35  get { return m_Show; }
36  set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
37  }
44  public float[] center
45  {
46  get { return m_Center; }
47  set { if (value != null) { m_Center = value; SetAllDirty(); } }
48  }
53  public float radius
54  {
55  get { return m_Radius; }
56  set { if (PropertyUtil.SetStruct(ref m_Radius, value)) SetAllDirty(); }
57  }
62  public Color backgroundColor
63  {
64  get { return m_BackgroundColor; }
65  set { if (PropertyUtil.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); }
66  }
67  public int index { get; internal set; }
72  public Vector3 runtimeCenterPos { get; internal set; }
77  public float runtimeRadius { get; internal set; }
78 
79  public static Polar defaultPolar
80  {
81  get
82  {
83  var polar = new Polar
84  {
85  m_Show = true,
86  m_Radius = 0.35f,
87  };
88  polar.center[0] = 0.5f;
89  polar.center[1] = 0.45f;
90  return polar;
91  }
92  }
93  }
94 }
XCharts.Polar
Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a...
Definition: Polar.cs:21
XCharts.Polar.show
bool show
Whether to show the polor component. 是否显示极坐标。
Definition: Polar.cs:34
XCharts.MainComponent
Definition: ChartComponent.cs:67
XCharts.Polar.runtimeCenterPos
Vector3 runtimeCenterPos
the center position of polar in container. 极坐标在容器中的具体中心点。
Definition: Polar.cs:72
XCharts
Definition: RewardChart.cs:14
XCharts.Polar.center
float[] center
[default:[0.5f,0.45f]]The center of ploar. The center[0] is the x-coordinate, and the center[1] is th...
Definition: Polar.cs:45
XCharts.Polar.runtimeRadius
float runtimeRadius
the true radius of polar. 极坐标的运行时实际半径。
Definition: Polar.cs:77
XCharts.Polar.backgroundColor
Color backgroundColor
[default:Color.clear]Background color of polar, which is transparent by default. 极坐标的背景色,默认透明。
Definition: Polar.cs:63
XCharts.Polar.radius
float radius
[default:0.35f]the radius of polar. 极坐标的半径。
Definition: Polar.cs:54