Tesla Graphics Engine Documentation (January 2012)
LightCollection Class
TeslaTesla.SceneLightCollection
Collection for managing a list of lights in the 3D world. Lights can be sorted based on an IRenderable's position in the world, otherwise a light collection is little more than a container.
Declaration Syntax
C#
public class LightCollection : ILightCollection, 
	IEnumerable<Light>, IEnumerable, ISavable
Members
All Members Constructors Methods Properties



Icon Member Description
LightCollection()()()()
Creates a default light state with black global ambient color and a maximum of 4 lights.

LightCollection(Int32, Color)
Creates a light state with the specified parameters.

Add(Light)
Add a light to the state's list.

Clear()()()()
Clears lights from the state's list.

CopyLights(ILightCollection)
Copies all the lights contained from the specified collection, but preserves the lights already present in this collection.

CopyLights(ILightCollection, Int32)
Copies the specified amount of lights contained from the specified collection, but preserves the lights already present in this collection.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetEnumerator()()()()
Returns an enumerator that iterates through the collection.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
GlobalAmbient
Get or set the global ambient value. Default is black.

IsEnabled
Get or set if this light state should be enabled.

Item[([( Int32])])
Gets the light at the specified index.

LightCount
Get the total number of lights.

MaxLights
Get or set the maximum lights to be used. If more lights are added, only the closest ones will be active. Default is 4, corresponding to the default shader library.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Read(ISavableReader)
Deserializes the object and populates it from the input.

RefreshShader
Get or set if this light state values have changed and need to be sent to the shader.

Remove(Light)
Removes a light from the state's list.

RemoveAt(Int32)
Removes the light at the specified index.

Set(ILightCollection)
Resets the collection's data and copies the input light collection's data.

Set(ILightCollection, Boolean)
Sets the specified lights.

SortLights(IRenderable)
Sorts lights "closest" to the specified geometry that will affect it the most, only if the number of lights contained in the state exceeds the set maximum light count.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Write(ISavableWriter)
Serializes the object and writes it to the output.

Inheritance Hierarchy
Object
LightCollection

Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)