public unsafe void ReadFrom(ref byte *Buffer) { lightIntensity = Buffer[0]; Buffer++; spherePosition = new SpherePosition(ref Buffer); }
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); }
public void Clear(bool RaiseChangedEvent) { if (RaiseChangedEvent) { LightIntensity = 0; SpherePosition = new SpherePosition(0, 0); } else { lightIntensity = 0; spherePosition = new SpherePosition(0, 0); } }
public LightShading(byte LightIntensity, SpherePosition Position) { this.lightIntensity = LightIntensity; this.spherePosition = Position; }