com.jme3.shadow
クラス PssmShadowRenderer

java.lang.Object
  上位を拡張 com.jme3.shadow.PssmShadowRenderer
すべての実装されたインタフェース:
SceneProcessor

public class PssmShadowRenderer
extends java.lang.Object
implements SceneProcessor

PssmShadow renderer use Parrallel Split Shadow Mapping technique (pssm)
It splits the view frustum in several parts and compute a shadow map for each one.
splits are distributed so that the closer they are from the camera, the smaller they are to maximize the resolution used of the shadow map.
This result in a better quality shadow than standard shadow mapping.
for more informations on this read this http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html


入れ子のクラスの概要
static class PssmShadowRenderer.CompareMode
          Specifies the shadow comparison mode
static class PssmShadowRenderer.FilterMode
          FilterMode specifies how shadows are filtered
 
コンストラクタの概要
PssmShadowRenderer(AssetManager manager, int size, int nbSplits)
          Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html
 
メソッドの概要
 void cleanup()
          Called when the SP is removed from the RM.
 void displayDebug()
          For dubuging purpose Allow to "snapshot" the current frustrum to the scene
 Vector3f getDirection()
          returns the light direction used by the processor
 int getEdgesThickness()
          returns the edges thickness
see setEdgesThickness(int edgesThickness)
 float getLambda()
          returns the labda parameter
see setLambda(float lambda)
 float getShadowIntensity()
          returns the shdaow intensity
see setShadowIntensity(float shadowIntensity)
 float getShadowZExtend()
          How far the shadows are rendered in the view see setShadowZExtend(float zFar)
 void initialize(RenderManager rm, ViewPort vp)
          Called in the render thread to initialize the scene processor.
 boolean isFlushQueues()
          returns true if the PssmRenderer flushed the shadow queues
 boolean isInitialized()
           
 void postFrame(FrameBuffer out)
          Called after a frame has been rendered and the queue flushed.
 void postQueue(RenderQueue rq)
          Called after the scene graph has been queued, but before it is flushed.
 void preFrame(float tpf)
          Called before a frame
 void reshape(ViewPort vp, int w, int h)
          Called when the resolution of the viewport has been changed.
 void setCompareMode(PssmShadowRenderer.CompareMode compareMode)
          sets the shadow compare mode see PssmShadowRenderer.CompareMode for more info
 void setDirection(Vector3f direction)
          Sets the light direction to use to compute shadows
 void setEdgesThickness(int edgesThickness)
          Sets the shadow edges thickness. default is 1, setting it to lower values can help to reduce the jagged effect of the shadow edges
 void setFilterMode(PssmShadowRenderer.FilterMode filterMode)
          Sets the filtering mode for shadow edges see PssmShadowRenderer.FilterMode for more info
 void setFlushQueues(boolean flushQueues)
          Set this to false if you want to use several PssmRederers to have multiple shadows cast by multiple light sources.
 void setLambda(float lambda)
           
 void setShadowIntensity(float shadowIntensity)
          Set the shadowIntensity, the value should be between 0 and 1, a 0 value gives a bright and invisilble shadow, a 1 value gives a pitch black shadow, default is 0.7
 void setShadowZExtend(float zFar)
          Set the distance from the eye where the shadows will be rendered default value is dynamicaly computed to the shadow casters/receivers union bound zFar, capped to view frustum far value.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PssmShadowRenderer

public PssmShadowRenderer(AssetManager manager,
                          int size,
                          int nbSplits)
Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html

パラメータ:
manager - the application asset manager
size - the size of the rendered shadowmaps (512,1024,2048, etc...)
nbSplits - the number of shadow maps rendered (the more shadow maps the more quality, the less fps).
メソッドの詳細

setFilterMode

public void setFilterMode(PssmShadowRenderer.FilterMode filterMode)
Sets the filtering mode for shadow edges see PssmShadowRenderer.FilterMode for more info

パラメータ:
filterMode -

setCompareMode

public void setCompareMode(PssmShadowRenderer.CompareMode compareMode)
sets the shadow compare mode see PssmShadowRenderer.CompareMode for more info

パラメータ:
compareMode -

initialize

public void initialize(RenderManager rm,
                       ViewPort vp)
インタフェース SceneProcessor の記述:
Called in the render thread to initialize the scene processor.

定義:
インタフェース SceneProcessor 内の initialize
パラメータ:
rm - The render manager to which the SP was added to
vp - The viewport to which the SP is assigned

isInitialized

public boolean isInitialized()
定義:
インタフェース SceneProcessor 内の isInitialized
戻り値:
True if initialize() has been called on this SceneProcessor, false if otherwise.

getDirection

public Vector3f getDirection()
returns the light direction used by the processor

戻り値:

setDirection

public void setDirection(Vector3f direction)
Sets the light direction to use to compute shadows

パラメータ:
direction -

postQueue

public void postQueue(RenderQueue rq)
インタフェース SceneProcessor の記述:
Called after the scene graph has been queued, but before it is flushed.

定義:
インタフェース SceneProcessor 内の postQueue
パラメータ:
rq - The render queue

displayDebug

public void displayDebug()
For dubuging purpose Allow to "snapshot" the current frustrum to the scene


postFrame

public void postFrame(FrameBuffer out)
インタフェース SceneProcessor の記述:
Called after a frame has been rendered and the queue flushed.

定義:
インタフェース SceneProcessor 内の postFrame
パラメータ:
out - The FB to which the scene was rendered.

preFrame

public void preFrame(float tpf)
インタフェース SceneProcessor の記述:
Called before a frame

定義:
インタフェース SceneProcessor 内の preFrame
パラメータ:
tpf - Time per frame

cleanup

public void cleanup()
インタフェース SceneProcessor の記述:
Called when the SP is removed from the RM.

定義:
インタフェース SceneProcessor 内の cleanup

reshape

public void reshape(ViewPort vp,
                    int w,
                    int h)
インタフェース SceneProcessor の記述:
Called when the resolution of the viewport has been changed.

定義:
インタフェース SceneProcessor 内の reshape

getLambda

public float getLambda()
returns the labda parameter
see setLambda(float lambda)

戻り値:
lambda

setLambda

public void setLambda(float lambda)

getShadowZExtend

public float getShadowZExtend()
How far the shadows are rendered in the view see setShadowZExtend(float zFar)

戻り値:
shadowZExtend

setShadowZExtend

public void setShadowZExtend(float zFar)
Set the distance from the eye where the shadows will be rendered default value is dynamicaly computed to the shadow casters/receivers union bound zFar, capped to view frustum far value.

パラメータ:
zFar - the zFar values that override the computed one

getShadowIntensity

public float getShadowIntensity()
returns the shdaow intensity
see setShadowIntensity(float shadowIntensity)

戻り値:
shadowIntensity

setShadowIntensity

public void setShadowIntensity(float shadowIntensity)
Set the shadowIntensity, the value should be between 0 and 1, a 0 value gives a bright and invisilble shadow, a 1 value gives a pitch black shadow, default is 0.7

パラメータ:
shadowIntensity - the darkness of the shadow

getEdgesThickness

public int getEdgesThickness()
returns the edges thickness
see setEdgesThickness(int edgesThickness)

戻り値:
edgesThickness

setEdgesThickness

public void setEdgesThickness(int edgesThickness)
Sets the shadow edges thickness. default is 1, setting it to lower values can help to reduce the jagged effect of the shadow edges

パラメータ:
edgesThickness -

isFlushQueues

public boolean isFlushQueues()
returns true if the PssmRenderer flushed the shadow queues

戻り値:
flushQueues

setFlushQueues

public void setFlushQueues(boolean flushQueues)
Set this to false if you want to use several PssmRederers to have multiple shadows cast by multiple light sources. Make sure the last PssmRenderer in the stack DO flush the queues, but not the others

パラメータ:
flushQueues -