public static void Draw_LABEL_LINE_Y(string _str, float _x, float _y, float _size, float _txt_height, Color _col_line_START, Color _col_line_END, Color _col_txt, float _txt_margin = DEFAULT_TEXT_MARGIN, float _rotation = 1) { GL.PushMatrix(); GL_DRAW.TransformMatrix(_x, _y, _rotation); GL_DRAW.Draw_LINE(0, 0, 0, _size, _col_line_START, _col_line_END); GL_TXT.Txt(_str, 0, _size + _txt_margin, _txt_height / 5, _col_txt); GL.PopMatrix(); }
void FloorMarker(float _x, float _y, float _size, float _value, int _dataIndex = 0, float _timeOffset = 0) { Color _COL = P.Get(3); float _markerSize = _HOOP_SIZE * _size; float _valueInv = 1f - _value; float _SIZE2 = _size * 0.5f; float _Y_OFFSET = Mathf.Lerp(0.01f * _size, 0.4f * _size, _value); // floor hoop DrawHoop(_x, _y, _size, 0.05f + (_valueInv * 0.2f), _angleOffset: 0); DrawHoop(_x, _y, _SIZE2, 0.075f + (_valueInv * 0.05f), _angleOffset: 0); for (int i = 0; i < 3; i++) { float _ANGLE_OFF = 0.33f * i; DrawHoop(_x, _y, _size * 1.5f, 0.3f, _ANGLE_OFF, _ANGLE_OFF + .1666666f, _angleOffset: Anim.Runtime(-0.1f)); } // raised DrawHoop(_x, _y + _Y_OFFSET, _size, 0.3f, _angleOffset: 0); for (int i = 0; i < 4; i++) { float _ANGLE_OFF = 0.25f * i; DrawHoop(_x, _y + _Y_OFFSET, _size * 0.75f, 0.3f, _ANGLE_OFF, _ANGLE_OFF + .125f, _angleOffset: Anim.Runtime(0.25f, _timeOffset * 0.2f)); } HUD.Draw_LABEL_LINE_X("pt :: " + _dataIndex, _x, _y, _size * 2f, _size * 0.1f, P.Get(3, 0f), _COL, _COL); float _statPad = _size * 0.2f; float _statPad2 = _statPad * 2; float _stat_W = _size * 2; float _stat_H = _size * 4; float _stat_X = _size + _statPad; float _stat_Y = -_stat_H - (_statPad * 2); GL.PushMatrix(); GL_DRAW.TransformMatrix(_x, _y); GL_DRAW.Draw_RECT(_stat_X, _stat_Y, _stat_W, _stat_H, _COL); float[] _values = VALUES.RandomValues_NOISE_TIME(5, _offsetA: _timeOffset, _offsetB: _timeOffset * 1.4f); sprawls[_dataIndex].Draw(_stat_X + _statPad, _stat_Y + (_stat_H * 0.75f), _stat_W - _statPad2, _stat_H * 0.2f, _COL); HUD.Draw_HISTOGRAM_BAR_X(_stat_X + _statPad, _stat_Y + _statPad, _stat_W - _statPad2, _stat_H * 0.5f, _COL, _COL, 0.75f, false, _values); HUD.Draw_HISTOGRAM_BAR_X(_stat_X + _statPad, _stat_Y - (_statPad - (_stat_H * 0.75f)), _stat_W - _statPad2, _stat_H * -0.2f, P.Get(3, 0), P.Get(2), 0.75f, false, _values); GL.PopMatrix(); }
public static void Draw_HISTOGRAM_RADIAL(float[] _values, float _x, float _y, float _radius_start, float _radius_end, Color _col_MIN, Color _col_MAX, bool _alphaFade = false, float _angle_start = 0, float _angle_end = 1, float _rotation = 1) { GL.PushMatrix(); GL_DRAW.TransformMatrix(_x, _y, _rotation); int _TOTAL_BINS = _values.Length; float _RANGE_RADIUS = _radius_end - _radius_start; float _RANGE_ANGLE = (_angle_end - _angle_start) * GL_DRAW.PI2; float _DIV_ANGLE = _RANGE_ANGLE / _TOTAL_BINS; for (int i = 0; i < _TOTAL_BINS; i++) { float _CURRENT_ANGLE = _angle_start + (i * _DIV_ANGLE); float _BIN_VALUE = _values[i]; Vector2 _POS_START = GL_DRAW.PolarCoord(_CURRENT_ANGLE, _radius_start); Vector2 _POS_END = GL_DRAW.PolarCoord(_CURRENT_ANGLE, _radius_start + (_RANGE_RADIUS * _BIN_VALUE)); Color _COL = Color.Lerp(_col_MIN, _col_MAX, _BIN_VALUE); GL_DRAW.Draw_LINE(_POS_START.x, GL_DRAW.LockAspect_Y(_POS_START.y), _POS_END.x, GL_DRAW.LockAspect_Y(_POS_END.y), (_alphaFade) ? COL.Set_alphaStrength(_COL, _BIN_VALUE) : _COL); } GL.PopMatrix(); }
public virtual void Draw() { GL_DRAW.TransformMatrix(transform); }