コード例 #1
0
            public unsafe void SetValue(VertexElement element, Microsoft.Xna.Framework.Graphics.PackedVector.Byte4 value)
            {
                if (element.VertexElementFormat != VertexElementFormat.Byte4)
                {
                    throw new ArgumentException(nameof(element));
                }

                var dst = _Vertex.Slice(element.Offset, sizeof(Microsoft.Xna.Framework.Graphics.PackedVector.Byte4));

                System.Runtime.InteropServices.MemoryMarshal.Write(dst, ref value);
            }
コード例 #2
0
 /// <summary>
 /// Returns a value that indicates whether the current instance is equal to a
 /// specified object.
 /// </summary>
 /// <param name="other">The object with which to make the comparison.</param>
 /// <returns>
 /// True if the current instance is equal to the specified object; false otherwise.
 /// </returns>
 public bool Equals(Byte4 other)
 {
     return(this == other);
 }