// -----------------------------------------------------------------------
//
// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/
//
// -----------------------------------------------------------------------
namespace UnityEngine.U2D.Animation.TriangleNet
.Geometry
{
using System;
using System.Collections.Generic;
///
/// Pointer to a region in the mesh geometry. A region is a well-defined
/// subset of the geomerty (enclosed by subsegments).
///
internal class RegionPointer
{
internal Point point;
internal int id;
internal double area;
///
/// Gets or sets a region area constraint.
///
public double Area
{
get { return area; }
set
{
if (value < 0.0)
{
throw new ArgumentException("Area constraints must not be negative.");
}
area = value;
}
}
///
/// Initializes a new instance of the class.
///
/// X coordinate of the region.
/// Y coordinate of the region.
/// Region id.
public RegionPointer(double x, double y, int id)
: this(x, y, id, 0.0)
{
}
///
/// Initializes a new instance of the class.
///
/// X coordinate of the region.
/// Y coordinate of the region.
/// Region id.
/// Area constraint.
public RegionPointer(double x, double y, int id, double area)
{
this.point = new Point(x, y);
this.id = id;
this.area = area;
}
}
}