PreProcess() public method

Simplifies this graph by running its nodes through the pre-processing stage. The whole graph will be reduced to its final form (i.e. no "weird" nodes like SubGraphNode).
public PreProcess ( ) : void
return void
		/// <summary>
		/// Gets all the parameters in the given Graph.
		/// </summary>
		public GraphParamCollection(Graph g)
			: this()
		{
			Graph gCopy = g.Clone();
			gCopy.PreProcess();
			
			foreach (Node n in gCopy.Nodes)
			{
				if (n is ParamNode_Float)
					FloatParams.Add(((ParamNode_Float)n).Param);
				else if (n is ParamNode_Texture2D)
					Tex2DParams.Add(((ParamNode_Texture2D)n).Param);
			}
		}
Beispiel #2
0
        /// <summary>
        /// Gets all the parameters in the given Graph.
        /// </summary>
        public GraphParamCollection(Graph g)
        {
            Graph gCopy = g.Clone();

            gCopy.PreProcess();

            FloatParams = new List <FloatParamInfo>();
            Tex2DParams = new List <Texture2DParamInfo>();

            foreach (Node n in gCopy.Nodes)
            {
                if (n is ParamNode_Float)
                {
                    FloatParams.Add(((ParamNode_Float)n).Param);
                }
                else if (n is ParamNode_Texture2D)
                {
                    Tex2DParams.Add(((ParamNode_Texture2D)n).Param);
                }
            }
        }