DrawCurveWrapped() 공개 정적인 메소드

public static DrawCurveWrapped ( float minTime, float maxTime, float rangeStart, float rangeEnd, WrapMode preWrap, WrapMode postWrap, Color color, Matrix4x4 transform, Vector3 points, Color wrapColor ) : void
minTime float
maxTime float
rangeStart float
rangeEnd float
preWrap WrapMode
postWrap WrapMode
color Color
transform UnityEngine.Matrix4x4
points Vector3
wrapColor Color
리턴 void
예제 #1
0
        public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, int component, Color wrapColor)
        {
            if ((double)minTime < (double)this.cachedRangeStart || (double)maxTime > (double)this.cachedRangeEnd)
            {
                this.CalculateCurves(minTime, maxTime);
                if ((double)minTime <= (double)this.rangeStart && (double)maxTime >= (double)this.rangeEnd)
                {
                    this.cachedRangeStart = float.NegativeInfinity;
                    this.cachedRangeEnd   = float.PositiveInfinity;
                }
                else
                {
                    this.cachedRangeStart = minTime;
                    this.cachedRangeEnd   = maxTime;
                }
            }
            List <Vector3> vector3List = new List <Vector3>();

            using (SortedDictionary <float, Vector3> .Enumerator enumerator = this.points.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <float, Vector3> current = enumerator.Current;
                    vector3List.Add(new Vector3(current.Key, current.Value[component]));
                }
            }
            NormalCurveRenderer.DrawCurveWrapped(minTime, maxTime, this.rangeStart, this.rangeEnd, this.preWrapMode, this.postWrapMode, color, transform, vector3List.ToArray(), wrapColor);
        }
예제 #2
0
        public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, int component, Color wrapColor)
        {
            if (minTime < cachedRangeStart || maxTime > cachedRangeEnd)
            {
                CalculateCurves(minTime, maxTime);
                if (minTime <= rangeStart && maxTime >= rangeEnd)
                {
                    // if we are covering whole range
                    cachedRangeStart = Mathf.NegativeInfinity;
                    cachedRangeEnd   = Mathf.Infinity;
                }
                else
                {
                    cachedRangeStart = minTime;
                    cachedRangeEnd   = maxTime;
                }
            }

            List <Vector3> polyLine = new List <Vector3>();

            foreach (KeyValuePair <float, Vector3> kvp in points)
            {
                polyLine.Add(new Vector3(kvp.Key, kvp.Value[component]));
            }

            NormalCurveRenderer.DrawCurveWrapped(minTime, maxTime, rangeStart, rangeEnd, preWrapMode, postWrapMode, color, transform, polyLine.ToArray(), wrapColor);
        }
 public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, Color wrapColor)
 {
     this.BuildCurveMesh();
     Keyframe[] keys = this.m_Curve.keys;
     if (keys.Length > 0)
     {
         Vector3 firstPoint = new Vector3(this.rangeStart, keys.First <Keyframe>().value);
         Vector3 lastPoint  = new Vector3(this.rangeEnd, keys.Last <Keyframe>().value);
         NormalCurveRenderer.DrawCurveWrapped(minTime, maxTime, this.rangeStart, this.rangeEnd, this.preWrapMode, this.postWrapMode, this.m_CurveMesh, firstPoint, lastPoint, transform, color, wrapColor);
     }
 }
 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);
 }
예제 #5
0
 public void DrawCurve(float minTime, float maxTime, Color color, Matrix4x4 transform, Color wrapColor)
 {
     Vector3[] points = this.GetPoints(minTime, maxTime);
     NormalCurveRenderer.DrawCurveWrapped(minTime, maxTime, this.rangeStart, this.rangeEnd, this.preWrapMode, this.postWrapMode, color, transform, points, wrapColor);
 }