示例#1
0
 private bool EqualPoint(LW_Point2D other)
 {
     return(
         position == other.position &&
         pointType == other.pointType &&
         handleIn == other.handleIn &&
         hasHandleIn == other.hasHandleIn &&
         handleOut == other.handleOut &&
         hasHandleOut == other.hasHandleOut
         );
 }
示例#2
0
 public void Set(Vector3[] points, bool isClosed = false)
 {
     LW_Point2D[] pathPoints = null;
     if (points != null && points.Length > 1)
     {
         pathPoints = new LW_Point2D[points.Length];
         for (int i = 0; i < points.Length; i++)
         {
             pathPoints[i] = new LW_Point2D((Vector2)points[i]);
         }
     }
     Set(pathPoints, isClosed);
 }
示例#3
0
 public void Set(LW_Point2D[] points, bool isClosed = false)
 {
     m_IsClosed = isClosed;
     if (points == null)
     {
         points = new LW_Point2D[] {
             new LW_Point2D(new Vector2(-40, 40), new Vector2(-40 * c_ArcAprox, 0), new Vector2(40 * c_ArcAprox, 0), PointType.Symetric),
             new LW_Point2D(new Vector2(0, -40), new Vector2(-40 * c_ArcAprox, 0), new Vector2(40 * c_ArcAprox, 0), PointType.Symetric),
             new LW_Point2D(new Vector2(40, 40), new Vector2(-40 * c_ArcAprox, 0), new Vector2(40 * c_ArcAprox, 0), PointType.Symetric)
         };
     }
     m_Points = new List <LW_Point2D>(points);
     SetElementDirty();
 }
示例#4
0
        public override LW_Path2D ConvertToPath2D()
        {
            LW_Path2D path = CreateInstance <LW_Path2D>();

            if (m_Points != null && m_Points.Count > 1)
            {
                LW_Point2D[] pathPoints = new LW_Point2D[m_Points.Count];
                for (int i = 0; i < m_Points.Count; i++)
                {
                    pathPoints[i] = m_Points[i];
                }
                path.Set(pathPoints, m_IsClosed);
            }
            return(path);
        }