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); }
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)); }
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); } }
public PlainShape(PlainShape plainShape, Allocator allocator) { this.points = new NativeArray <IntVector>(plainShape.points, allocator); this.layouts = new NativeArray <PathLayout>(plainShape.layouts, allocator); }
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); }