Packagesandy.materials
Classpublic class Material
SubclassesBitmapMaterial, ColorMaterial, WireFrameMaterial, ZShaderMaterial

Blank material - base class for all materials.

You can use this class to apply attributes without any material to object.



Public Properties
 PropertyDefined by
  attributes : MaterialAttributes
The attributes of this material.
Material
  filters : Array
The array of filters for this material.
Material
  flags : uint
[read-only] Contains specific material flags.
Material
  id : Number
[read-only] The unique id of this material.
Material
  lightingEnable : Boolean = false
Specifies if the material can receive light and have light attributes applied to it.
Material
  modified : Boolean
[read-only] The modified state of this material.
Material
  repeat : Boolean = true
The repeat property.
Material
  type : MaterialType
[read-only] The material type of this material.
Material
  useVertexNormal : Boolean = false
Specify if the material use the vertex normal information.
Material
Public Methods
 MethodDefined by
  
Material(p_oAttr:MaterialAttributes = null)
Creates a material.
Material
  
begin(p_oScene:Scene3D):void
Calls begin method of the MaterialAttributes associated with this material.
Material
  
finish(p_oScene:Scene3D):void
Calls finish method of the MaterialAttributes associated with this material.
Material
  
init(p_oPolygon:Polygon):void
Calls init method of the MaterialAttributes associated with this material.
Material
  
renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void
Renders the polygon dress in this material.
Material
  
renderSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void
Renders the sprite dress in this material.
Material
  
unlink(p_oPolygon:Polygon):void
Calls unlink method of the MaterialAttributes associated with this material.
Material
Property detail
attributesproperty
public var attributes:MaterialAttributes

The attributes of this material.

See also

filtersproperty 
filters:Array  [read-write]

The array of filters for this material.

You use this property to add an array of filters you want to apply to this material
To remove the filters, just assign an empty array.

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

Contains specific material flags.

Implementation
    public function get flags():uint
idproperty 
id:Number  [read-only]

The unique id of this material.

Implementation
    public function get id():Number
lightingEnableproperty 
public var lightingEnable:Boolean = false

Specifies if the material can receive light and have light attributes applied to it. Can be useful to rapidly disable light on the object when unneeded.

modifiedproperty 
modified:Boolean  [read-only]

The modified state of this material.

true if this material or its line attributes were modified since last rendered, false otherwise.

Implementation
    public function get modified():Boolean
repeatproperty 
public var repeat:Boolean = true

The repeat property. This affects the way textured materials are mapped for U or V out of 0-1 range.

typeproperty 
type:MaterialType  [read-only]

The material type of this material.

The default value is MaterialType.NONE.

Implementation
    public function get type():MaterialType

See also

useVertexNormalproperty 
public var useVertexNormal:Boolean = false

Specify if the material use the vertex normal information.

The default value is false.

Constructor detail
Material()constructor
public function Material(p_oAttr:MaterialAttributes = null)

Creates a material.

This constructor is never called directly - but by sub class constructors.

Parameters
p_oAttr:MaterialAttributes (default = null) — The attributes for this material.

See also

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

Calls begin method of the MaterialAttributes associated with this material.

Parameters
p_oScene:Scene3D

See also

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

Calls finish method of the MaterialAttributes associated with this material.

Parameters
p_oScene:Scene3D

See also

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

Calls init method of the MaterialAttributes associated with this material.

Parameters
p_oPolygon:Polygon

See also

renderPolygon()method 
public function renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void

Renders the polygon dress in this material.

Implemented by sub classes.

Parameters
p_oScene:Scene3D
 
p_oPolygon:Polygon
 
p_mcContainer:Sprite

See also

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

Renders the sprite dress in this material.

Basically only needed to apply attributes to sprites

Parameters
p_oSprite:Sprite2D
 
p_oMaterial:Material
 
p_oScene:Scene3D

See also

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

Calls unlink method of the MaterialAttributes associated with this material.

Parameters
p_oPolygon:Polygon

See also