Minor updates.
This commit is contained in:
@@ -142,10 +142,10 @@ namespace TriangleNet.Tools
|
||||
/// Intersect a ray with a bounding box.
|
||||
/// </summary>
|
||||
/// <param name="rect">The clip rectangle.</param>
|
||||
/// <param name="p0">The ray startpoint (inside the box).</param>
|
||||
/// <param name="p0">The ray start point (inside the box).</param>
|
||||
/// <param name="p1">Any point in ray direction (NOT the direction vector).</param>
|
||||
/// <param name="c1">The intersection point.</param>
|
||||
/// <returns>Returns false, if startpoint is outside the box.</returns>
|
||||
/// <returns>Returns false, if start point is outside the box.</returns>
|
||||
public static bool BoxRayIntersection(Rectangle rect, Point p0, Point p1, ref Point c1)
|
||||
{
|
||||
return BoxRayIntersection(rect, p0, p1.x - p0.x, p1.y - p0.y, ref c1);
|
||||
@@ -155,10 +155,10 @@ namespace TriangleNet.Tools
|
||||
/// Intersect a ray with a bounding box.
|
||||
/// </summary>
|
||||
/// <param name="rect">The clip rectangle.</param>
|
||||
/// <param name="p">The ray startpoint (inside the box).</param>
|
||||
/// <param name="p">The ray start point (inside the box).</param>
|
||||
/// <param name="dx">X direction.</param>
|
||||
/// <param name="dy">Y direction.</param>
|
||||
/// <returns>Returns false, if startpoint is outside the box.</returns>
|
||||
/// <returns>Returns false, if start point is outside the box.</returns>
|
||||
public static Point BoxRayIntersection(Rectangle rect, Point p, double dx, double dy)
|
||||
{
|
||||
var intersection = new Point();
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace TriangleNet.Tools
|
||||
if (p.id < 0 || p.id >= count)
|
||||
{
|
||||
horrors++;
|
||||
logger.Warning(string.Format("Segment {0} has invalid startpoint.", i),
|
||||
logger.Warning(string.Format("Segment {0} has invalid start point.", i),
|
||||
"PolygonValidator.IsConsistent()");
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace TriangleNet.Tools
|
||||
public double area_max = -double.MaxValue;
|
||||
// Total area of geometry
|
||||
public double area_total = 0;
|
||||
// Nmber of triangles with zero area
|
||||
// Number of triangles with zero area
|
||||
public int area_zero = 0;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -63,68 +63,68 @@ namespace TriangleNet.Tools
|
||||
/// <summary>
|
||||
/// Gets the shortest edge.
|
||||
/// </summary>
|
||||
public double ShortestEdge { get { return minEdge; } }
|
||||
public double ShortestEdge => minEdge;
|
||||
|
||||
double maxEdge = 0;
|
||||
/// <summary>
|
||||
/// Gets the longest edge.
|
||||
/// </summary>
|
||||
public double LongestEdge { get { return maxEdge; } }
|
||||
public double LongestEdge => maxEdge;
|
||||
|
||||
//
|
||||
double minAspect = 0;
|
||||
/// <summary>
|
||||
/// Gets the shortest altitude.
|
||||
/// </summary>
|
||||
public double ShortestAltitude { get { return minAspect; } }
|
||||
public double ShortestAltitude => minAspect;
|
||||
|
||||
double maxAspect = 0;
|
||||
/// <summary>
|
||||
/// Gets the largest aspect ratio.
|
||||
/// </summary>
|
||||
public double LargestAspectRatio { get { return maxAspect; } }
|
||||
public double LargestAspectRatio => maxAspect;
|
||||
|
||||
double minArea = 0;
|
||||
/// <summary>
|
||||
/// Gets the smallest area.
|
||||
/// </summary>
|
||||
public double SmallestArea { get { return minArea; } }
|
||||
public double SmallestArea => minArea;
|
||||
|
||||
double maxArea = 0;
|
||||
/// <summary>
|
||||
/// Gets the largest area.
|
||||
/// </summary>
|
||||
public double LargestArea { get { return maxArea; } }
|
||||
public double LargestArea => maxArea;
|
||||
|
||||
double minAngle = 0;
|
||||
/// <summary>
|
||||
/// Gets the smallest angle.
|
||||
/// </summary>
|
||||
public double SmallestAngle { get { return minAngle; } }
|
||||
public double SmallestAngle => minAngle;
|
||||
|
||||
double maxAngle = 0;
|
||||
/// <summary>
|
||||
/// Gets the largest angle.
|
||||
/// </summary>
|
||||
public double LargestAngle { get { return maxAngle; } }
|
||||
public double LargestAngle => maxAngle;
|
||||
|
||||
int[] angleTable;
|
||||
/// <summary>
|
||||
/// Gets the angle histogram.
|
||||
/// </summary>
|
||||
public int[] AngleHistogram { get { return angleTable; } }
|
||||
public int[] AngleHistogram => angleTable;
|
||||
|
||||
int[] minAngles;
|
||||
/// <summary>
|
||||
/// Gets the min angles histogram.
|
||||
/// </summary>
|
||||
public int[] MinAngleHistogram { get { return minAngles; } }
|
||||
public int[] MinAngleHistogram => minAngles;
|
||||
|
||||
int[] maxAngles;
|
||||
/// <summary>
|
||||
/// Gets the max angles histogram.
|
||||
/// </summary>
|
||||
public int[] MaxAngleHistogram { get { return maxAngles; } }
|
||||
public int[] MaxAngleHistogram => maxAngles;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -258,8 +258,8 @@ namespace TriangleNet.Tools
|
||||
|
||||
foreach (var tri in mesh.triangles)
|
||||
{
|
||||
triMinAngle = 0; // Min angle: 0 < a < 60 degress
|
||||
triMaxAngle = 1; // Max angle: 60 < a < 180 degress
|
||||
triMinAngle = 0; // Min angle: 0 < a < 60 degrees
|
||||
triMaxAngle = 1; // Max angle: 60 < a < 180 degrees
|
||||
|
||||
p[0] = tri.vertices[0];
|
||||
p[1] = tri.vertices[1];
|
||||
|
||||
Reference in New Issue
Block a user