Tesla Graphics Engine Documentation (January 2012)
PointLight Class
TeslaTesla.GraphicsPointLight
Represents an omni-directional light source located at a specific point in world space.
Declaration Syntax
C#
public class PointLight : Light
Members
All Members Constructors Methods Properties



Icon Member Description
PointLight()()()()
Creates a new instance of PointLight that has a positioned at the origin.

PointLight(Vector3)
Creates a new PointLight.

Ambient
Gets or sets the ambient contribution of this light, which is the color that appears to be coming from everywhere. Default: Color(.4f, .4f, .4f, 1.0f);
(Inherited from Light.)
Attenuate
Gets or sets if this light should attenuate. Note, some lights may ignore this (e.g. Directional lights should never attenuate) Default: True
(Inherited from Light.)
Constant
Gets or sets the attenuation constant, which is part of this formula: 1 / (C + L*d + Q*d*d) Where C,L, and Q are the attenuation values and d is the distance from the light source to the part of the object being lit. Default: 1.0f
(Inherited from Light.)
Diffuse
Gets or sets the diffuse contribution of this light, which is the color directly from the light source. Default: Color(1.0f, 1.0f, 1.0f, 1.0f)
(Inherited from Light.)
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.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
IsEnabled
Gets or sets if this light should be enabled or not. Default: True
(Inherited from Light.)
LightType
Gets the light type, in this case LightType.Point.
(Overrides Light.LightType.)
Linear
Gets or sets the attenuation linear value, which is part of this formula: 1 / (C + L*d + Q*d*d) Where C,L, and Q are the attenuation values and d is the distance from the light source to the part of the object being lit. Default: 0.0f
(Inherited from Light.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Name
Gets or sets the name of this light.
(Inherited from Light.)
Position
Gets or sets the position of the light in world space.

Quadratic
Gets or sets the attenuation quadratic value, which is part of this formula: 1 / (C + L*d + Q*d*d) Where C,L, and Q are the attenuation values and d is the distance from the light source to the part of the object being lit. Default: 0.0f
(Inherited from Light.)
Read(ISavableReader)
Deserializes this PointLight.
(Overrides Light.Read(ISavableReader).)
SetPosition(Single, Single, Single)
Convienence method for setting the position of this PointLight in world space

Specular
Gets or sets the specular contribution of this light, which is the color reflected by an object depending on how shiny it is. Default: Color(1.0f, 1.0f, 1.0f, 1.0f)
(Inherited from Light.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Write(ISavableWriter)
Serializes this PointLight.
(Overrides Light.Write(ISavableWriter).)
Inheritance Hierarchy
Object
Light
  PointLight

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