org.ogre4j
Class PSSMShadowCameraSetup

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.PSSMShadowCameraSetup
All Implemented Interfaces:
IAllocatedObject<ISceneCtlAllocPolicy>, IFocusedShadowCameraSetup, ILiSPSMShadowCameraSetup, IPSSMShadowCameraSetup, ISceneCtlAllocatedObject, IShadowCameraSetup, INativeObject

public class PSSMShadowCameraSetup
extends NativeObject
implements IPSSMShadowCameraSetup


Nested Class Summary
static class PSSMShadowCameraSetup.OptimalAdjustFactorList
           
static class PSSMShadowCameraSetup.SplitPointList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IPSSMShadowCameraSetup
IPSSMShadowCameraSetup.IOptimalAdjustFactorList, IPSSMShadowCameraSetup.ISplitPointList
 
Nested classes/interfaces inherited from interface org.ogre4j.IFocusedShadowCameraSetup
IFocusedShadowCameraSetup.IPointListBody
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  PSSMShadowCameraSetup()
           
  PSSMShadowCameraSetup(InstancePointer p)
          This constructor is public for internal useage only!
protected PSSMShadowCameraSetup(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  PSSMShadowCameraSetup(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void calculateSplitPoints(int splitCount, float nearDist, float farDist, float lambda)
          Calculate a new splitting scheme.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 float getOptimalAdjustFactor()
          Get the parameter n used to produce optimal shadows.
 float getOptimalAdjustFactor(int splitIndex)
           
 void getShadowCamera(ISceneManager sm, ICamera cam, IViewport vp, ILight light, ICamera texCam, int iteration)
          Returns a LiSPSM shadow camera.
 int getSplitCount()
           
 float getSplitPadding()
          Get the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.
 IPSSMShadowCameraSetup.ISplitPointList getSplitPoints()
           
 boolean getUseAggressiveFocusRegion()
           
 boolean getUseSimpleOptimalAdjust()
          Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true)
 void setOptimalAdjustFactor(float n)
          Adjusts the parameter n to produce optimal shadows.
 void setOptimalAdjustFactor(int splitIndex, float factor)
          Set the LiSPSM optimal adjust factor for a given split (call after configuring splits).
 void setSplitPadding(float pad)
          Set the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.
 void setSplitPoints(IPSSMShadowCameraSetup.ISplitPointList newSplitPoints)
          Manually configure a new splitting scheme.
 void setUseAggressiveFocusRegion(boolean aggressive)
          Sets whether or not to use the more aggressive approach to deciding on the focus region or not.
 void setUseSimpleOptimalAdjust(boolean s)
          Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true)
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

PSSMShadowCameraSetup

public PSSMShadowCameraSetup(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


PSSMShadowCameraSetup

protected PSSMShadowCameraSetup(InstancePointer p,
                                boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


PSSMShadowCameraSetup

public PSSMShadowCameraSetup(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

PSSMShadowCameraSetup

public PSSMShadowCameraSetup()
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

calculateSplitPoints

public void calculateSplitPoints(int splitCount,
                                 float nearDist,
                                 float farDist,
                                 float lambda)
Calculate a new splitting scheme.

Specified by:
calculateSplitPoints in interface IPSSMShadowCameraSetup

setSplitPoints

public void setSplitPoints(IPSSMShadowCameraSetup.ISplitPointList newSplitPoints)
Manually configure a new splitting scheme.

Specified by:
setSplitPoints in interface IPSSMShadowCameraSetup

setOptimalAdjustFactor

public void setOptimalAdjustFactor(int splitIndex,
                                   float factor)
Set the LiSPSM optimal adjust factor for a given split (call after configuring splits).

Specified by:
setOptimalAdjustFactor in interface IPSSMShadowCameraSetup

setSplitPadding

public void setSplitPadding(float pad)
Set the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.

Specified by:
setSplitPadding in interface IPSSMShadowCameraSetup

getSplitPadding

public float getSplitPadding()
Get the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.

Specified by:
getSplitPadding in interface IPSSMShadowCameraSetup

getSplitCount

public int getSplitCount()
Specified by:
getSplitCount in interface IPSSMShadowCameraSetup

getSplitPoints

public IPSSMShadowCameraSetup.ISplitPointList getSplitPoints()
Specified by:
getSplitPoints in interface IPSSMShadowCameraSetup

getOptimalAdjustFactor

public float getOptimalAdjustFactor(int splitIndex)
Specified by:
getOptimalAdjustFactor in interface IPSSMShadowCameraSetup

getOptimalAdjustFactor

public float getOptimalAdjustFactor()
Description copied from interface: ILiSPSMShadowCameraSetup
Get the parameter n used to produce optimal shadows.

Specified by:
getOptimalAdjustFactor in interface ILiSPSMShadowCameraSetup
Specified by:
getOptimalAdjustFactor in interface IPSSMShadowCameraSetup

getShadowCamera

public void getShadowCamera(ISceneManager sm,
                            ICamera cam,
                            IViewport vp,
                            ILight light,
                            ICamera texCam,
                            int iteration)
Returns a LiSPSM shadow camera.

Specified by:
getShadowCamera in interface IFocusedShadowCameraSetup
Specified by:
getShadowCamera in interface ILiSPSMShadowCameraSetup
Specified by:
getShadowCamera in interface IPSSMShadowCameraSetup
Specified by:
getShadowCamera in interface IShadowCameraSetup

setOptimalAdjustFactor

public void setOptimalAdjustFactor(float n)
Adjusts the parameter n to produce optimal shadows.

Specified by:
setOptimalAdjustFactor in interface ILiSPSMShadowCameraSetup

setUseSimpleOptimalAdjust

public void setUseSimpleOptimalAdjust(boolean s)
Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true)

Specified by:
setUseSimpleOptimalAdjust in interface ILiSPSMShadowCameraSetup

getUseSimpleOptimalAdjust

public boolean getUseSimpleOptimalAdjust()
Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true)

Specified by:
getUseSimpleOptimalAdjust in interface ILiSPSMShadowCameraSetup

setUseAggressiveFocusRegion

public void setUseAggressiveFocusRegion(boolean aggressive)
Sets whether or not to use the more aggressive approach to deciding on the focus region or not.

Specified by:
setUseAggressiveFocusRegion in interface IFocusedShadowCameraSetup

getUseAggressiveFocusRegion

public boolean getUseAggressiveFocusRegion()
Specified by:
getUseAggressiveFocusRegion in interface IFocusedShadowCameraSetup


Copyright © 2007 netAllied GmbH. All Rights Reserved.