示例#1
0
            /// <summary>
            ///
            /// </summary>
            /// <returns></returns>
            public byte[] GetBytes()
            {
                byte[] data = new byte[16];

                // Alpha channel in color is intensity
                LLColor tmpColor = Color;

                tmpColor.A = Intensity;
                tmpColor.GetBytes().CopyTo(data, 0);
                Helpers.FloatToBytes(Radius).CopyTo(data, 4);
                Helpers.FloatToBytes(Cutoff).CopyTo(data, 8);
                Helpers.FloatToBytes(Falloff).CopyTo(data, 12);

                return(data);
            }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="data"></param>
 public void PackColor(LLColor data)
 {
     byte[] bytes = data.GetBytes();
     PackBitArray(bytes, 32);
 }