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

ABSTRACT CLASS - base class for all materials.

This class should not be directly instatiated



Public Properties
 PropertyDefined by
  attributes : MaterialAttributes
The attributes of this material.
Material
  filters : Array
The array of filters for this material.
Material
  id : Number
[read-only] The unique id of this material
Material
  lightingEnable : Boolean = false
Specify is the material can receive light and apply the lightAttributes if specified.
Material
  modified : Boolean
[read-only] The modified state of this material.
Material
  repeat : Boolean
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 Default value is set to false.
Material
Protected Properties
 PropertyDefined by
  m_bModified : Boolean
Material
  m_oType : MaterialType
Material
  _useLight : Boolean = false
Material
Public Methods
 MethodDefined by
  
Material(p_oAttr:MaterialAttributes = null)
Creates a matrial.
Material
  
init(f:Polygon):void
Not used in this version of Sandy.
Material
  
renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void
Renders the polygon dress in this material.
Material
Property detail
attributesproperty
public var attributes:MaterialAttributes

The attributes of this material.

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
idproperty 
id:Number  [read-only]

The unique id of this material

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

Specify is the material can receive light and apply the lightAttributes if specified. Can be useful to disable very rapidly the light when unused. Default value : false

m_bModifiedproperty 
protected var m_bModified:Boolean
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
m_oTypeproperty 
protected var m_oType:MaterialType
repeatproperty 
public var repeat:Boolean

The repeat property (?). Property that has to be updated when the material needs to have the normals vector in order to compute the correct effect. For example, with ligthening enabled, this property must be set to true in order to render the light effect correctly. .

[ToDo: Explain this better!]

NOTE: The variable is READ ONLY unless you perfectly know what you are doing.
typeproperty 
type:MaterialType  [read-only]

The material type of this material.

For the default material this value is set to NONE

Implementation
    public function get type():MaterialType
_useLightproperty 
protected var _useLight:Boolean = false
useVertexNormalproperty 
public var useVertexNormal:Boolean = false

Specify if the material use the vertex normal information Default value is set to false.

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

Creates a matrial.

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

Parameters
p_oAttr:MaterialAttributes (default = null) — The attributes for this material
Method detail
init()method
public function init(f:Polygon):void

Not used in this version of Sandy.

Parameters
f:Polygon
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