Пример #1
0
        public unsafe void ReadFrom(ref byte *Buffer)
        {
            lightIntensity = Buffer[0];
            Buffer++;

            spherePosition = new SpherePosition(ref Buffer);
        }
Пример #2
0
        public int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            lightIntensity = Buffer[cursor];
            cursor++;

            spherePosition = new SpherePosition(Buffer, cursor);
            cursor        += spherePosition.ByteLength;

            return(cursor - StartIndex);
        }
Пример #3
0
 public void Clear(bool RaiseChangedEvent)
 {
     if (RaiseChangedEvent)
     {
         LightIntensity = 0;
         SpherePosition = new SpherePosition(0, 0);
     }
     else
     {
         lightIntensity = 0;
         spherePosition = new SpherePosition(0, 0);
     }
 }
Пример #4
0
 public LightShading(byte LightIntensity, SpherePosition Position)
 {
     this.lightIntensity = LightIntensity;
     this.spherePosition = Position;
 }