예제 #1
0
 public PlainShapeList(PlainShape plainShape, Allocator allocator)
 {
     this.points      = new NativeArray <IntVector>(plainShape.points, allocator);
     this.layouts     = new NativeArray <PathLayout>(plainShape.layouts, allocator);
     this.segments    = new NativeArray <Segment>(1, allocator);
     this.segments[0] = new Segment(0, plainShape.layouts.Length);
 }
예제 #2
0
 public DynamicPlainShapeList(PlainShape shape, Allocator allocator)
 {
     this.points   = new DynamicArray <IntVector>(shape.points, allocator);
     this.layouts  = new DynamicArray <PathLayout>(shape.layouts, allocator);
     this.segments = new DynamicArray <Segment>(1, allocator);
     this.segments.Add(new Segment(0, shape.layouts.Length));
 }
예제 #3
0
        public void Add(PlainShape shape)
        {
            // TODO optimise
            int n = shape.Count;

            for (int i = 0; i < n; ++i)
            {
                this.Add(shape.Get(i), shape.layouts[i].isClockWise);
            }
        }
예제 #4
0
 public PlainShape(PlainShape plainShape, Allocator allocator)
 {
     this.points  = new NativeArray <IntVector>(plainShape.points, allocator);
     this.layouts = new NativeArray <PathLayout>(plainShape.layouts, allocator);
 }
예제 #5
0
 public void Add(PlainShape shape)
 {
     this.segments.Add(new Segment(this.layouts.Count, shape.layouts.Length));
     this.points.Add(shape.points);
     this.layouts.Add(shape.layouts);
 }