static IsometricBlockDrawer() { FastColour.GetShaded(FastColour.White, out colXSide, out colZSide, out colYBottom); cosX = (float)Math.Cos(26.565f * Utils.Deg2Rad); sinX = (float)Math.Sin(26.565f * Utils.Deg2Rad); cosY = (float)Math.Cos(-45f * Utils.Deg2Rad); sinY = (float)Math.Sin(-45f * Utils.Deg2Rad); }
void ResetLight() { Shadowlight = DefaultShadowlight; FastColour.GetShaded(Shadowlight, ref ShadowlightXSide, ref ShadowlightZSide, ref ShadowlightYBottom); Sunlight = DefaultSunlight; FastColour.GetShaded(Sunlight, ref SunlightXSide, ref SunlightZSide, ref SunlightYBottom); }
static IsometricBlockDrawer() { FastColour.GetShaded(FastColour.White, out colXSide, out colZSide, out colYBottom); transform = Matrix4.RotateY(45 * Utils.Deg2Rad) * Matrix4.RotateX(-30f * Utils.Deg2Rad); cosX = (float)Math.Cos(30f * Utils.Deg2Rad); sinX = (float)Math.Sin(30f * Utils.Deg2Rad); cosY = (float)Math.Cos(-45f * Utils.Deg2Rad); sinY = (float)Math.Sin(-45f * Utils.Deg2Rad); }
/// <summary> Sets the current shadowlight colour, and raises the /// EnvVariableChanged event with the variable 'ShadowlightColour'. </summary> public void SetShadowlight(FastColour col) { if (col == Shadowlight) { return; } Shadowlight = col; Set(col, ref Shadowlight, EnvVar.ShadowlightColour); FastColour.GetShaded(Shadowlight, ref ShadowlightXSide, ref ShadowlightZSide, ref ShadowlightYBottom); game.MapEvents.RaiseEnvVariableChanged(EnvVar.ShadowlightColour); }
static IsometricBlockDrawer() { FastColour.GetShaded(FastColour.White, out colXSide, out colZSide, out colYBottom); Matrix4 rotY, rotX; Matrix4.RotateY(out rotY, 45 * Utils.Deg2Rad); Matrix4.RotateX(out rotX, -30f * Utils.Deg2Rad); Matrix4.Mult(out transform, ref rotY, ref rotX); cosX = (float)Math.Cos(30f * Utils.Deg2Rad); sinX = (float)Math.Sin(30f * Utils.Deg2Rad); cosY = (float)Math.Cos(-45f * Utils.Deg2Rad); sinY = (float)Math.Sin(-45f * Utils.Deg2Rad); }