Esempio n. 1
0
        public static void RegisterNodeGuids <T>(INodeOut node, string friendlyname)
        {
            List <Guid> result = new List <Guid>();

            AddType(result, typeof(T));
            node.SetSubType(result.ToArray(), friendlyname);
        }
Esempio n. 2
0
        public static INodeOut CreateNodeOutput(this IPluginHost host, OutputAttribute attribute, Type type)
        {
            INodeOut result = null;

            host.CreateNodeOutput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);

            // Register all implemented interfaces and inherited classes of T
            // to support the assignment of ISpread<Apple> output to ISpread<Fruit> input.
            var guids = new List <Guid>();
            var typeT = type;

            foreach (var interf in typeT.GetInterfaces())
            {
                guids.Add(interf.GUID);
            }

            while (typeT != null)
            {
                guids.Add(typeT.GUID);
                typeT = typeT.BaseType;
            }

            result.SetSubType2(type, guids.ToArray(), type.GetCSharpName());
            result.Order = attribute.Order;
            return(result);
        }
Esempio n. 3
0
        public DX11OutputPin(DX11Node parentnode, IPin hdePin, IPluginIO pluginIO) : base(parentnode, hdePin, pluginIO)
        {
            this.ChildrenPins = new List <DX11InputPin>();
            this.ParentNode.OutputPins.Add(this);

            INodeOut nodeout = (INodeOut)this.PluginIO;

            this.isFeedBackPin = nodeout.AllowFeedback;
        }
Esempio n. 4
0
 public NodeOutStream(INodeOut nodeOut, IConnectionHandler handler)
 {
     FNodeOut = nodeOut;
     if (UsesDynamicAssembly(typeof(T)))
     {
         FNodeOut.SetInterface(new DynamicTypeWrapper(this));
         FNodeOut.SetConnectionHandler(handler, new DynamicTypeWrapper(this));
     }
     else
     {
         FNodeOut.SetInterface(this);
         FNodeOut.SetConnectionHandler(handler, this);
     }
 }
        public DX11ResourceOutputStream(INodeOut nodeOut, bool isSingle)
        {
            FNodeOut = nodeOut;
            FNodeOut.SetInterface(this);

            IConnectionHandler connectionHandler;

            if (isSingle)
            {
                connectionHandler = new DX11SingleResourceConnectionHandler(nodeOut);
            }
            else
            {
                connectionHandler = new DX11ResourceConnectionHandler();
            }
            FNodeOut.SetConnectionHandler(connectionHandler, this);
        }
        public static INodeOut CreateNodeOutput(this IPluginHost host, OutputAttribute attribute, Type type)
        {
            INodeOut result = null;

            host.CreateNodeOutput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);

            if (type != null)
            {
                // Register all implemented interfaces and inherited classes of T
                // to support the assignment of ISpread<Apple> output to ISpread<Fruit> input.
                var guids = new List <Guid>();

                RegisterID(host, guids, type);

                foreach (var interf in type.GetInterfaces())
                {
                    RegisterID(host, guids, interf);
                }

                var t = type.BaseType;
                while (t != null)
                {
                    RegisterID(host, guids, t);
                    t = t.BaseType;
                }

                result.SetSubType2(type, guids.ToArray(), type.GetCSharpName());
            }
            else
            {
                result.SetSubType(new Guid[] { }, "Variant");
            }

            SetOutputProperties(result, attribute);
            return(result);
        }
 public DX11SingleResourceConnectionHandler(INodeOut nodeOut)
 {
     this.nodeOut = nodeOut;
 }
Esempio n. 8
0
 public NodeOutStream(INodeOut nodeOut)
     : this(nodeOut, null)
 {
 }
Esempio n. 9
0
        public void CreateNodeOutput(string Name, TSliceMode SliceMode, TPinVisibility Visibility, out INodeOut Pin)
        {
            Pin = new TNodePin(this, Name, TPinDirection.Output, SliceMode, Visibility);

            AddPin(Pin as TBasePin);
        }
Esempio n. 10
0
 public NodeOutStream(INodeOut nodeOut)
     : this(nodeOut, new DefaultConnectionHandler())
 {
 }
Esempio n. 11
0
 public MouseStateToMouseOutStream(INodeOut nodeOut)
 {
     FNodeOut = nodeOut;
     FNodeOut.SetInterface(FMouses.Stream);
 }
Esempio n. 12
0
 public KeyboardStateToKeyboardOutStream(INodeOut nodeOut)
 {
     FNodeOut = nodeOut;
     FNodeOut.SetInterface(FKeyboards.Stream);
 }
Esempio n. 13
0
 public MouseStateToMouseOutStream(INodeOut nodeOut)
 {
     FNodeOut = nodeOut;
     FNodeOut.SetInterface(FMouses.Stream);
     SetLength(nodeOut.SliceCount);
 }
Esempio n. 14
0
 public KeyboardStateToKeyboardOutStream(INodeOut nodeOut)
 {
     FNodeOut = nodeOut;
     FNodeOut.SetInterface(FKeyboards.Stream);
     SetLength(nodeOut.SliceCount);
 }
Esempio n. 15
0
 public DX11SingleResourceConnectionHandler(INodeOut nodeOut)
 {
     this.nodeOut = nodeOut;
 }
Esempio n. 16
0
 public NodeOutStream(INodeOut nodeOut, IConnectionHandler handler)
 {
     FNodeOut = nodeOut;
     FNodeOut.SetInterface(this);
     FNodeOut.SetConnectionHandler(handler, this);
 }
Esempio n. 17
0
 public DX11ResourceOutputStream(INodeOut nodeOut)
 {
     FNodeOut = nodeOut;
     FNodeOut.SetInterface(this);
     FNodeOut.SetConnectionHandler(new DX11ResourceConnectionHandler(), this);
 }