Packageaway3d.materials.methods
Classpublic class FogMethod
InheritanceFogMethod Inheritance EffectMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

FogMethod provides a method to add distance-based fog to a material.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only] The type of the asset.
EffectMethodBase
  fogColor : uint
The colour of the fog.
FogMethod
 Inheritedid : String
NamedAssetBase
  maxDistance : Number
The distance at which the fog is densest.
FogMethod
  minDistance : Number
The distance from which the fog starts appearing.
FogMethod
 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
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
FogMethod(minDistance:Number, maxDistance:Number, fogColor:uint = 0x808080)
Creates a new FogMethod object.
FogMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
Copies the state from a ShadingMethodBase object into the current object.
ShadingMethodBase
 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
fogColorproperty
fogColor:uint

The colour of the fog.


Implementation
    public function get fogColor():uint
    public function set fogColor(value:uint):void
maxDistanceproperty 
maxDistance:Number

The distance at which the fog is densest.


Implementation
    public function get maxDistance():Number
    public function set maxDistance(value:Number):void
minDistanceproperty 
minDistance:Number

The distance from which the fog starts appearing.


Implementation
    public function get minDistance():Number
    public function set minDistance(value:Number):void
Constructor Detail
FogMethod()Constructor
public function FogMethod(minDistance:Number, maxDistance:Number, fogColor:uint = 0x808080)

Creates a new FogMethod object.

Parameters
minDistance:Number — The distance from which the fog starts appearing.
 
maxDistance:Number — The distance at which the fog is densest.
 
fogColor:uint (default = 0x808080) — The colour of the fog.
Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

getFragmentCode()method 
override 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.