Packagesandy.materials.attributes
Classpublic class ALightAttributes
ImplementsIAttributes
SubclassesCelShadeAttributes, GouraudAttributes, LightAttributes, PhongAttributes

ABSTRACT CLASS - super class for all light attributes.

This class should not be directly instatiated, but sub classed.
The ALightAttributes class implements Blinn flavor of Phong reflection model.



Public Properties
 PropertyDefined by
  ambient : Number
Ambient reflection factor.
ALightAttributes
  diffuse : Number
Diffuse reflection factor.
ALightAttributes
  flags : uint
[read-only] Flags for the attribute.
ALightAttributes
  gloss : Number
Specular exponent.
ALightAttributes
  specular : Number
Specular reflection factor.
ALightAttributes
Public Methods
 MethodDefined by
  
draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void
Draws light on shape.
ALightAttributes
  
drawOnSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void
Draws light on sprite.
ALightAttributes
Property detail
ambientproperty
ambient:Number  [read-write]

Ambient reflection factor.

Note that since geometry of sprites is unknown, this is going to be the only lighting setting affecting them, so you would typically need to set it to bigger value than you would for shapes.

The default value is 0.3.

Implementation
    public function get ambient():Number
    public function set ambient(value:Number):void
diffuseproperty 
diffuse:Number  [read-write]

Diffuse reflection factor.

The default value is 1.0.

Implementation
    public function get diffuse():Number
    public function set diffuse(value:Number):void
flagsproperty 
flags:uint  [read-only]

Flags for the attribute.

Implementation
    public function get flags():uint
glossproperty 
gloss:Number  [read-write]

Specular exponent.

The default value is 5.0.

Implementation
    public function get gloss():Number
    public function set gloss(value:Number):void
specularproperty 
specular:Number  [read-write]

Specular reflection factor.

The default value is 0.0.

Implementation
    public function get specular():Number
    public function set specular(value:Number):void
Method detail
draw()method
public function draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void

Draws light on shape.

Parameters
p_oGraphics:Graphics
 
p_oPolygon:Polygon
 
p_oMaterial:Material
 
p_oScene:Scene3D
drawOnSprite()method 
public function drawOnSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void

Draws light on sprite.

Parameters
p_oSprite:Sprite2D
 
p_oMaterial:Material
 
p_oScene:Scene3D