예제 #1
0
 public static ProjectionParam FromUdpDataBlock(byte[] value)
 {
     if (value.Length < 28)
     {
         return(new ProjectionParam());
     }
     return(new ProjectionParam
     {
         IsProjecting = true,
         ProjectionTextureID = new UUID(value, 0),
         ProjectionFOV = ConversionMethods.LEBytes2Float(value, 16),
         ProjectionFocus = ConversionMethods.LEBytes2Float(value, 20),
         ProjectionAmbience = ConversionMethods.LEBytes2Float(value, 24)
     });
 }
예제 #2
0
        public static PointLightParam FromUdpDataBlock(byte[] value)
        {
            if (value.Length < 16)
            {
                return(new PointLightParam());
            }

            return(new PointLightParam
            {
                IsLight = true,
                LightColor = new Color {
                    R_AsByte = value[0], G_AsByte = value[1], B_AsByte = value[2]
                },
                Intensity = value[3] / 255f,
                Radius = ConversionMethods.LEBytes2Float(value, 4),
                Cutoff = ConversionMethods.LEBytes2Float(value, 8),
                Falloff = ConversionMethods.LEBytes2Float(value, 12)
            });
        }