Class SpotLight
A spot light.
Examples
// Visualize the light with a small, constant-colored "light bulb".
var lightMaterial = new Material("Light", Colors.White, unlit: true);
var t = new Transform(0, 0, 5);
var lightBulb = new Mass(Polygon.Rectangle(0.1, 0.1), 0.1, lightMaterial, transform: t);
var floor = new Floor(Polygon.Rectangle(20, 20), 0.1);
var spotLight = new SpotLight(Colors.White, t, 20, 0, 1.0);
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Elements
Assembly: Hypar.Elements.dll
Syntax
public class SpotLight : Light, INotifyPropertyChanged
Constructors
SpotLight(Color, Transform, Double, Double, Double, Guid, String)
Construct a spot light.
Declaration
public SpotLight(Color color, Transform transform, double intensity = 1, double innerConeAngle = 0, double outerConeAngle = 0.78539816339744828, Guid id = default(Guid), string name = null)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The light's color. |
Transform | transform | The light's transform. |
System.Double | intensity | The light's intensity measured in candela. |
System.Double | innerConeAngle | The light's inner cone angle. |
System.Double | outerConeAngle | The light's outer cone angle. |
System.Guid | id | The light's unique identifier. |
System.String | name | The light's name. |
Properties
InnerConeAngle
The inner cone angle in radians.
Declaration
public double InnerConeAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
OuterConeAngle
The outer cone angle in radians.
Declaration
public double OuterConeAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Implements
System.ComponentModel.INotifyPropertyChanged