Assembly: Sandbox.Game.dll

public class MyLight

Properties

Member Description
CastShadows
Color
DiffuseFactor
Falloff Exponential falloff (1 = linear, 2 = quadratic, etc)
GlareIntensity
GlareMaxDistance
GlareOn
GlareQueryFreqMinMs
GlareQueryFreqRndMs
GlareQueryShift
GlareQuerySize
GlareSize
GlareType
GlossFactor
Intensity
LightOn If true, we use the light in lighting calculation. Otherwise it's like turned off, but still in the buffer.
LightSourceType
LightType
ParentID
PointLightOffset
Position
Range
ReflectorColor
ReflectorConeDegrees Sets reflector cone angle in degrees, minimum is 0, teoretical maximum is 180
ReflectorConeMaxAngleCos
ReflectorConeRadians Sets reflector cone angle in degrees, minimum is 0, teoretical maximum is PI
ReflectorDiffuseFactor
ReflectorDirection
ReflectorFalloff
ReflectorGlossFactor
ReflectorIntensity Reflector parameters are also parameters for spot light
ReflectorOn
ReflectorRange
ReflectorTexture
ReflectorUp
RenderObjectID
SubGlares

Constructors

Member Description
MyLight()

Methods

Member Description
Clear() Can be called only from MyLights.RemoveLight.
MarkPositionDirty()
SpotlightNotTooLarge(float, float) When setting Reflector properties, use this function to test whether properties are in bounds and light AABB is not too large. Properties which affects calculations are ReflectorRange and ReflectorConeMaxAngleCos (ReflectorConeDegrees, ReflectorConeRadians)
Start(Vector3D, Vector4, float, string)
Start(Vector4, float, string)
Start(string) IMPORTANT: This class isn't realy inicialized by constructor, but by Start()
UpdateLight()
UpdateReflectorRangeAndAngle(float, float) Use when setting both values and previous state of both value is undefined