|
RenderStack 11.06.1
|
Creates a clone of Geometry. Copies all Polygons, Points, Corners, and copies their (and edges) attributes. More...
Public Member Functions | |
| CloneGeometryOperation (Geometry src, HashSet< uint > selectedPolygonIndices) | |
Definition at line 32 of file CloneGeometryOperation.cs.
| RenderStack.Geometry.CloneGeometryOperation.CloneGeometryOperation | ( | Geometry | src, |
| HashSet< uint > | selectedPolygonIndices | ||
| ) |
Definition at line 34 of file CloneGeometryOperation.cs.
{
Source = src;
foreach(Point oldPoint in src.Points)
{
MakeNewPointFromPoint(oldPoint);
}
// Clone polygons (and corners);
for(uint polygonIndex = 0; polygonIndex < src.Polygons.Count; ++polygonIndex)
{
if(
(selectedPolygonIndices == null) ||
selectedPolygonIndices.Contains(polygonIndex)
)
{
Polygon oldPolygon = Source.Polygons[(int)polygonIndex];
Polygon newPolygon = MakeNewPolygonFromPolygon(oldPolygon);
AddPolygonCorners(newPolygon, oldPolygon);
}
}
BuildDestinationEdgesWithSourcing();
InterpolateAllAttributeMaps();
}
1.7.4