public void Load(InputGeometry input, List<ITriangle> triangles)
{
if (input == null || triangles == null)
{
throw new ArgumentException("Invalid input (argument is null).");
}
// Clear all data structures / reset hash seeds
this.ResetData();
if (input.HasSegments)
{
behavior.Poly = true;
this.holes.AddRange(input.Holes);
}
//if (input.EdgeMarkers != null)
//{
// behavior.UseBoundaryMarkers = true;
//}
//if (input.TriangleAreas != null)
//{
// behavior.VarArea = true;
//}
// TODO: remove
if (!behavior.Poly)
{
// Be careful not to allocate space for element area constraints that
// will never be assigned any value (other than the default -1.0).
behavior.VarArea = false;
// Be careful not to add an extra attribute to each element unless the
// input supports it (PSLG in, but not refining a preexisting mesh).
behavior.useRegions = false;
}
behavior.useRegions = input.Regions.Count > 0;
TransferNodes(input);
// Read and reconstruct a mesh.
hullsize = DataReader.Reconstruct(this, input, triangles.ToArray());
// Calculate the number of edges.
edges = (3 * triangles.Count + hullsize) / 2;
}