| Package | sandy.materials |
| Class | public class Material |
| Subclasses | BitmapMaterial, ColorMaterial, WireFrameMaterial, ZShaderMaterial |
You can use this class to apply attributes without any material to object.
| Property | Defined 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 | ||
| Method | Defined by | ||
|---|---|---|---|
|
Material(p_oAttr:MaterialAttributes = null)
Creates a material.
| Material | ||
|
Calls begin method of the MaterialAttributes associated with this material.
| Material | ||
|
Calls finish method of the MaterialAttributes associated with this material.
| Material | ||
|
Calls init method of the MaterialAttributes associated with this material.
| Material | ||
|
Renders the polygon dress in this material.
| Material | ||
|
Renders the sprite dress in this material.
| Material | ||
|
Calls unlink method of the MaterialAttributes associated with this material.
| Material | ||
| attributes | property |
| filters | property |
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.
public function get filters():Array
public function set filters(value:Array):void
| flags | property |
flags:uint [read-only]Contains specific material flags.
Implementation public function get flags():uint
| id | property |
id:Number [read-only]The unique id of this material.
Implementation public function get id():Number
| lightingEnable | property |
public var lightingEnable:Boolean = falseSpecifies 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.
| modified | property |
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
| repeat | property |
public var repeat:Boolean = trueThe repeat property. This affects the way textured materials are mapped for U or V out of 0-1 range.
| type | property |
type:MaterialType [read-only]The material type of this material.
The default value is MaterialType.NONE.
public function get type():MaterialType
See also
| useVertexNormal | property |
public var useVertexNormal:Boolean = falseSpecify if the material use the vertex normal information.
The default value is false.
| Material | () | constructor |
public function Material(p_oAttr:MaterialAttributes = null)Creates a material.
This constructor is never called directly - but by sub class constructors.
Parametersp_oAttr:MaterialAttributes (default = null) — The attributes for this material.
|
See also
| begin | () | method |
public function begin(p_oScene:Scene3D):voidCalls begin method of the MaterialAttributes associated with this material.
Parametersp_oScene:Scene3D |
See also
| finish | () | method |
public function finish(p_oScene:Scene3D):voidCalls finish method of the MaterialAttributes associated with this material.
Parametersp_oScene:Scene3D |
See also
| init | () | method |
public function init(p_oPolygon:Polygon):voidCalls init method of the MaterialAttributes associated with this material.
Parametersp_oPolygon:Polygon |
See also
| renderPolygon | () | method |
public function renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):voidRenders the polygon dress in this material.
Implemented by sub classes.
Parametersp_oScene:Scene3D |
|
p_oPolygon:Polygon |
|
p_mcContainer:Sprite |
See also
| renderSprite | () | method |
public function renderSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):voidRenders the sprite dress in this material.
Basically only needed to apply attributes to sprites
Parametersp_oSprite:Sprite2D |
|
p_oMaterial:Material |
|
p_oScene:Scene3D |
See also
| unlink | () | method |
public function unlink(p_oPolygon:Polygon):voidCalls unlink method of the MaterialAttributes associated with this material.
Parametersp_oPolygon:Polygon |
See also