UnityEditor.EulerCurveCombinedRenderer.DrawCurve C# (CSharp) Method

DrawCurve() public method

public DrawCurve ( float minTime, float maxTime, Color color, Matrix4x4 transform, int component, Color wrapColor ) : void
minTime float
maxTime float
color Color
transform Matrix4x4
component int
wrapColor Color
return void
        public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, int component, Color wrapColor)
        {
            if ((minTime < this.cachedRangeStart) || (maxTime > this.cachedRangeEnd))
            {
                this.CalculateCurves(minTime, maxTime);
                if ((minTime <= this.rangeStart) && (maxTime >= this.rangeEnd))
                {
                    this.cachedRangeStart = float.NegativeInfinity;
                    this.cachedRangeEnd = float.PositiveInfinity;
                }
                else
                {
                    this.cachedRangeStart = minTime;
                    this.cachedRangeEnd = maxTime;
                }
            }
            List<Vector3> list = new List<Vector3>();
            foreach (KeyValuePair<float, Vector3> pair in this.points)
            {
                list.Add(new Vector3(pair.Key, pair.Value[component]));
            }
            NormalCurveRenderer.DrawCurveWrapped(minTime, maxTime, this.rangeStart, this.rangeEnd, this.preWrapMode, this.postWrapMode, color, transform, list.ToArray(), wrapColor);
        }

Usage Example

Exemplo n.º 1
0
 public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, Color wrapColor)
 {
     renderer.DrawCurve(minTime, maxTime, color, transform, component, wrapColor);
 }