Packagealternativa.engine3d.shadows
Classpublic class OmniLightShadow
InheritanceOmniLightShadow Inheritance Shadow Inheritance Object

Class of the shadow, that is created by one source of light(OmniLight). Shadow is rendered in fixed volume. For binding of shadow to light source you need: 1) to set instance of the OmniLight as a value of property shadow of light source; 2) to add Object3D to corresponding list, using the method addCaster().

See also

addCaster()
alternativa.engine3d.lights.OmniLight.shadow
farBoundPosition


Public Properties
 PropertyDefined By
  biasMultiplier : Number = 0.97
Degree of correcting offset of shadow map space.
OmniLightShadow
 Inheriteddebug : Boolean = false
Debug mode.
Shadow
  mapSize : int
Set resolution of shadow map.
OmniLightShadow
  pcfOffset : Number
Offset of Percentage Closer Filtering.
OmniLightShadow
Public Methods
 MethodDefined By
  
OmniLightShadow(mapSize:int = 128, pcfOffset:Number = 0)
Создает экземпляр OmniLightShadow.
OmniLightShadow
  
addCaster(object:Object3D):void
Adds given object to list of objects, that cast shadow.
OmniLightShadow
  
Clears the list of objects, that cast shadow.
OmniLightShadow
  
removeCaster(object:Object3D):void
Removes given object from shadow casters list.
OmniLightShadow
Property Detail
biasMultiplierproperty
public var biasMultiplier:Number = 0.97

Degree of correcting offset of shadow map space. It need for getting rid of self-shadowing artifacts.

mapSizeproperty 
mapSize:int

Set resolution of shadow map. This property can get value of power of 2 (up to 2048). OmniLightShadow uses 6 shadow maps.


Implementation
    public function get mapSize():int
    public function set mapSize(value:int):void
pcfOffsetproperty 
pcfOffset:Number

Offset of Percentage Closer Filtering. This way of filtering is used for mitigation of shadow bounds.


Implementation
    public function get pcfOffset():Number
    public function set pcfOffset(value:Number):void
Constructor Detail
OmniLightShadow()Constructor
public function OmniLightShadow(mapSize:int = 128, pcfOffset:Number = 0)

Создает экземпляр OmniLightShadow.

Parameters
mapSize:int (default = 128) — Размер карты теней. Должен быть степенью 2.
 
pcfOffset:Number (default = 0) — Смягчение границ тени.
Method Detail
addCaster()method
public function addCaster(object:Object3D):void

Adds given object to list of objects, that cast shadow.

Parameters

object:Object3D — Added object.

clearCasters()method 
public function clearCasters():void

Clears the list of objects, that cast shadow.

process()method 
override alternativa3d function process(camera:Camera3D):void

Parameters

camera:Camera3D

removeCaster()method 
public function removeCaster(object:Object3D):void

Removes given object from shadow casters list.

Parameters

object:Object3D — Object which should be removed from shadow casters list.