Packagecom.yogurt3d.core.lights
Classpublic class Light
InheritanceLight Inheritance SceneObject Inheritance EngineObject Inheritance Object
Subclasses RenderableLight

This class is a scene object representing a light. It is not visible but it effect the rendering process.



Public Properties
 PropertyDefined By
 InheritedaabbWireframe : EAabbDrawMode
SceneObject
  attenuation : Vector.<Number>
Light
 InheritedaxisAlignedBoundingBox : AxisAlignedBoundingBox
[read-only]
SceneObject
 InheritedboundingSphere : BoundingSphere
[read-only]
SceneObject
 Inheritedchildren : Vector.<SceneObject>
[read-only]
SceneObject
  color : Color
Light
  coneAngles : Vector.<Number>
[read-only]
Light
 InheritedcumulativeAxisAlignedBoundingBox : AxisAlignedBoundingBox
[read-only]
SceneObject
 InheritedcumulativeBoundingSphere : BoundingSphere
[read-only]
SceneObject
  directionVector : Vector.<Number>
[read-only]
Light
  frustum : Frustum
[read-only]
Light
  innerConeAngle : Number
Light
  intensity : Number
Intensity of the light.
Light
 InheritedisStatic : Boolean
SceneObject
 InheritedonAddedToScene : Signal
[read-only]
SceneObject
 InheritedonMouseClick : Signal
[read-only]
SceneObject
 InheritedonMouseDoubleClick : Signal
[read-only]
SceneObject
 InheritedonMouseDown : Signal
[read-only]
SceneObject
 InheritedonMouseMove : Signal
[read-only]
SceneObject
 InheritedonMouseOut : Signal
[read-only]
SceneObject
 InheritedonMouseOver : Signal
[read-only]
SceneObject
 InheritedonMouseUp : Signal
[read-only]
SceneObject
 InheritedonRemovedFromScene : Signal
[read-only]
SceneObject
 InheritedonRenderLayerChanged : Signal
[read-only]
SceneObject
 InheritedonStaticChanged : Signal
[read-only]
SceneObject
  outerConeAngle : Number
Light
 Inheritedparent : SceneObject
[read-only]
SceneObject
  positionVector : Vector.<Number>
[read-only]
Light
  range : Number
Light
 InheritedrenderLayer : int
SceneObject
 Inheritedroot : SceneObject
[read-only]
SceneObject
 Inheritedscene : IScene
[read-only]
SceneObject
  shadowColor : Color
Changes shadow color and alpha
Light
  shadowMap : RenderTextureTarget
Light
  shadowMap2 : RenderTextureTarget
Light
  shadows : EShadowType
Light
 InheritedsystemID : String
[read-only] Automatically assigned id.
EngineObject
 Inheritedtransformation : Transformation
[read-only]
SceneObject
  type : ELightType
Light
 InheriteduserID : String
Identification string can be assigned by developer to identify objects.
EngineObject
 Inheritedvisible : Boolean
SceneObject
Public Methods
 MethodDefined By
  
Light(_type:ELightType = null, _color:uint = 0xFFFFFF, _intensity:Number = 1)
Light
 Inherited
addChild(_value:SceneObject):void
SceneObject
 Inherited
[override]
SceneObject
 Inherited
containsChild(_child:SceneObject, _recursive:Boolean = false):Boolean
SceneObject
 Inherited
dispose():void
[override]
SceneObject
 Inherited
[override]
SceneObject
 Inherited
disposeGPU():void
[override]
SceneObject
 Inherited
SceneObject
 Inherited
SceneObject
 Inherited
Removes all external referances and clears internals.
EngineObject
 Inherited
SceneObject
 Inherited
removeChildBySystemID(_value:String):void
SceneObject
 Inherited
removeChildByUserID(_value:String):void
SceneObject
 Inherited
renew():void
Renews object internals and resets properties of object.
EngineObject
  
sets the projection matrix of the light according to light type and the outer angle is used for shadow map generation
Light
  
toString():String
[override] Returns a string identifier on this object
Light
  
Light
Protected Methods
 MethodDefined By
  
[override]
Light
 Inherited
[override]
SceneObject
Property Detail
attenuationproperty
attenuation:Vector.<Number>


Implementation
    public function get attenuation():Vector.<Number>
    public function set attenuation(value:Vector.<Number>):void
colorproperty 
color:Color


Implementation
    public function get color():Color
    public function set color(value:Color):void
coneAnglesproperty 
coneAngles:Vector.<Number>  [read-only]


Implementation
    public function get coneAngles():Vector.<Number>
directionVectorproperty 
directionVector:Vector.<Number>  [read-only]


Implementation
    public function get directionVector():Vector.<Number>
frustumproperty 
frustum:Frustum  [read-only]


Implementation
    public function get frustum():Frustum
innerConeAngleproperty 
innerConeAngle:Number

The default value is 0.8 (36 degrees).


Implementation
    public function get innerConeAngle():Number
    public function set innerConeAngle(value:Number):void
intensityproperty 
intensity:Number

Intensity of the light. Allowed values are between 0-1, from dark to light sequentially.


Implementation
    public function get intensity():Number
    public function set intensity(value:Number):void
outerConeAngleproperty 
outerConeAngle:Number

The default value is 0.8 (36 degrees).


Implementation
    public function get outerConeAngle():Number
    public function set outerConeAngle(value:Number):void
positionVectorproperty 
positionVector:Vector.<Number>  [read-only]


Implementation
    public function get positionVector():Vector.<Number>
rangeproperty 
range:Number


Implementation
    public function get range():Number
    public function set range(value:Number):void
shadowColorproperty 
shadowColor:Color

Changes shadow color and alpha


Implementation
    public function get shadowColor():Color
    public function set shadowColor(value:Color):void
shadowMapproperty 
shadowMap:RenderTextureTarget


Implementation
    public function get shadowMap():RenderTextureTarget
    public function set shadowMap(value:RenderTextureTarget):void
shadowMap2property 
shadowMap2:RenderTextureTarget


Implementation
    public function get shadowMap2():RenderTextureTarget
    public function set shadowMap2(value:RenderTextureTarget):void
shadowsproperty 
shadows:EShadowType


Implementation
    public function get shadows():EShadowType
    public function set shadows(value:EShadowType):void
typeproperty 
type:ELightType


Implementation
    public function get type():ELightType
    public function set type(value:ELightType):void
Constructor Detail
Light()Constructor
public function Light(_type:ELightType = null, _color:uint = 0xFFFFFF, _intensity:Number = 1)

Parameters
_type:ELightType (default = null)
 
_color:uint (default = 0xFFFFFF)
 
_intensity:Number (default = 1)
Method Detail
initInternals()method
override protected function initInternals():void

setProjection()method 
public function setProjection():void

sets the projection matrix of the light according to light type and the outer angle is used for shadow map generation

toString()method 
override public function toString():String

Returns a string identifier on this object

Returns
String
updateProjectionDirectional()method 
public function updateProjectionDirectional():void