Packageaway3d.materials.methods
Classpublic class BasicAmbientMethod
InheritanceBasicAmbientMethod Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses EnvMapAmbientMethod

BasicAmbientMethod provides the default shading method for uniform ambient lighting.



Public Properties
 PropertyDefined By
  ambient : Number
The strength of the ambient reflection of the surface.
BasicAmbientMethod
  ambientColor : uint
The colour of the ambient reflection of the surface.
BasicAmbientMethod
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedpasses : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
  texture : Texture2DBase
The bitmapData to use to define the diffuse reflection color per texel.
BasicAmbientMethod
Protected Properties
 PropertyDefined By
  _ambientInputRegister : ShaderRegisterElement
BasicAmbientMethod
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
  _useTexture : Boolean
BasicAmbientMethod
Public Methods
 MethodDefined By
  
Creates a new BasicAmbientMethod object.
BasicAmbientMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
[override] Copies the state from a ShadingMethodBase object into the current object.
BasicAmbientMethod
 Inherited
dispose():void
Cleans up any resources used by the current object.
ShadingMethodBase
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 Inherited
getTex2DSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement = null, forceWrap:String = null):String
A helper method that generates standard code for sampling from a texture using the normal uv coordinates.
ShadingMethodBase
 Inherited
A helper method that generates standard code for sampling from a cube texture.
ShadingMethodBase
 Inherited
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
_ambientInputRegisterproperty
protected var _ambientInputRegister:ShaderRegisterElement

_lightAmbientBproperty 
arcane var _lightAmbientB:Number = 0

_lightAmbientGproperty 
arcane var _lightAmbientG:Number = 0

_lightAmbientRproperty 
arcane var _lightAmbientR:Number = 0

_useTextureproperty 
protected var _useTexture:Boolean

ambientproperty 
ambient:Number

The strength of the ambient reflection of the surface.


Implementation
    public function get ambient():Number
    public function set ambient(value:Number):void
ambientColorproperty 
ambientColor:uint

The colour of the ambient reflection of the surface.


Implementation
    public function get ambientColor():uint
    public function set ambientColor(value:uint):void
textureproperty 
texture:Texture2DBase

The bitmapData to use to define the diffuse reflection color per texel.


Implementation
    public function get texture():Texture2DBase
    public function set texture(value:Texture2DBase):void
Constructor Detail
BasicAmbientMethod()Constructor
public function BasicAmbientMethod()

Creates a new BasicAmbientMethod object.

Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

cleanCompilationData()method 
override arcane function cleanCompilationData():void

copyFrom()method 
override public function copyFrom(method:ShadingMethodBase):void

Copies the state from a ShadingMethodBase object into the current object.

Parameters

method:ShadingMethodBase

getFragmentCode()method 
arcane function getFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
initConstants()method 
override arcane function initConstants(vo:MethodVO):void

Initializes unchanging shader constants using the data from a MethodVO.

Parameters

vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.

initVO()method 
override arcane function initVO(vo:MethodVO):void

Initializes the properties for a MethodVO, including register and texture indices.

Parameters

vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.

setRenderState()method 
override arcane function setRenderState(vo:MethodVO, renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D):void

Sets the render state for a single renderable.

Parameters

vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
 
renderable:IRenderable — The renderable currently being rendered.
 
stage3DProxy:Stage3DProxy — The Stage3DProxy object currently used for rendering.
 
camera:Camera3D — The camera from which the scene is currently rendered.