diff --git a/src/Triangle/Topology/Osub.cs b/src/Triangle/Topology/Osub.cs
index 7f401bb..fba9438 100644
--- a/src/Triangle/Topology/Osub.cs
+++ b/src/Triangle/Topology/Osub.cs
@@ -35,7 +35,7 @@ namespace TriangleNet.Topology
{
return "O-TID [null]";
}
- return String.Format("O-SID {0}", seg.hash);
+ return string.Format("O-SID {0}", seg.hash);
}
#region Osub primitives
diff --git a/src/Triangle/Topology/Otri.cs b/src/Triangle/Topology/Otri.cs
index e230389..be8c207 100644
--- a/src/Triangle/Topology/Otri.cs
+++ b/src/Triangle/Topology/Otri.cs
@@ -23,6 +23,8 @@ namespace TriangleNet.Topology
internal Triangle tri;
internal int orient; // Ranges from 0 to 2.
+ public int Orient => orient;
+
///
/// Gets or sets the triangle.
///
@@ -354,6 +356,14 @@ namespace TriangleNet.Topology
ot.orient = orient;
}
+ ///
+ /// Finds a subsegment abutting a triangle.
+ ///
+ public void Pivot(ref Osub os)
+ {
+ os = tri.subsegs[orient];
+ }
+
///
/// Test for equality of oriented triangles.
///
@@ -439,14 +449,6 @@ namespace TriangleNet.Topology
return tri.infected;
}
- ///
- /// Finds a subsegment abutting a triangle.
- ///
- internal void Pivot(ref Osub os)
- {
- os = tri.subsegs[orient];
- }
-
///
/// Bond a triangle to a subsegment.
///
diff --git a/src/Triangle/Topology/SubSegment.cs b/src/Triangle/Topology/SubSegment.cs
index e370155..d12752e 100644
--- a/src/Triangle/Topology/SubSegment.cs
+++ b/src/Triangle/Topology/SubSegment.cs
@@ -47,26 +47,17 @@ namespace TriangleNet.Topology
///
/// Gets the first endpoints vertex id.
///
- public int P0
- {
- get { return this.vertices[0].id; }
- }
+ public int P0 => vertices[0].id;
///
/// Gets the seconds endpoints vertex id.
///
- public int P1
- {
- get { return this.vertices[1].id; }
- }
+ public int P1 => vertices[1].id;
///
/// Gets the segment boundary mark.
///
- public int Label
- {
- get { return this.boundary; }
- }
+ public int Label => boundary;
#endregion
@@ -75,7 +66,7 @@ namespace TriangleNet.Topology
///
public Vertex GetVertex(int index)
{
- return this.vertices[index]; // TODO: Check range?
+ return vertices[index]; // TODO: Check range?
}
///
@@ -86,16 +77,24 @@ namespace TriangleNet.Topology
return triangles[index].tri.hash == Mesh.DUMMY ? null : triangles[index].tri;
}
+ ///
+ /// Gets an adjoining triangle.
+ ///
+ public void GetTriangle(int index, ref Otri otri)
+ {
+ otri = triangles[index];
+ }
+
///
public override int GetHashCode()
{
- return this.hash;
+ return hash;
}
///
public override string ToString()
{
- return String.Format("SID {0}", hash);
+ return string.Format("SID {0}", hash);
}
}
}