RenderStack 11.06.1
Public Member Functions
RenderStack.Geometry.CloneGeometryOperation Class Reference

Creates a clone of Geometry. Copies all Polygons, Points, Corners, and copies their (and edges) attributes. More...

Inheritance diagram for RenderStack.Geometry.CloneGeometryOperation:
RenderStack.Geometry.GeometryOperation

List of all members.

Public Member Functions

 CloneGeometryOperation (Geometry src, HashSet< uint > selectedPolygonIndices)

Detailed Description

Note:
Mostly stable

Definition at line 32 of file CloneGeometryOperation.cs.


Constructor & Destructor Documentation

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();
        }

The documentation for this class was generated from the following file: