# Light class

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[Serializable]
public class Light : GeometryBase
```

Represents a light that shines in the modeling space.

## Constructors

- [Light](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/ctor.md): (2 overloads) Initializes a new light.

## Fields

- [ConstantAttenuationVector](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/constantattenuationvector.md): (static) Vector denoting a constant light attenuation.
- [InverseSquaredAttenuationVector](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/inversesquaredattenuationvector.md): (static) Vector denoting an inverse squared light attenuation.
- [LinearAttenuationVector](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/linearattenuationvector.md): (static) Vector denoting a linear light attenuation.

## Properties

- [Ambient](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/ambient.md): Gets or sets the ambient color.
- [AttenuationType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/attenuationtype.md): Get the type of attenuation for this light.
- [AttenuationVector](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/attenuationvector.md): Gets or Sets the attenuation vector.
- [CoordinateSystem](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/coordinatesystem.md): Gets a value, determined by LightStyle, that explains whether the camera directions are relative to World or Camera spaces.
- [Diffuse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/diffuse.md): Gets or sets the diffuse color.
- [Direction](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/direction.md): Gets or sets the vector direction of the camera.
- [HotSpot](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/hotspot.md): The hot spot setting runs from 0.0 to 1.0 and is used to provides a linear interface for controlling the focus or concentration of a spotlight. A hot spot setting of 0.0 corresponds to a spot exponent of 128. A hot spot setting of 1.0 corresponds to a spot exponent of 0.0.
- [Id](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/id.md): Gets the ID of this light.
- [Intensity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/intensity.md): Gets or sets the light intensity.
- [IsDirectionalLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/isdirectionallight.md): Gets a value indicating whether the light style is [Light.LightStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/lightstyle.md) CameraDirectional or WorldDirectional.
- [IsEnabled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/isenabled.md): Gets or sets a value that defines if the light is turned on (true) or off (false).
- [IsLinearLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/islinearlight.md): Gets a value indicating whether the light style is [Light.LightStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/lightstyle.md) WorldLinear.
- [IsPointLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/ispointlight.md): Gets a value indicating whether the light style is [Light.LightStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/lightstyle.md) CameraPoint or WorldPoint.
- [IsRectangularLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/isrectangularlight.md): Gets a value indicating whether the light style is [Light.LightStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/lightstyle.md) WorldRectangular.
- [IsSpotLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/isspotlight.md): Gets a value indicating whether the light style is [Light.LightStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/lightstyle.md) CameraSpot or WorldSpot.
- [IsSunLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/issunlight.md): Gets a value indicating whether this object is a Sun light.
- [Length](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/length.md): Gets or sets the height in linear and rectangular lights. (ignored for non-linear/rectangular lights.)
- [LightStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/lightstyle.md): Gets or sets a light style on this camera.
- [Location](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/location.md): Gets or sets the light or 3D position or location.
- [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/name.md): Gets or sets the light name.
- [PerpendicularDirection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/perpendiculardirection.md): Gets a perpendicular vector to the camera direction.
- [PowerCandela](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/powercandela.md): Gets or sets the light power in candelas (cd).
- [PowerLumens](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/powerlumens.md): Gets or sets the light power in lumens (lm).
- [PowerWatts](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/powerwatts.md): Gets or sets the light power in watts (W).
- [Radius](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/radius.md): Gets or sets the emitter radius (of the emitting sphere, in model units) for point and spot lights. Ignored for other light types; linear light radius is derived from [Light.Width](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/width.md).
- [ShadowIntensity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/shadowintensity.md): Gets or sets the shadow intensity for the light.
- [Specular](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/specular.md): Gets or sets the specular color.
- [SpotAngleRadians](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/spotangleradians.md): Gets or sets the spot angle in radians. Ignored for non-spot lights. angle = 0 to pi/2 (0 to 90 degrees).
- [SpotExponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/spotexponent.md): The spot exponent varies from 0.0 to 128.0 and provides an exponential interface for controlling the focus or concentration of a spotlight (like the OpenGL GL_SPOT_EXPONENT parameter). The spot exponent and hot spot parameters are linked; changing one will change the other. A hot spot setting of 0.0 corresponds to a spot exponent of 128. A hot spot setting of 1.0 corresponds to a spot exponent of 0.0.
- [SpotLightShadowIntensity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/spotlightshadowintensity.md): (obsolete) Gets or sets the spot light shadow intensity. (ignored for non-spot lights.)
- [Width](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/width.md): Gets or sets the width in linear and rectangular lights. (ignored for non-linear/rectangular lights.)

## Methods

- [CreateSunLight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/createsunlight.md): (3 overloads, static) Constructs a light which simulates the Sun based on a given time and location on Earth.
- [GetAttenuation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/getattenuation.md): Gets the attenuation settings (ignored for "directional" and "ambient" lights). attenuation = 1/(a0 + d*a1 + d^2*a2) where d = distance to light.
- [GetSpotLightRadii](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/getspotlightradii.md): Gets the spot light radii.
- [SetAttenuation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.light/setattenuation.md): Sets the attenuation settings (ignored for "directional" and "ambient" lights). attenuation = 1/(a0 + d*a1 + d^2*a2) where d = distance to light.

## Inherited Members

- From [GeometryBase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase.md): [HasBrepForm](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/hasbrepform.md), [IsDeformable](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/isdeformable.md), [IsDocumentControlled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/isdocumentcontrolled.md), [IsShallowDuplicate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/isshallowduplicate.md), [ObjectType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/objecttype.md), [UserStringCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/userstringcount.md), [ComponentIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/componentindex.md), [DataCRC](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/datacrc.md), [DeleteAllUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/deletealluserstrings.md), [DeleteUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/deleteuserstring.md), [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/dispose.md), [Duplicate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/duplicate.md), [DuplicateShallow](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/duplicateshallow.md), [GetBoundingBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/getboundingbox.md), [GetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/getuserstring.md), [GetUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/getuserstrings.md), [MakeDeformable](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/makedeformable.md), [MemoryEstimate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/memoryestimate.md), [NonConstOperation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/nonconstoperation.md), [OnSwitchToNonConst](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/onswitchtononconst.md), [Rotate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/rotate.md), [Scale](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/scale.md), [SetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/setuserstring.md), [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/transform.md), [Translate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase/translate.md)
- From [CommonObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject.md): [Disposed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/disposed.md), [HasUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/hasuserdata.md), [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalid.md), [UserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdata.md), [UserDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdictionary.md), [ConstructConstObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/constructconstobject.md), [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/dispose.md), [EnsurePrivateCopy](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/ensureprivatecopy.md), [GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/getobjectdata.md), [IsValidWithLog](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalidwithlog.md), [ToJSON](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/tojson.md)
