Example #1
0
		/// <summary>
		/// Normaly ObjectCSG tree can be dirrected acyclic graphs and have instances appear more than once in the tree.
		/// This function will ensure that that every Object is a unique instance in the structure.
		/// </summary>
		/// <param name="dagRoot"></param>
		/// <returns>A new ObjectCSG root that is a new tree of all the objects in the original tree.</returns>
		public static CsgObject Flatten(CsgObject dagRoot)
		{
			CopyAndFlatten flattener = new CopyAndFlatten();
			return flattener.DoCopyAndFlatten((dynamic)dagRoot);
		}
Example #2
0
        static public CsgObject ProcessObject(CsgObject objectToCopyAndFlatten)
        {
            CopyAndFlatten instance = new CopyAndFlatten();

            return(instance.DoCopyAndFlatten((dynamic)objectToCopyAndFlatten));
        }
Example #3
0
 static public CsgObject ProcessObject(CsgObject objectToCopyAndFlatten)
 {
     CopyAndFlatten instance = new CopyAndFlatten();
     return instance.DoCopyAndFlatten((dynamic)objectToCopyAndFlatten);
 }