Esempio n. 1
0
 public CurvedPolygonsNet GetCPN()
 {
     //Check Tessellation Process First
     if (curvedPoly == null)
     {
         curvedPoly = ScriptableObject.CreateInstance <CurvedPolyAsset>();
     }
     return(curvedPoly.GetCPN());
 }
        public CurvedPolyAsset Clone()
        {
            CurvedPolyAsset curvedPolyAsset = ScriptableObject.CreateInstance <CurvedPolyAsset>();

            //curvedPolyAsset.tessellationProcess = new CPNTessellationProcess(new SFDefaultInterpolationManager());
            curvedPolyAsset.compressionMask = this.compressionMask;

            curvedPolyAsset.vertices         = this.vertices;
            curvedPolyAsset.numberOfVertices = this.numberOfVertices;
            curvedPolyAsset.uvs         = this.uvs;
            curvedPolyAsset.normals     = this.normals;
            curvedPolyAsset.tangents    = this.tangents;
            curvedPolyAsset.edges       = this.edges;
            curvedPolyAsset.edgesIndex  = this.edgesIndex;
            curvedPolyAsset.edgeHints   = this.edgeHints;
            curvedPolyAsset.edgeWeights = this.edgeWeights;
            curvedPolyAsset.geometries  = this.geometries;
            curvedPolyAsset.ReadPolygonsNet(curvedPolyAsset.GetCPN());

            return(curvedPolyAsset);
        }