public Light CreateDirectionalLight(Vector3 direction, Vector3 color, bool castShadows = false, float shadowRange = 64.0f, float shadowBias = 0.001f, float intensity = 1.0f) { var light = new Light { Type = LighType.Directional, Direction = direction, Color = color, CastShadows = castShadows, ShadowBias = shadowBias, Range = shadowRange, Intensity = intensity }; Lights.Add(light); return light; }
public Light CreateSpotLight(Vector3 position, Vector3 direction, float innerAngle, float outerAngle, float range, Vector3 color, bool castShadows = false, float shadowBias = 0.001f, float intensity = 1.0f) { direction.Normalize(); var light = new Light { Type = LighType.SpotLight, Position = position, Range = range, Color = color, Direction = direction, InnerAngle = innerAngle, OuterAngle = outerAngle, CastShadows = castShadows, ShadowBias = shadowBias, Intensity = intensity }; Lights.Add(light); return light; }
public Light CreatePointLight(Vector3 position, float range, Vector3 color, bool castShadows = false, float shadowBias = 0.001f, float intensity = 1.0f) { var light = new Light { Type = LighType.PointLight, Position = position, Range = range, Color = color, CastShadows = castShadows, ShadowBias = shadowBias, Intensity = intensity }; Lights.Add(light); return light; }
public void RemoveLight(Light light) { Lights.Remove(light); }