| Package | sandy.materials.attributes |
| Class | public class ALightAttributes |
| Implements | IAttributes |
| Subclasses | CelShadeAttributes, GouraudAttributes, LightAttributes, PhongAttributes |
This class should not be directly instatiated, but sub classed.
The ALightAttributes class implements Blinn flavor of Phong reflection model.
| Property | Defined 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 | ||
| Method | Defined by | ||
|---|---|---|---|
|
Draws light on shape.
| ALightAttributes | ||
|
Draws light on sprite.
| ALightAttributes | ||
| ambient | property |
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.
public function get ambient():Number
public function set ambient(value:Number):void
| diffuse | property |
diffuse:Number [read-write]Diffuse reflection factor.
The default value is 1.0.
public function get diffuse():Number
public function set diffuse(value:Number):void
| flags | property |
flags:uint [read-only]Flags for the attribute.
Implementation public function get flags():uint
| gloss | property |
gloss:Number [read-write]Specular exponent.
The default value is 5.0.
public function get gloss():Number
public function set gloss(value:Number):void
| specular | property |
specular:Number [read-write]Specular reflection factor.
The default value is 0.0.
public function get specular():Number
public function set specular(value:Number):void
| draw | () | method |
public function draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):voidDraws light on shape.
Parametersp_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):voidDraws light on sprite.
Parametersp_oSprite:Sprite2D |
|
p_oMaterial:Material |
|
p_oScene:Scene3D |