Packageaway3d.materials.passes
Classpublic class SingleObjectDepthPass
InheritanceSingleObjectDepthPass Inheritance MaterialPassBase Inheritance flash.events.EventDispatcher

The SingleObjectDepthPass provides a material pass that renders a single object to a depth map from the point of view from a light.



Public Properties
 PropertyDefined By
 InheritedalphaPremultiplied : Boolean
MaterialPassBase
 InheritedanimationSet : IAnimationSet
The animation used to add vertex code to the shader code.
MaterialPassBase
 InheritedbothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialPassBase
 InheriteddepthCompareMode : String
MaterialPassBase
 Inheritedmaterial : MaterialBase
The material to which this pass belongs.
MaterialPassBase
 Inheritedmipmap : Boolean
Defines whether any used textures should use mipmapping.
MaterialPassBase
 InheritednumUsedStreams : uint
[read-only] The amount of used vertex streams in the vertex code.
MaterialPassBase
 InheritednumUsedVertexConstants : uint
[read-only] The amount of used vertex constants in the vertex code.
MaterialPassBase
 InheritedrenderToTexture : Boolean
[read-only] Specifies whether this pass renders to texture
MaterialPassBase
 Inheritedrepeat : Boolean
Defines whether textures should be tiled.
MaterialPassBase
 Inheritedsmooth : Boolean
Defines whether smoothing should be applied to any used textures.
MaterialPassBase
Protected Properties
 PropertyDefined By
 Inherited_alphaPremultiplied : Boolean
MaterialPassBase
 Inherited_animatableAttributes : Array
MaterialPassBase
 Inherited_animationSet : IAnimationSet
MaterialPassBase
 Inherited_animationTargetRegisters : Array
MaterialPassBase
 Inherited_defaultCulling : String = back
MaterialPassBase
 Inherited_depthCompareMode : String = less
MaterialPassBase
 Inherited_material : MaterialBase
MaterialPassBase
 Inherited_mipmap : Boolean = true
MaterialPassBase
 Inherited_numDirectionalLights : uint
MaterialPassBase
 Inherited_numLightProbes : uint
MaterialPassBase
 Inherited_numPointLights : uint
MaterialPassBase
 Inherited_numUsedFragmentConstants : uint
MaterialPassBase
 Inherited_numUsedStreams : uint
MaterialPassBase
 Inherited_numUsedTextures : uint
MaterialPassBase
 Inherited_numUsedVertexConstants : uint
MaterialPassBase
 Inherited_repeat : Boolean = false
MaterialPassBase
 Inherited_smooth : Boolean = true
MaterialPassBase
Public Methods
 MethodDefined By
  
SingleObjectDepthPass(textureSize:uint = 512, polyOffset:Number = 15)
Creates a new SingleObjectDepthPass object.
SingleObjectDepthPass
  
dispose():void
[override] Cleans up any resources used by the current object.
SingleObjectDepthPass
Property Detail
numDirectionalLightsproperty
numDirectionalLights:uint[override]


Implementation
    arcane function get numDirectionalLights():uint
    arcane function set numDirectionalLights(value:uint):void
numPointLightsproperty 
numPointLights:uint[override]


Implementation
    arcane function get numPointLights():uint
    arcane function set numPointLights(value:uint):void
Constructor Detail
SingleObjectDepthPass()Constructor
public function SingleObjectDepthPass(textureSize:uint = 512, polyOffset:Number = 15)

Creates a new SingleObjectDepthPass object.

Parameters
textureSize:uint (default = 512) — The size of the depth map texture to render to.
 
polyOffset:Number (default = 15) — The amount by which the rendered object will be inflated, to prevent depth map rounding errors. todo: provide custom vertex code to assembler
Method Detail
activate()method
override arcane function activate(stage3DProxy:Stage3DProxy, camera:Camera3D, textureRatioX:Number, textureRatioY:Number):void

Parameters

stage3DProxy:Stage3DProxy
 
camera:Camera3D
 
textureRatioX:Number
 
textureRatioY:Number

dispose()method 
override public function dispose():void

Cleans up any resources used by the current object.

getDepthMaps()method 
arcane function getDepthMaps(renderable:IRenderable, stage3DProxy:Stage3DProxy):Vector.<Texture>

Gets the depth maps rendered for this object from all lights.

Parameters

renderable:IRenderable — The renderable for which to retrieve the depth maps
 
stage3DProxy:Stage3DProxy

Returns
Vector.<Texture> — A list of depth map textures for all supported lights.
getFragmentCode()method 
override arcane function getFragmentCode():String

Returns
String
getProjections()method 
arcane function getProjections(renderable:IRenderable):Vector.<Matrix3D>

Retrieves the depth map projection maps for all lights.

Parameters

renderable:IRenderable — The renderable for which to retrieve the projection maps.

Returns
Vector.<Matrix3D> — A list of projection maps for all supported lights.
getVertexCode()method 
override arcane function getVertexCode(code:String):String

Parameters

code:String

Returns
String
render()method 
override arcane function render(renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D, lightPicker:LightPickerBase):void

Parameters

renderable:IRenderable
 
stage3DProxy:Stage3DProxy
 
camera:Camera3D
 
lightPicker:LightPickerBase