Packagesandy.materials
Classpublic final class ColorMaterial
InheritanceColorMaterial Inheritance Material

Displays a color with on the faces of a 3D shape.

Used to show colored faces, possibly with lines at the edges of the faces.



Public Properties
 PropertyDefined by
  alpha : Number
The alpha value for this material ( 0 - 1 ) Alpha = 0 means fully transparent, alpha = 1 fully opaque.
ColorMaterial
 Inheritedattributes : MaterialAttributes
The attributes of this material.
Material
  color : Number
The color of this material
ColorMaterial
 Inheritedfilters : Array
The array of filters for this material.
Material
 Inheritedid : Number
The unique id of this material
Material
 InheritedlightingEnable : Boolean = false
Specify is the material can receive light and apply the lightAttributes if specified.
Material
 Inheritedmodified : Boolean
The modified state of this material.
Material
 Inheritedrepeat : Boolean
The repeat property (?).
Material
 Inheritedtype : MaterialType
The material type of this material.
Material
 InheriteduseVertexNormal : Boolean = false
Specify if the material use the vertex normal information Default value is set to false.
Material
Protected Properties
 PropertyDefined by
 Inheritedm_bModified : Boolean
Material
 Inheritedm_oType : MaterialType
Material
 Inherited_useLight : Boolean = false
Material
Public Methods
 MethodDefined by
  
ColorMaterial(p_nColor:uint = 0x00, p_nAlpha:Number = 1, p_oAttr:MaterialAttributes = null)
Creates a new ColorMaterial.
ColorMaterial
 Inherited
init(f:Polygon):void
Not used in this version of Sandy.
Material
  
renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void
Renders this material on the face it dresses
ColorMaterial
Property detail
alphaproperty
alpha:Number  [read-write]

The alpha value for this material ( 0 - 1 ) Alpha = 0 means fully transparent, alpha = 1 fully opaque.

Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:Number  [read-write]

The color of this material

Implementation
    public function get color():Number
    public function set color(value:Number):void
Constructor detail
ColorMaterial()constructor
public function ColorMaterial(p_nColor:uint = 0x00, p_nAlpha:Number = 1, p_oAttr:MaterialAttributes = null)

Creates a new ColorMaterial.

Parameters
p_nColor:uint (default = 0x00) — The color for this material in hexadecimal notation
 
p_nAlpha:Number (default = 1) — The alpha value in percent of full opacity ( 0 - 1 )
 
p_oAttr:MaterialAttributes (default = null) — The attributes for this material
Method detail
renderPolygon()method
public override function renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void

Renders this material on the face it dresses

Parameters
p_oScene:Scene3D — The current scene
 
p_oPolygon:Polygon — The face to be rendered
 
p_mcContainer:Sprite — The container to draw on