Packagesandy.materials.attributes
Classpublic class MaterialAttributes

The MaterialAttributes class is used to apply one or more attributes to a Shape3D object.

See also

sandy.core.scenegraph.Shape3D


Public Properties
 PropertyDefined by
  attributes : Array
List of attributes.
MaterialAttributes
  flags : uint
[read-only] Returns flags for attributes.
MaterialAttributes
Public Methods
 MethodDefined by
  
Creates a new LightAttributes object.
MaterialAttributes
  
begin(p_oScene:Scene3D):void
Method called before the display list rendering.
MaterialAttributes
  
draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void
Draws all attributes to the graphics object.
MaterialAttributes
  
drawOnSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void
Applies attributes to a sprite.
MaterialAttributes
  
finish(p_oScene:Scene3D):void
Method called right after the display list rendering.
MaterialAttributes
  
init(p_oPolygon:Polygon):void
Allows all attributes to proceed to an initialization to know when the polyon isn't lined to the material.
MaterialAttributes
  
unlink(p_oPolygon:Polygon):void
Remove all initializations (opposite of init method) from all attributes.
MaterialAttributes
Property detail
attributesproperty
public var attributes:Array

List of attributes.

flagsproperty 
flags:uint  [read-only]

Returns flags for attributes.

Implementation
    public function get flags():uint

See also

Constructor detail
MaterialAttributes()constructor
public function MaterialAttributes(... args)

Creates a new LightAttributes object.

Parameters
... args
Method detail
begin()method
public function begin(p_oScene:Scene3D):void

Method called before the display list rendering. This is the common place for this attribute to precompute things.

Parameters
p_oScene:Scene3D — The scene.

See also

draw()method 
public function draw(p_oGraphics:Graphics, p_oPolygon:Polygon, p_oMaterial:Material, p_oScene:Scene3D):void

Draws all attributes to the graphics object.

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

See also

drawOnSprite()method 
public function drawOnSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void

Applies attributes to a sprite.

Parameters
p_oSprite:Sprite2D — The Sprite2D object to draw attributes to.
 
p_oMaterial:Material — The refering material.
 
p_oScene:Scene3D — The scene.

See also

finish()method 
public function finish(p_oScene:Scene3D):void

Method called right after the display list rendering. This is the place to remove and dispose memory if necessary.

Parameters
p_oScene:Scene3D — The scene.

See also

init()method 
public function init(p_oPolygon:Polygon):void

Allows all attributes to proceed to an initialization to know when the polyon isn't lined to the material.

Parameters
p_oPolygon:Polygon — The polygon.

See also

unlink()method 
public function unlink(p_oPolygon:Polygon):void

Remove all initializations (opposite of init method) from all attributes.

Parameters
p_oPolygon:Polygon — The polygon.

See also