Packagesandy.materials.attributes
Classpublic final class LightAttributes
ImplementsIAttributes

Realize a flat shading effect when associated to a material.

To make this material attribute use by the Material object, the material must have :myMAterial.lighteningEnable = true.
This attributes contains some parameters



Public Properties
 PropertyDefined by
  ambient : Number = 0.3
Level of ambient light, added to the scene if lighting is enabled.
LightAttributes
  modified : Boolean
LightAttributes
  useBright : Boolean = false
Flag for lightening mode.
LightAttributes
Public Methods
 MethodDefined by
  
LightAttributes(p_bBright:Boolean = false, p_nAmbient:Number = 0.3)
Creates a new LineAttributes object.
LightAttributes
  
draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void
Draw the attribute onto the graphics object to simulate the flat shading.
LightAttributes
Property detail
ambientproperty
public var ambient:Number = 0.3

Level of ambient light, added to the scene if lighting is enabled.

modifiedproperty 
public var modified:Boolean
useBrightproperty 
public var useBright:Boolean = false

Flag for lightening mode.

If true, the lit objects use full light range from black to white. If false (the default) they just range from black to their normal appearance.

Constructor detail
LightAttributes()constructor
public function LightAttributes(p_bBright:Boolean = false, p_nAmbient:Number = 0.3)

Creates a new LineAttributes object.

Parameters
p_bBright:Boolean (default = false) — - default false - The brightness
 
p_nAmbient:Number (default = 0.3) — - default 0 - The ambiant light value. Value must be between 0 and 1
Method detail
draw()method
public function draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void

Draw the attribute onto the graphics object to simulate the flat shading.

Parameters
p_oGraphics:Graphics — the Graphics object to draw attributes into
 
p_oPolygon:Polygon — the polygon which is going o be drawn
 
p_oMaterial:Material — the refering material
 
p_oScene:Scene3D — the scene