System.Collections.Generic.ICollection.Add(VertexElement)

Here are the examples of the csharp api System.Collections.Generic.ICollection.Add(VertexElement) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : VertexDeclaration.cs
with GNU General Public License v3.0
from ahmed605

private void DecodeSingleElement(ICollection<VertexElement> list, int index, int streamIndex, VertexElementUsage usage, ref int usageIndex)
        {
            var declTypes = DeclarationTypes;
            var usageFlags = UsageFlags;
            var usageFlagMask = (uint)(1 << index);
            var type = GetType(declTypes, index);
            var size = GetSize(type);

            if ((usageFlags & usageFlagMask) != 0)
            {
                var element = new VertexElement()
                                  {
                                      UsageIndex = usageIndex++,
                                      StreamIndex = streamIndex,
                                      Usage = usage,
                                      Type = type,
                                      Size = size,
                                  };
                list.Add(element);
            }
        }