-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiPatchShape.cs
More file actions
61 lines (48 loc) · 1.57 KB
/
MultiPatchShape.cs
File metadata and controls
61 lines (48 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ShapeUtilities
{
public enum PartType:int
{
TriangleStrip=0,
TriangleFan=1,
OuterRing=2,
InnerRing=3,
FirstRing=4,
Ring=5
}
public class MultiPatchShape:BaseShapeRecord, IHasPoints
{
public ShpBox BoundingBox { get; set; }
public int NumberParts { get; set; }
public int NumberPoints { get; set; }
public List<int> Parts { get; set; }
public List<PartType> PartTypes { get; set; }
public List<ShpPoint> Points { get; set; }
public double ZMin { get; set; }
public double ZMax { get; set; }
public List<double> ZArray { get; set;}
public double MMin { get; set; }
public double MMax { get; set; }
public List<double> MArray { get; set; }
public MultiPatchShape(BinaryReader br):base(br)
{
BoundingBox = new ShpBox(br);
NumberParts = br.ReadInt32();
NumberPoints = br.ReadInt32();
Parts = ReadParts(br, NumberParts);
PartTypes = ReadParts(br, NumberParts).Select(o => (PartType)o).ToList();
Points = ReadPoints(br, NumberPoints);
ZMin = br.ReadDouble();
ZMax = br.ReadDouble();
ZArray = ReadDoubles (br, NumberPoints);
MMin = br.ReadDouble();
MMax = br.ReadDouble();
MArray = ReadDoubles(br, NumberPoints);
}
}
}