예제 #1
0
 public ChannelControl(bool enable, ColorSrc matSrcColor, LightId litMask, DiffuseFn diffFn, J3DAttenuationFn attenFn, ColorSrc ambSrcColor)
 {
     Enable              = enable;
     MaterialSrcColor    = matSrcColor;
     LitMask             = litMask;
     DiffuseFunction     = diffFn;
     AttenuationFunction = attenFn;
     AmbientSrcColor     = ambSrcColor;
 }
예제 #2
0
        public ChannelControl(EndianBinaryReader reader)
        {
            Enable              = reader.ReadBoolean();
            MaterialSrcColor    = (ColorSrc)reader.ReadByte();
            LitMask             = (LightId)reader.ReadByte();
            DiffuseFunction     = (DiffuseFn)reader.ReadByte();
            AttenuationFunction = (J3DAttenuationFn)reader.ReadByte();
            AmbientSrcColor     = (ColorSrc)reader.ReadByte();

            reader.SkipInt16();
        }
예제 #3
0
        public void AddChannelControl(J3DColorChannelId id, bool enable, ColorSrc MatSrcColor, LightId litId, DiffuseFn diffuse, J3DAttenuationFn atten, ColorSrc ambSrcColor)
        {
            ChannelControl control = new ChannelControl
            {
                Enable              = enable,
                MaterialSrcColor    = MatSrcColor,
                LitMask             = litId,
                DiffuseFunction     = diffuse,
                AttenuationFunction = atten,
                AmbientSrcColor     = ambSrcColor
            };

            if (ChannelControls[(int)id] == null)
            {
                ColorChannelControlsCount++;
            }

            ChannelControls[(int)id] = control;
        }