Last change
on this file since 1139 was 1114, checked in by iritscen, 5 years ago |
Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years.
|
File size:
887 bytes
|
Rev | Line | |
---|
[1114] | 1 | using System;
|
---|
| 2 |
|
---|
| 3 | namespace Oni.Akira
|
---|
| 4 | {
|
---|
| 5 | internal class PolygonEdge
|
---|
| 6 | {
|
---|
| 7 | private static readonly PolygonEdge[] emptyEdges = new PolygonEdge[0];
|
---|
| 8 | private readonly Polygon polygon;
|
---|
| 9 | private readonly int index;
|
---|
| 10 | private PolygonEdge[] adjacency = emptyEdges;
|
---|
| 11 |
|
---|
| 12 | public PolygonEdge(Polygon polygon, int index)
|
---|
| 13 | {
|
---|
| 14 | this.polygon = polygon;
|
---|
| 15 | this.index = index;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | public Polygon Polygon => polygon;
|
---|
| 19 |
|
---|
| 20 | public int Index => index;
|
---|
| 21 | public int EndIndex => (index + 1) % polygon.Edges.Length;
|
---|
| 22 |
|
---|
| 23 | public int Point0Index => polygon.PointIndices[index];
|
---|
| 24 | public int Point1Index => polygon.PointIndices[EndIndex];
|
---|
| 25 |
|
---|
| 26 | public PolygonEdge[] Adjancency
|
---|
| 27 | {
|
---|
| 28 | get { return adjacency; }
|
---|
| 29 | set { adjacency = value; }
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.